Solution (source code)

= Solution

In a uniform-field region, $z$ is cyclic and $\gamma$ is constant. Its equation is $d(\gamma m\dot z)/dt=0$. The radial <Euler-Lagrange equation> is
$$
\frac{d}{dt}(\gamma m\dot\rho)=\gamma m\rho\dot\theta^2+qB\rho\dot\theta,
$$
so with $\dot\theta=-\Omega$ and $qB/(\gamma m)=2\Omega$,
$$
\boxed{\ddot z=0,\qquad\ddot\rho+\Omega^2\rho=0\quad\text{inside}}.
$$
The radial equation applies on intervals with a regular signed cylindrical-coordinate description; the Cartesian solution handles axis crossings.

In a field-free region, the equations are
$$
\boxed{\ddot z=0,\qquad\ddot\rho=\rho\dot\theta^2,\qquad
\frac{d}{dt}(\gamma m\rho^2\dot\theta)=0}.
$$
For this particle $p_\theta=0$, so $\dot\theta=0$ and $\ddot\rho=0$ outside, until a coordinate change is needed at an axis crossing.

\b[Axial <velocity> is constant within each uniform region, but not across the ends.] In a smooth fringe,
$$
\frac{d}{dt}(\gamma m\dot z)=\frac q2\rho^2\dot\theta B'(z).
$$
The entrance develops an azimuthal speed $|\Omega|\rho_0$ while radial <velocity> remains zero. Conservation of total speed gives
$$
\boxed{\dot z_{\rm in}=w=\sqrt{v^2-\Omega^2\rho_0^2}}.
$$
Forward passage presumes the radicand is positive. The exit fringe changes axial <velocity> again. Neglecting these small changes is a <paraxial approximation>, requiring $|\Omega|\rho_0\ll v$, rather than an exact consequence of cylindrical <symmetry>.