Resonance occurs when the frequency of the applied force is equal to one of the natural frequencies of vibration of…