# Is the Hamiltonian always the total energy?

• I

## Main Question or Discussion Point

I'm working on some classical mechanics and just got a question stated:

Is the Hamiltonian for this system conserved? Is it the total energy?

In my problem it was indeed the total energy and it was conserved but it got me thinking, isn't the Hamiltonian always the total energy of a system when you are working with classical dynamics? My lecture notes tell me that "this and that is known as the Hamiltonian and it is usually identified with the total energy of the system". Could anyone give me an example when this is not the case?

Related Classical Physics News on Phys.org
Twigg
Gold Member
There's a few different situations in which the Hamiltonian isn't the total energy. Some are reasonable, others are gnarly. The simplest examples of Hamiltonians that aren't the total energy arise in optics where it makes more sense to use a Hamiltonian derived from Fermat's principle treating optical path length as the action. The Hamiltonian is obtained by taking the Legendre transform of the Lagrangian (which is just the rate at which the optical path length grows). I'd recommend you check out Wikipedia's page on Hamiltonian optics for more details.

The messier cases of Hamiltonians that aren't total energies arise when you invoke a non-holonomic constraint when you define the momentum and Hamiltonian. The most famous example of this is the classical Hamiltonian for a particle moving in an arbitrary magnetic field. The canonical momentum isn't the kinetic momentum of the particle, instead it's P = mv + qA where A is the magnetic vector potential at that point. Additionally, the potential term involves a velocity-dependent integral, so you end up with a "kinetic energy" that depends on space and a "potential energy" that depends on the path taken and its velocity.

$H = \frac{1}{2m} (m \vec{v} + q \vec{A})^{2} + q \Phi - \int \nabla (q\vec{v} \cdot \vec{A}) \cdot d\vec{r}$

I may have messed up the last term. Point is that it's velocity-dependent and depends on the A-field, which has gauge freedoms that make this Hamiltonian somewhat non-physical. But, physical or not, Hamiltonians have a very important role in calculations. The point of a Hamiltonian isn't to tell us about energy, the point is that a Hamiltonian is a function you can stick into a Poisson bracket to generate equations of motion for any function of the canonical coordinates. It's a single function that tells you how the whole system moves. So long as it meets that criterion, you can use whatever Hamiltonian you want.

Thanks for taking the time and explain all this! It answers my questions very well. :)