Solution (source code)

= Solution

Set $\Delta=\theta-\theta_B$ and $u=z-b\theta_B$. Applying the <Euler-Lagrange equations> separately to $r,\theta,z,\theta_B$ gives
$$
\boxed{\begin{aligned}
m(\ddot r-r\dot\theta^2)&=-k(r-a\cos\Delta),\\
\frac{d}{dt}(mr^2\dot\theta)&=-kar\sin\Delta,\\
m\ddot z&=-ku,\\
M(a^2+b^2)\ddot\theta_B&=k(ar\sin\Delta+bu).
\end{aligned}}
$$
For example, $\partial L/\partial\theta=-kar\sin\Delta$ whereas $\partial L/\partial\theta_B=kar\sin\Delta+kb u$; these signs also follow from equal and opposite <spring> <forces> projected on the permitted bead motion. The angular particle equation can equivalently be written $m(r^2\ddot\theta+2r\dot r\dot\theta)=-kar\sin\Delta$. The factor $M(a^2+b^2)$ is the bead's inertia with respect to the helical coordinate, rather than its <moment of inertia> about the axis alone.