Unit content
Driven damped harmonic oscillator
A harmonic oscillator responds differently when an external periodic force continuously supplies energy. For a mass-spring system with viscous damping driven by
$$F(t)=F_0\cos(\omega t),$$
the equation of motion is
$$\boxed{m\ddot x+c\dot x+kx=F_0\cos(\omega t)}.$$
The complete motion contains a transient part, inherited from the free damped oscillator, and a steady-state response that oscillates at the driving angular frequency $\omega$. After the transient has decayed, the system therefore approaches a sinusoidal response whose amplitude and phase are set by the forcing frequency.
Deriving the steady-state response
Write the steady motion as
$$x(t)=a\cos(\omega t)+b\sin(\omega t).$$
Then
$$\dot x=-a\omega\sin(\omega t)+b\omega\cos(\omega t),$$
$$\ddot x=-a\omega^2\cos(\omega t)-b\omega^2\sin(\omega t).$$
Substituting into the equation of motion and grouping the cosine and sine terms gives
$$(k-m\omega^2)a+c\omega b=F_0,$$
$$(k-m\omega^2)b-c\omega a=0.$$
Solving these two equations,
$$a=\frac{F_0(k-m\omega^2)}{(k-m\omega^2)^2+(c\omega)^2},$$
$$b=\frac{F_0c\omega}{(k-m\omega^2)^2+(c\omega)^2}.$$
A sum of sine and cosine at the same frequency can be written in amplitude-phase form,
$$x(t)=A\cos(\omega t-\delta),$$
where
$$A=\sqrt{a^2+b^2}.$$
Therefore
$$\boxed{A(\omega)=\frac{F_0}{\sqrt{(k-m\omega^2)^2+(c\omega)^2}}}$$
and
$$\boxed{\tan\delta=\frac{c\omega}{k-m\omega^2}},$$
with the quadrant chosen so that $0\le\delta\le\pi$.
Low, resonant, and high driving frequencies
At very low frequency,
$$m\omega^2\ll k,$$
so
$$A\approx\frac{F_0}{k}$$
and the displacement is nearly in phase with the force. The oscillator behaves almost like a spring responding quasistatically.
Near the natural angular frequency
$$\omega_0=\sqrt{\frac{k}{m}},$$
the spring and inertial terms nearly cancel. The amplitude can become much larger, and the displacement lags the force by roughly $\pi/2$.
At very high frequency,
$$m\omega^2\gg k,$$
so
$$A\approx\frac{F_0}{m\omega^2}$$
and the displacement approaches a phase lag of $\pi$.
Resonance and damping
For sufficiently weak damping, the displacement amplitude reaches its maximum at
$$\boxed{\omega_r=\sqrt{\omega_0^2-\frac{c^2}{2m^2}}}.$$
Thus the displacement-resonance frequency is slightly below the undamped natural frequency. With weak damping the difference is small, so resonance is often described approximately as occurring near $\omega_0$.
Increasing damping lowers and broadens the resonant peak. Resonance is therefore not simply a statement that two frequencies are equal: the strength and sharpness of the response also depend on energy loss.
The ideal undamped limit
If $c=0$, the bounded steady-state amplitude formula becomes singular at
$$\omega=\omega_0.$$
This does not mean a real oscillator has infinite displacement. It means that the assumed bounded sinusoidal steady state no longer exists. In an ideal undamped oscillator driven exactly at its natural frequency, energy is added coherently on successive cycles and the oscillation amplitude grows with time.
Real systems avoid unlimited growth through damping, nonlinear behavior, finite driver power, or structural limits.
Example
Let
$$m=1.0,\mathrm{kg},\qquad k=100,\mathrm{N/m},\qquad c=2.0,\mathrm{kg/s},\qquad F_0=10,\mathrm N.$$
The undamped natural frequency is
$$\omega_0=10,\mathrm{rad/s}.$$
Driving at $\omega=10,\mathrm{rad/s}$ gives
$$k-m\omega^2=0,$$
so
$$A=\frac{10}{(2.0)(10)}=0.50,\mathrm m,$$
and
$$\delta=\frac{\pi}{2}.$$
For a slowly varying force, by contrast,
$$A\approx\frac{F_0}{k}=0.10,\mathrm m.$$
The much larger response near the natural frequency is the quantitative signature of mechanical resonance.