Solution (source code)

= Solution

The <Euler-Lagrange equations> are
$$
\frac d{dt}\left(m\dot r_i+\frac ec A_i\right)=\frac ec\dot r_j\partial_iA_j.
$$
Using time <independence> of the <vector potential> gives $m\ddot r_i=(e/c)\dot r_j(\partial_iA_j-\partial_jA_i)$, which is the component form of
$$
\boxed{m\ddot{\mathbf r}=\frac ec\dot{\mathbf r}\times\mathbf B.}
$$
Taking its scalar product with the velocity shows $\dot T=m\dot{\mathbf r}\cdot\ddot{\mathbf r}=0$: \b[the <kinetic energy> is constant], since the magnetic force does no work.

For $\mathbf B=(0,0,F'(x))$, the equations give $m\ddot y=-(e/c)F'(x)\dot x$ and $\ddot z=0$. Thus $mc\dot y+eF(x)=-C$ and $\dot z=v_z$ are constants of motion. Substitution into $2T/m=\dot x^2+\dot y^2+\dot z^2$ yields
$$
\boxed{\dot x^2=\frac{2T}{m}-\frac{(eF(x)+C)^2}{m^2c^2}+D,\qquad D=-v_z^2.}
$$
The constant $D$ in this representation is nonpositive. The gauge choice $\mathbf A=(0,F(x),0)$ also makes the conserved transverse canonical momenta explicit.