This Demonstration shows the forced oscillations of a spring mass damped system for the underdamped case. The differential equation is , where is the mass, is the displacement, is time, is the damping coefficient, is the stiffness, and is the frequency.
With mass set to 1, adjust the stiffness and the frequency of the forcing function to the maximum to put the system in resonance. Play with dampening to see the effect on the magnitude of the oscillations.
Adjust the stiffness to the maximum and then change the forcing frequency to around 3.4 to observe a beating phenomenon.
Adjust the initial displacement to see the transient response.