Forced harmonic oscillator (source code)

= Forced harmonic oscillator
{wiki}

A <forced harmonic oscillator> is a linear restoring system acted on by an external <force>:
$$
m\ddot x+b\dot x+kx=F(t),\qquad m,k>0,\quad b\geq0.
$$
Its general response is the sum of a particular forced response and a homogeneous transient fixed by the <initial conditions>. It need not always contain both a natural-frequency oscillation and a forcing-frequency oscillation: the transient can vanish, and the force can be nonperiodic.

For $F(t)=F_0\cos\omega t$ with $b>0$, a steady response is $x=\operatorname{Re}(\chi(\omega)F_0e^{i\omega t})$, where
$$
\chi(\omega)=\frac1{k-m\omega^2+ib\omega}.
$$
Substitution verifies this <mechanical susceptibility>. The natural motion decays, leaving the forcing frequency in the long-time response. With no damping and forcing exactly at $\omega_0=\sqrt{k/m}$, zero initial data instead give $x=F_0t\sin(\omega_0t)/(2m\omega_0)$. Its linearly growing envelope is <resonance>, not a bounded steady oscillation. The model separates the drive, the initial transient and the role of energy loss.