In Cartesian coordinates the Lagrangian is
Introduce a Lagrange multiplier for . The Euler-Lagrange equations become
or
Differentiating the constraint twice gives
Taking the scalar product of the vector equation with therefore yields
Substitution gives
For , the equations have the first integrals
Writing and gives and . Hence every trajectory is
These are helices of unit angular frequency about a line parallel to the axis, including circles when and a straight line when .
The Lorentz force and Newton's second law give
Writing , the component equations are
The initial velocity therefore gives
and integration with the initial position gives
This is helical motion in a uniform magnetic field: a helix of radius around the line , , with its axis parallel to the magnetic field.
/media/past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2019/ia/paper-4-magnetic-helix.png