Phase matching for a displacement referenced driven oscillator (source code)

= Phase matching for a displacement referenced driven oscillator
{title2=$(k-m\omega^2)\sin\phi_0=m\gamma\omega\cos\phi_0$}

For the <forced harmonic oscillator> $m\ddot z+m\gamma\dot z+kz=F_0\cos(\omega t+\phi_0)$, a response $z=A\cos\omega t$ requires $A(k-m\omega^2)=F_0\cos\phi_0$ and $Am\gamma\omega=F_0\sin\phi_0$. Squaring and adding gives the <amplitude> $A=F_0/\sqrt{(k-m\omega^2)^2+(m\gamma\omega)^2}$ for positive $A,F_0$. The two coefficient equations determine the full quadrant of the forcing <phase>, while their ratio alone can lose that information. In particular the <amplitude> cannot generally be independent of damping: at $m=k=F_0=\omega=1$ and $\phi_0=\pi/2$, it is $A=1/\gamma$.