Response function and light-damping sketch (source code)

= Response function and light-damping sketch

Use the $e^{i\omega t}$ convention for the harmonic <force> and displacement <complex amplitudes>. Substitution in the <forced harmonic oscillator> equation gives
$$
(k-m\omega^2+ib\omega)x_0=F_0,\qquad
\boxed{R(\omega)=\frac1{k-m\omega^2+ib\omega}}.
$$
Its magnitude and <phase> relative to the <force> are
$$
|R|=\frac1{\sqrt{(k-m\omega^2)^2+b^2\omega^2}},\qquad
\phi=-\operatorname{atan2}(b\omega,k-m\omega^2).
$$
At zero <frequency>, $|R|=1/k$ and $\phi=0$. At $\omega_0=\sqrt{k/m}$, $\phi=-\pi/2$; at high <frequency> the <phase> approaches $-\pi$. For light <viscous damping>, the <quality factor> $Q=m\omega_0/b$ is large and there is a tall narrow displacement peak close to $\omega_0$.