Given the following definition of the Magnetic Vector Potential $\vec{A}$: $$\vec{A} \ \mid \ \vec{B}=\vec{\nabla}\times\vec{A}$$ We can derive (but I don't know how) that the Lagrangian in presence of an electromagnetic field is: $$\mathcal{L}=K-V=\frac{1}{2}mv^2-q\Phi+q\vec{v}\cdot\vec{A} \tag{1}$$ where $K$ is the kinetic energy and $V$ is the potential energy. The Lagrangian is by definition the difference between $K$ and $V$, but $q\Phi$ is of course the potential energy of the electric field, this must mean that: $$-q\vec{v}\cdot\vec{A} \tag{2}$$ is the potential energy of the magnetic field. I now have two distinct but related problems:
- How can we prove that (2) is the potential energy of the magnetic field?1
- How can we prove that (1) is the correct formula for the Lagrangian in presence of an electromagnetic field?
Of course, these two questions are strongly linked: if you answer one of them you have also basically answered the other one.2
All this seems to me a really important and fundamental problem. But, paradoxically, I have not found any source providing a direct, simple and complete answer to it; that's what I am searching here.
[1]: Seems impossible to me to prove such a statement; because I think the statement itself is wrong. The magnetic field has non-zero curl: shouldn't this mean that its potential energy is not definable?
[2]: There is also the possibility that the second question can be answered without proving the first statement true. Maybe (2) is not the magnetic potential energy, but also (somehow) $q\Phi-q\vec{v}\cdot\vec{A}$ is the total electromagnetic potential energy of an electromagnetic field; in this case, I would like to understand how to prove it.
Edit: In response to mike stone's comment and Emmy's answer: In my textbook the Lagrangian, in the context of non-relativistic mechanics, is defined as: $$\mathcal{L}=K-V$$ but not only on my textbook! Take a look at this section in the related wikipedia page: citing directly:
It is nevertheless possible to construct general expressions for large classes of applications. The non-relativistic Lagrangian for a system of particles can be defined by $$L=T-V$$
Is this wrong? Seems strange.
Also: if the Lagrangian is indeed any function that gives back the correct Newtonian equations of motion once put into the Euler-Lagrange equations then why use the lagrangian formalism in the first place? The beauty of this formalism is that by knowing the energies we can derive the equation of motion; if this does not hold, at random, then I am forced to remember the arbitrary correct form of the Lagrangian in every given case or to derive it every time from Newtonian mechanics, that is not easy to do and also seems to kill half the purpose of the Lagrangian formalism.