A charged particle moves in a plane subject to the oscillatory potential A charged particle moves in a plane subject to the oscillatory potential:
$U(r)=\frac{m\omega^2 r^2}{2}$
There is also a constant EM-field described by:
$\vec{A}=\frac{1}{2}[\vec{B}\times\vec{r}]$
where B is normal to the plane.
This produces the Lagrangian:
$L=\frac{m}{2}\dot{\vec{r}}^2+\frac{e}{2}\dot{\vec{r}}\vec{A}-U(r)$
Now my friend says we need to transform this into polar coordinates and that produces:
$L=\frac{m}{2}(\dot{r}^2+r^2\dot{\phi}^2)-mr^2\omega_L\dot{\phi}-U(r)$
where $\omega_L$ is the Larmor precession frequency:
$\omega_L=-\frac{eB}{2mc}$
My question is, How does he get this transformation?  I don't really understand where the second term is coming from in the mechanical kinetic energy.
 A: In polar coordinates $d\vec{r}=\hat{e}_r dr+\hat{e}_{\phi}rd\phi$. Devide it by $dt$ and you will have the particle velocity $\dot{\vec{r}}$. Square the latter and you will get the kinetic energy.
A: $\newcommand{\er}{\hat e_r} \newcommand{\et}{\hat e_\tau} \newcommand{\d}{\dot} \newcommand{\m}{\frac{1}{2}m} $
This one gave me a feeling of déjà vu, since  I's already answered a similar one. Here's the relevant part of the derivation:
My $\theta$ is your $\phi$\ (usually $\phi$ is used for the azimuthal angle in spherical coordinates--which are a 3D extension of polar coordinates)

In radial coordinates, $\d\er=\d\theta \et$, and (useless here) $\d\et= -\d r \er$. $\er,\et$ are unit vectors in radial and tangential directions respectively. Due to this mixing of unit vectors (they move along with the particle), things get a little more complicated than plain 'ol cartesian system, where the unit vectors are constant.
  $$\vec p= r\er$$ 
  $$\therefore \vec v=\d{\vec p}= \d r\er + r\d\er=\d r \er + r\d\theta\et$$
  $$\therefore v^2= \vec v\cdot\vec v= \d r^2+r^2\d\theta^2$$

$$\therefore KE=\frac12m\vec v\cdot\vec v=\frac12m|\vec v|^2=\frac12m (\d r^2+r^2\d\theta^2)$$
So basically it's just a few steps of math that he neglected (IIRC this is usually considered an identity).
