# Lagrangian of a massive particle in an electromagnetic field

I am trying to find the Lagrangian of a massive particle in an electromagnetic field using the Lorentz force: $$\vec F = q ( \vec E + \vec v \times \vec B)$$ with $$\vec E = - \nabla \phi - \frac{\partial\vec A}{\partial t}$$ and $$\vec B = \nabla \times \vec A ,$$ where $\phi(r)$ is a scalar function and $\vec A (r)$ is a vector function. Which give after a few manipulations $$\vec F = q( - \nabla \phi - \frac{d\vec A}{dt} + \nabla (\vec v \cdot \vec A))$$

I know $L = T - V$ with $T$ the kinetic energy and $V$ the potential.

I can easly find the kinetic energy $T = \frac{1}{2} m \dot{\vec{r}}^2$ but I have a problem with computing the potential: \begin{align}V &=-\int \vec{F} \cdot d \vec r \\ -\frac Vq &= \int \left(- \nabla \phi - \frac{d\vec A}{dt} + \nabla (\vec v \cdot \vec A)\right)\cdot d \vec r \\ -\frac Vq &= \int \left(- \nabla \phi - \frac{d\vec A}{dt} + \nabla (\vec v \cdot \vec A)\right) \cdot d \vec r \\ -\frac Vq &= \phi - \int \frac{d\vec A}{dt}\cdot d \vec r + \int \nabla (\vec v \cdot \vec A)\cdot d \vec r \\ -\frac Vq &= \phi + \dot {\vec r} \cdot \vec A - \int \frac{d\vec A}{dt}\cdot d \vec r \end{align}

I don't know how to compute $- \int \frac{d\vec A}{dt}\cdot d \vec r$ but since I know that $$L= \frac{1}{2} m \dot{\vec{r}}^2 + q \phi - q \vec A \cdot \dot {\vec r}$$ I can guess that $- \int \frac{d\vec A}{dt}\cdot d \vec r = 0$ but I don't understand why.

Can you help me understand it?

• You've mixed up $v$ abd $V$ in your question. In the Lorentz force $\vec{V}$ it is the velocity, and at other places it represents potential. – SRS May 8 '18 at 10:00
• just corrected the notation, the question is still clear – ohneVal May 8 '18 at 10:10
• This is e.g. derived in H. Goldstein, Classical Mechanics, Section 1.5. – Qmechanic May 8 '18 at 10:18

Well in your setting you say $\vec{A}(\vec{r})$ depends on position so the time derivative should vanish. Nonetheless keep in mind that in the general case $\vec{A}(t,\vec{r})$. Same thing goes for $\phi$ in general it can be a function of $t$ and $\vec{r}$. There is also some terms missing in the expression for $F$ coming from $\vec{v}\times\vec{B} = \vec{v}\times (\nabla\times \vec{A})$
• That is exactly what I am pointing you to. $A$ depends on position not on trajectory. Let me change the notation to make it clear. The particle will follow some trajectory $\vec{r}(t):t\rightarrow \mathbb{R}^3$ while $A$ is a potential on its own it is not evaluated at the trajectory, $A(\vec{x}):\mathbb{R}^3\rightarrow \mathbb{R}^3$. So, the lagrangian's equation of motion will take care of the rest. – ohneVal May 8 '18 at 12:02