Phase of a negatively charged driven oscillator (source code)

= Phase of a negatively charged driven oscillator
{title2=$\phi=\pi-\operatorname{atan2}(2\gamma\omega,\omega_0^2-\omega^2)$}

For $\ddot z+2\gamma\dot z+\omega_0^2z=(qE_0/m)\cos\omega t$, the $e^{i\omega t}$ convention gives complex displacement amplitude $\widetilde z=(qE_0/m)/(\omega_0^2-\omega^2+2i\gamma\omega)$. If the real amplitude is defined nonnegative, the phase is $-\delta$ for $q>0$ but $\pi-\delta$ for $q<0$, where $\delta=\operatorname{atan2}(2\gamma\omega,\omega_0^2-\omega^2)$. An electron's low-frequency displacement is opposite to the electric field; its high-frequency displacement is in phase. The induced <electric dipole moment> $qz$ instead has phase $-\delta$ for either sign of charge. A signed amplitude can absorb the extra $\pi$, but that convention must be stated.