Solution (source code)

= Solution

A series connection has the same <electric current> through each element, so <complex impedances> add:
$$
\boxed{Z_{\rm s}=R+i\left(\omega L-\frac1{\omega C}\right)}.
$$
For $R>0$, define $\phi=\arg\widetilde V-\arg\widetilde I=\arg Z_{\rm s}$. Then
$$
\phi=\tan^{-1}\left(\frac{\omega L-1/(\omega C)}R\right).
$$
Above resonance, the circuit is inductive and <electric potential difference> leads current; below resonance it is capacitive and <electric potential difference> lags current. At
$$
\boxed{\omega_0=\frac1{\sqrt{LC}},\qquad f_0=\frac1{2\pi\sqrt{LC}}},
$$
the inductive and capacitive <reactances> cancel and $Z_{\rm s}=R$ is purely resistive. The same resonance condition holds for an ideal series circuit independent of the drive amplitude.