Solution (source code)

= Solution
{c}

In <cylindrical coordinates>, $\theta=\omega t$ and $z=r^2/(2a)$. Thus
$$
\dot z=\frac ra\dot r,\qquad \ddot z=\frac{r\ddot r+\dot r^2}{a}.
$$
The <acceleration> is
$$
\mathbf A=(\ddot r-r\omega^2)\mathbf e_r+2\omega\dot r\mathbf e_\theta+\frac{r\ddot r+\dot r^2}{a}\mathbf e_z.
$$
A <tangent vector> along the wire is $\mathbf t=\mathbf e_r+(r/a)\mathbf e_z$. Because the wire is smooth, its <constraint force> is <orthogonal> to $\mathbf t$. Taking the <dot product> of <Newton's second law> with $\mathbf t$ eliminates that <force>; <gravitational weight> contributes $-mgr/a$. Hence
$$
m\left[\ddot r-r\omega^2+\frac r{a^2}(r\ddot r+\dot r^2)\right]=-\frac{mgr}{a}.
$$
Multiplying by $a^2/m$ gives
$$
\boxed{(a^2+r^2)\ddot r+r\dot r^2-a^2\omega^2r=-agr.}
$$