Pure resonanceIf an undamped oscillator is driven at its resonance frequency, $\omega = \sqrt{k/m}$, the solution grows continuously with time. This is called a pure resonance. The differential equation that describes a pure resonance is, $$m\frac{d^2x}{dt^2} + kx = F_0\cos(\omega t).$$The solution has the form, $$x(t) = C \cos(\omega t +\delta) +\frac{F_0}{2\omega m}t\sin (\omega t),$$where $$\omega = \sqrt{k/m},\qquad \tan\delta = \frac{v_{x0}}{\omega x_0},\qquad C = \sqrt{x_0^2+v_{x0}^2/\omega^2}.$$Here $x_0$ is the position at $t=0$ and $v_{x0}$ is the velocity at $t=0$.
