# Lagrangian of a charged particle in a magnetic field (specific problem)

I have to determine the Lagrangian and the angular velocity $$\omega = \dot\theta$$, in cylindrical coordinates $$(r, \theta, z)$$, of a electron with mass $$m$$ and charge $$-e$$, wich is experiencing a magnetic field $$\textbf{B} = \nabla \times \textbf{A}$$, where $$\textbf{A}$$ is given by:

$$$$\textbf{A} = \frac{f(r)}{r}\hat{\theta}$$$$

The initial position of the electron is $$(r_0, 0, 0)$$, and the initial velocity only have components on the $$(r,z)$$ plane.

Here's what I did:

I wrote the position vector in cylindrical coordinates : $$\textbf{r} = (r, \theta, z)$$, and the velocity vector : $$\dot{\textbf{r}} = (\dot r, r \dot \theta, \dot z)$$

I know that the Lagrangian of a charged particle in a electromagnetic field can be writen as:

$$$$L = \frac{1}{2}mr^2 \space -q(\phi \space - \dot{\textbf{r}} \space \cdot \textbf{A})$$$$

So, as the scalar potential is zero in this case, it just simply vanishes away from the Lagrangian. Squaring the module of the velocity vector we have:

$$$$r^2 = \dot r^2 + r^2 \space \dot\theta^2 \space + \dot z^2$$$$

And the scalar product between the velocity vector and the vector potential is:

$$$$\dot{\textbf{r}} \space \cdot \textbf{A} = (\dot r, r \dot \theta, \dot z) \space \cdot (0, \frac{f(r)}{r}, 0) = \dot \theta \space f(r)$$$$

So I can write the Lagrangian as:

$$$$L = \frac{1}{2}m \space(\dot r^2 + r^2 \dot\theta^2 + \dot z^2) \space +q \dot \theta f(r)$$$$

Is this Lagrangian correct? If so, I know that I need to use the Euler-Lagrange equation in order to find the equations of motion, and consequently the angular velocity. But probably I'm deriving something wrong, and I'm not getting there.

Your Lagrangian is fine. The good news is that this Lagrangian is independent of the variables $$\theta$$ and $$z$$, and it depends only on their first derivative: $$L = L\Big(\,r,\, \frac{dr}{dt},\, \frac{d\theta}{dt}, \, \frac{dz}{dt}\,\Big)$$ Such variables are called cyclic, and therefore this particular Lagrangian is a special case of a Lagrangian with continuous symmetries, which by Noether's theorem yield conservation laws (i.e. first integrals of motion). Here, however, thins are simple and there is no need for Noether's theorem. All you have to do, in order to find the angular velocity $$\omega = \frac{d\theta}{dt}$$, is to write down the Euler-Lagrange equation $$\frac{d}{dt} \left(\,\frac{\partial L}{\partial \dot{\theta}}\Big(\,r,\, \frac{dr}{dt},\, \frac{d\theta}{dt}, \, \frac{dz}{dt}\,\Big)\, \right) = \frac{\partial L}{\partial {\theta}}\Big(\,r,\, \frac{dr}{dt},\, \frac{d\theta}{dt}, \, \frac{dz}{dt}\,\Big)$$ and to realize that the right hand side is zero, plus the equation depends only on $$r$$ and the first derivative of $$\theta$$ (no other variables or their derivatives are involved). Therefore, the equation reduces to $$\frac{d}{dt} \left(\,\frac{\partial L}{\partial \dot{\theta}}\Big(\,r,\, \frac{dr}{dt},\, \frac{d\theta}{dt}, \, \frac{dz}{dt}\,\Big)\, \right) = 0$$ Consequently, you can integrate it once with respect to $$t$$ and obtain the simplified equation $$\frac{\partial L}{\partial \dot{\theta}}\Big(\,r,\, \frac{dr}{dt},\, \frac{d\theta}{dt}, \, \frac{dz}{dt}\,\Big) = \text{const}$$ Since, the left-hand side is equal to the same constant for any value of the time argument $$t$$, it should be the same as when $$t=0$$, so $$\frac{\partial L}{\partial \dot{\theta}}\Big(\,r,\, \frac{dr}{dt},\, \frac{d\theta}{dt}, \, \frac{dz}{dt}\,\Big) = \frac{\partial L}{\partial \dot{\theta}}\Big(\,r_0,\, \frac{dr}{dt}(0),\, \frac{d\theta}{dt}(0), \, \frac{dz}{dt}(0)\,\Big)$$ Since you are given information about the initial conditions, you can calculate the value of the right-hand side and solve the equation for the angular velocity $$\frac{d\theta}{dt} = \omega$$ in the left side.