# When is the Hamiltonian of a system not equal to its total energy?

I thought the Hamiltonian was always equal to the total energy of a system but have read that this isn't always true. Is there an example of this and does the Hamiltonian have a physical interpretation in such a case?

-

1
A large class of such examples comes from using accelerating and/or rotating frame of reference. See e.g. Herbert Goldstein, "Classical Mechanics", Chapter 2. – Qmechanic♦ Jul 5 '11 at 21:51

## 3 Answers

In an ideal, holonomic and monogenic system (the usual one in classical mechanics), Hamiltonian equals total energy when and only when both the constraint and Lagrangian are time-independent and generalized potential is absent.

So the condition for Hamiltonian equaling energy is quite stringent. Dan's example is one in which Lagrangian depends on time. A more frequent example would be the Hamiltonian for charged particles in electromagnetic field $$H=\frac{\left(\vec{P}-q\vec{A}\right)^2}{2m}+q\varphi$$ The first part equals kinetic energy($\vec{P}$ is canonical, not mechanical momentum), but the second part IS NOT necessarily potential energy, as in general $\varphi$ can be changed arbitrarily with a gauge.

-
What's a generalized potential? I've heard of a generalized force, is it related? – Dan Jul 6 '11 at 5:01

4
@Dan: Non-conservative generalized force cannot be written in terms of $Q_i=-\frac{\partial V}{\partial q_i}$, but some of them may be written as $Q_{i}=-\frac{\partial U}{\partial q_{i}}+\frac{d}{dt}\left(\frac{\partial U}{\partial\dot{q_{i}}}\right)$, then if we let $L=T-U$, $L$ will still satisfy the Lagrangian equation. The generalized potential for a charged particle is $q\varphi-q\vec{v}\cdot\vec{A}$. – C.R. Jul 6 '11 at 5:21
Actually, the Hamiltonian for a charged particle in an electromagnetic field is usually interpreted as the total energy. – Qmechanic♦ Jul 6 '11 at 14:24

1
@Qmechanic: I never encounter that kind of interpretation. As I said, the physical meaning of the first part is always kinetic energy, but the second part can be arbitrarily changed by a gauge fixing. Is total energy something variant with gauge? – C.R. Jul 7 '11 at 4:10
@Karsus Ren: As a reference to my above comment, see e.g. Herbert Goldstein, "Classical mechanics", eq. (8-26) in edition 2 or eq. (8.34) in edition 3. – Qmechanic♦ Jul 9 '11 at 15:22

The Hamiltonian is in general not equal to the energy when the coordinates explicitly depend on time. For example, we can take the system of a bead of mass $m$ confined to a circular ring of radius $R$. If we define the $0$ for the angle $\theta$ to be the bottom of the ring, the Lagrangian $$L=\frac{mR^2\dot{\theta}^2}{2}-mgR(1-\cos{(\theta)}).$$ The conjugate momentum $$p_{\theta}=\frac{\partial L}{\partial \dot{q}}=mR^2\dot{\theta}.$$ And the Hamiltonian $$H=\frac{p_{\theta}}{2mR^2}+mgR(1-\cos{\theta}),$$ which is equal to the energy.

However, if we define the $0$ for theta to be moving around the ring with an angular speed $\omega$, then the Lagrangian $$L=\frac{mR^2(\dot{\theta}-\omega)^2}{2}-mgR(1-\cos{(\theta-\omega t)}).$$

The conjugate momentum $$p_{\theta}=\frac{\partial L}{\partial \dot{q}}=mR^2\dot{\theta}-mR^2 \omega.$$

And the Hamiltonian $$H=\frac{p_{\theta}}{2mR^2}+p_{\theta}\omega+mgR(1-\cos(\theta-\omega t)),$$ which is not equal to the energy (in terms of $\dot{\theta}$ it has an explicit dependence on $\omega$).

-

Goldstein's Classical Mechanics (2nd Ed.) pg. 349, section 8.2 on cyclic coordinates and conservation theorems' has a good discussion on this. In his words:

The identification of H as a constant of the motion and as the total energy
are two separate matters.  The conditions sufficient for one are not
enough for the other.

He then goes on to provide an example of a 1-d system in which he chooses two different generalized coordinate systems. For the first choice, H is the total energy while for the second choice H ends up being just a conserved quantity and NOT the total energy of the system.

Check it out. It's a very nice example.

-

1
What is the definition of energy here? Is it more than 'what Noethers theorem give you if you consider time translations'? I thought this quantity always is the Hamiltonian. – Nick Kidman Feb 12 '12 at 18:39
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 15, "mathjax_display_tex": 7, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": false, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9164398908615112, "perplexity_flag": "head"}