#### Cryo

Gold Member

- 158

- 65

- Summary
- Can you please check my result for the Hamiltonian of the chared particles and electromagnetic field.

**Summary:**

I have found the Hamiltonian for the free particles and the electromagnetic field (##\mathbf{E}## - electric, ##\mathbf{B}## - magnetic) to be (non-relativistic !!!):

##H=\sum_i \frac{m \dot{r}_i^2}{2} + \int d^3 r \left(\frac{\epsilon_0}{2} E^2 + \frac{1}{2\mu_0} B^2\right)## (1)

where ##\sum_i## is over all the particles, ##m## is the mass of the particles (identical), and ##\dot{\mathbf{r}}_i## is the velocity of ##i##-th particle. Integral ##\int d^3 r## runs over volume large enough for fields to vanish outside it (all particles are containted within this volume).

Is this a correct result? Normally one has things like ##\mathbf{J}.\mathbf{A}## (for current density ##\mathbf{J}## and vector potential ##\mathbf{A}##), but here I am considering both charges and fields to be completely free, thus it seems reasonable that one either stores energy as kinetic energy of charges, or in the electro-magnetic field, which includes the field produced by the charges.

**Details. Lagrangian and equations of motion**

I start with the Lagrangian for the full system:

##L=\sum_i \frac{m\dot{r}_i^2}{2} + \int d^3 r \left(\frac{\epsilon_0}{2} E^2 - \frac{1}{2\mu_0} B^2 + \mathbf{A}.\mathbf{J} - \phi \rho\right)##

Where scalar and vector potentials are ##\phi## and ##\mathbf{A}##, whilst charge and current densities are ##\rho## and ##\mathbf{J}##. All of these are to be varied in order to bring action to the extremum.

Varying the scalar and vector potential we can readily obtain the Maxwell's equations for vacuum + charge and current density, assuming ##\mathbf{E}=-\boldsymbol{\nabla}\phi-\dot{\mathbf{A}}## and ##\mathbf{B}=\boldsymbol{\nabla}\times\mathbf{A}##. Substituting

##\mathbf{J}=\sum_i q\dot{\mathbf{r}} \delta\left(\mathbf{r}-\mathbf{r_i}\right)##

##\rho=\sum_i q\delta\left(\mathbf{r}-\mathbf{r_i}\right)##

With ##q## being the electrical charge of each particle, we can reduce the Lagrangian to:

##L=\sum_i \left[\frac{m\dot{r}_i^2}{2} + q\dot{\mathbf{r_i}}.\mathbf{A}_i-q\phi_i\right] + \int d^3 r \left(\frac{\epsilon_0}{2} E^2 - \frac{1}{2\mu_0} B^2 \right)## (2)

Where ##\phi_i=\phi\left(t,\,\mathbf{r}_i \right)## and same for vector potential.

This, in turn permits deriving the forces on each charge by variation with respect to ##\mathbf{r_i}^k##

##m\ddot{\mathbf{r}}_i=q\mathbf{E}_i + q \mathbf{\dot{r}}_i\times\mathbf{B}_i## (3)

**Details. Hamiltonian**

I have obtained Hamiltonian by finding what quantity was conserved as a result of invariance with respect to time-translations, i.e. I started with

##\frac{dL}{dt}=\dots##

and simplified it until I had ##\frac{d}{dt}\left(L-\sum_i \left(q\dot{\mathbf{r}}_i.\mathbf{A}_i - q\phi_i\right)+\int d^3 r\frac{1}{\mu_0}B^2 \right)=0##

It is also easy to verify the reverse:

##\frac{dH}{dt}=\sum_i \mathbf{\dot{r}}_i.m\mathbf{\ddot{r}}_i + \int d^3 r \left(\epsilon_0 \mathbf{E}.\mathbf{\dot{E}}+\frac{1}{\mu_0} \mathbf{B}.\mathbf{\dot{B}}\right)##

From Maxwell's equations we find (ignoring surface effects):

##\int d^3 r \left(\mathbf{E}.\epsilon_0 \mathbf{\dot{E}}\right)=\int d^3 r \left(\frac{-1}{\mu_0}\mathbf{B}.\mathbf{\dot{B}}-\mathbf{E}.\mathbf{J}\right)##

Thus, using Eq. (3):

##\frac{dH}{dt}=\sum_i \mathbf{\dot{r}}_i.\left(q\mathbf{E}_i+q\mathbf{\dot{r}}_i\times\mathbf{B}_i\right)+ \int d^3 r \left(-\mathbf{E}.\mathbf{J}\right)=0##

So, indeed this quantity is conserved. Is this the Hamiltonian?