Hamiltonian as Total Energy
Every physics student eventually writes without thinking — and most of the time nature lets it slide. The Hamiltonian of a pendulum, a planet, an oscillator is the total mechanical energy, and the habit hardens into a definition. Then a bead on a motor-driven rotating wire comes along: its Hamiltonian is perfectly conserved while its mechanical energy grows without bound, the motor pouring in joules that serenely ignores. Or a charge in a magnetic field: the potential in its Lagrangian depends on velocity — which "should" break the energy identity — yet comes out exactly equal to the energy anyway. Clearly the rule is subtler than the habit. This article states the rule exactly. The Hamiltonian equals if and only if two structural conditions hold together: the kinetic energy is a homogeneous quadratic in the generalized velocities — which is the fingerprint of scleronomic, time-independent constraints — and the potential is velocity-independent. The engine of the proof is Euler's theorem on homogeneous functions, which sorts the kinetic energy into pieces and delivers the master identity : the energy identity survives exactly when the odd pieces vanish. Just as important is what the rule does not say. Whether equals the energy and whether is conserved are logically independent properties, with different hypotheses and independent failure modes — systems exist in all four combinations. Learning to check the two switches separately, in canonical variables, is the practical skill this article installs; it is the difference between using the Hamiltonian and being ambushed by it.
- The Hamiltonian is the Legendre transform of the Lagrangian with respect to the generalized velocities, and it generates the canonical equations of motion.
- equals the total mechanical energy if and only if two conditions both hold: the kinetic energy is a homogeneous quadratic form in the velocities, and the potential is velocity-independent.
- The kinetic-energy condition is equivalent to scleronomic (time-independent) constraints, so that the coordinate transformation contains no explicit time dependence.
- Even when , the Hamiltonian may still be conserved; and even when , energy may fail to be conserved if depends explicitly on time.
- Conservation of and the identity are logically independent statements — one concerns , the other concerns the structure of and .
- Key idea: iff the kinetic energy is a homogeneous quadratic in the velocities (scleronomic constraints) AND the potential is velocity-independent; conservation of is the separate condition .
Where this lives today
The conserved-but-not-energy Hamiltonian is a daily working tool. Spacecraft navigators plot zero-velocity surfaces from the Jacobi constant — the three-body cousin of the bead's — to decide which lunar and interplanetary gateways are open at a given energy; the low-energy transfer trajectories threading them exist precisely because the rotating-frame is conserved while the lab-frame energy is not. The same structure prices every centrifuge, spin-coater, and rotating machine: the effective potential is the engineer's centrifugal energy budget, with the motor as counterparty. In quantum mechanics the identification students take for granted — "the Hamiltonian operator is the energy observable" — inherits exactly this article's fine print. For a particle in a static trap it is true for the classical reason; for driven systems (lasers on atoms, modulated lattices) is not conserved and "quasi-energy" takes over, the Floquet-theory echo of the ramped-trap quadrant; and in rotating frames — trapped ions, rotating BECs — the working operator is , the quantum Jacobi integral, complete with its centrifugal term.
The physical picture
Start with the free particle, where the identity is transparent. The combination is a velocity-weighted momentum: — twice the kinetic energy. Subtract and the Hamiltonian is . The entire theorem hides in that factor of two, and the factor of two is a homogeneity statement: it works because is quadratic in , so differentiating and re-multiplying by doubles it. Euler's theorem on homogeneous functions is exactly this bookkeeping done honestly for coordinates — and it immediately exposes when the doubling fails. When does pick up non-quadratic pieces? When a constraint moves on its own schedule. A wire spun by a motor, a pivot driven up and down, a frame that rotates — any transformation with explicit time dependence feeds terms into that are linear () or independent () of the generalized velocities. Those are the motor's fingerprints in the kinetic energy, and they are exactly what spoils : the Hamiltonian becomes , the energy as reckoned in the constraint's own co-moving frame, not the lab's. Hold two slogans, because they separate two frequently-confused time dependences. Time in the Lagrangian breaks conservation — that is , and it kills . Time in the constraints breaks the energy identity — that is , and it makes . They are independent switches, and the four combinations all occur:
Geometrically, none of this dethrones the Hamiltonian. is whatever function generates the canonical flow — that is its job description from The Hamiltonian Function. That it often coincides with the energy is a happy structural accident of scleronomic, velocity-independent systems. Phase portraits are drawn from level sets of , energy or not; the bead's conserved below organizes its runaway motion perfectly while the energy meter spins.
The anatomy of T, and the master identity
To see exactly what is made of, sort the kinetic energy by powers of the generalized velocities. For particles at positions , the chain rule gives , and squaring produces exactly three species of term:
where: — the familiar quadratic form with mass matrix ; — linear in velocities, sourced by cross terms between and the constraint's own velocity ; — velocity-independent, the kinetic energy the constraint imposes even on a bead frozen in its generalized coordinates. Scleronomic constraints () force : the fingerprint terms exist only when the scaffolding moves. The same anatomy, viewed from the Lagrangian side as the energy function , is developed in The Energy Function and Jacobi Integral; here we watch it land on phase space. The tool that converts this sorting into a statement about is Euler's homogeneous-function theorem: if is homogeneous of degree in the variables , then . Applied degree by degree to (1):
where: each piece is simply multiplied by its degree — 2, 1, and 0 — so drops out entirely. The free particle's factor of two was equation (2) with only present.
We are computing what the Legendre transform actually returns for the most general natural Lagrangian with as in (1), and extracting the exact conditions for . The strategy: evaluate with Euler's theorem, subtract , and compare against piece by piece. Watch which ingredients enter where — the potential's velocity-independence is used at one specific step, and if depends on the accounting changes there and only there.
Step 1. Momenta first: , using velocity-independence of . Then by Euler's theorem (2):
Why V must not carry velocities: otherwise acquires and the left side picks up extra terms — the electromagnetic case below shows exactly this happening, with a conspiratorial cancellation.
Step 2. Subtract the Lagrangian :
Step 3. Collect — the cancels identically, the flips sign:
Why the linear piece vanishes from H entirely: degree-1 terms are their own Euler-weighted derivative, so the transform is blind to them — they reshape the momenta but not the Hamiltonian's value. The degree-0 piece, untouched by the derivative, survives with the minus sign of the subtracted L: it behaves like an added potential — the centrifugal potential of the rotating-frame articles.
Step 4. Read off the theorem. The energy is , so . Since and are independent structures, for all states iff both vanish — iff the constraints are scleronomic — and Step 1 already required velocity-independent. Both conditions, jointly necessary and sufficient, exactly as advertised. Verified: matches Goldstein §2.7 and §8.2 and Landau–Lifshitz §6–7; scleronomic limit collapses to ; recomputed for the rotating bead below, where , gives as the derivation predicts.
Conservation is the other switch, settled by a different derivative. From the evolution identity of The Hamiltonian Function:
where: the verdict depends only on whether the final assembled Lagrangian carries an explicit clock — not on how the constraints entered. A rotating wire at constant produces a rheonomic whose pieces conspire into a time-independent : identity broken, conservation intact. Ramp and the clock enters explicitly: both broken. The quadrant chart is just equation (3) crossed with the master identity.
Which switch, which check
| question | check | verdict source |
|---|---|---|
| is ? | any or in the kinetic energy? any in ? | master identity, Derivation A |
| is conserved? | explicit in the assembled (equivalently )? | equation (3) |
| what is conserved when ? | , the Jacobi integral | rotating-frame energy bookkeeping |
| who pays the difference? | the constraint's driver (motor, ramp) | power with fixed |
The classic counterexample: bead on a rotating wire
One system carries the whole lesson. A frictionless bead slides on a straight horizontal wire forced by a motor to rotate at constant angular velocity about a vertical axis through one end. The bead's angle is enslaved to the clock, ; the single generalized coordinate is the distance along the wire.
Go deeper · Derivation B · 1 minBead on a uniformly rotating wire — conserved H that is not the energy
The goal is the Hamiltonian of the driven bead in canonical variables, the demonstration that it is conserved, and the identification of what it physically is — the standard counterexample every mechanics student should be able to reproduce cold. The strategy: build with the constraint already substituted, transform, then apply both switches. Watch the sign of the term flip as it moves from to — that flip is Step 3 of the master derivation happening live.
Step 1. Kinematics with : the bead's speed obeys , so with on the horizontal wire,
Sort it: , , — rheonomic fingerprint present.
Step 2. Momentum and transform: (the term, velocity-free, contributes nothing), so and
Why the minus sign: exactly the master identity — the transform flips the velocity-free kinetic piece. The result looks like a particle in an inverted parabola: the centrifugal potential , here generated by pure bookkeeping rather than by decree (compare the rotating-frame construction in the centrifugal-force article).
Step 3. Apply the switches. Conservation: no explicit anywhere in , so by (3) — conserved. Identity: the energy is , so
Conserved, and definitely not the energy: the upper-right quadrant of the chart.
Step 4. Interpret both books. The canonical equations for this give — centrifugal runaway, grows roughly exponentially — so grows too, every joule wired in by the motor that holds fixed against the bead's increasing moment of inertia. , blind to the motor by construction, is the co-rotating energy: kinetic energy of sliding minus the centrifugal well. It is the one-degree-of-freedom Jacobi integral, the same bookkeeping that gives mission designers their Jacobi constant in the three-body problem. Verified: from the canonical equations matches the Euler–Lagrange result; recomputed constant along solutions; agrees with Goldstein §2.7 worked discussion and the Jacobi-integral article of this track.
The consoling surprise: the magnetic case
Velocity-dependent potential — so the energy identity should fail. It does not, and the reason it does not is worth owning.
Go deeper · Derivation C · 2 minCharge in an electromagnetic field — H equals the energy despite the velocity-dependent potential
We are testing the master theorem's second hypothesis on the one important system that violates it: , linear in velocity. The goal is to see precisely how the accounting changes and why the final Hamiltonian is nonetheless the true mechanical energy. The strategy: rerun the Euler-weighted sum, letting the potential contribute to the momenta as it must. The moral to watch for: linear velocity dependence is special — it shifts momenta without shifting the Hamiltonian's value, exactly as the term did.
Step 1. Lagrangian ; canonical momentum (from Generalized Momenta). The velocity-weighted sum:
Why this deviates from (2): the potential's linear term donated to the momentum, so the weighted sum picks up its Euler degree-1 copy — one power, one copy.
Step 2. Subtract the Lagrangian:
Why the vector potential vanished: its contribution entered once through the momentum and once through , with equal weight because it is degree 1 in velocity — a perfect cancellation. Only the degree-0 part of the potential, , survives into the value of .
Step 3. Identify the result. is the kinetic energy plus the electric potential energy — the total mechanical energy of the charge, since the magnetic force, always perpendicular to , stores no energy. In canonical variables this same value reads , as derived in The Hamiltonian Function. For static fields nothing depends on : conserved and equal to the energy — upper-left quadrant, despite flunking the theorem's hypotheses.
Step 4. Reconcile with the master theorem. The theorem's conditions are sufficient machinery for ; they fail here, but the failure is of the uniquely benign kind: a potential exactly linear in velocity acts like a term — reshaping momenta, invisible in the Hamiltonian's value. Any quadratic velocity dependence in would have broken the identity for real. Verified: matches Goldstein §8.1 and the provenance checks of the EM articles; recovers the plain case; speed (hence ) is constant in a pure magnetic field, consistent with conserved when .
Limiting cases
| Case | Result | Meaning |
|---|---|---|
| scleronomic + | the textbook identity, both hypotheses honoured | |
| scleronomic + | but | identity without conservation |
| rheonomic, constant drive | conserved | Jacobi integral; motor pays the difference |
| rheonomic, clocked drive | , not conserved | no free bookkeeping; integrate the power |
| potential linear in (EM) | benign violation: degree-1 terms cancel out of | |
| (bead) | , | rheonomic corrections switch off smoothly |
Worked examples
1 · Euler's factor of two, live on a pendulum (confidence builder)
A pendulum bob (, rod ) passes with . Verify numerically that , and that computed from the definition equals .
Step 1. The pendulum is scleronomic with — both hypotheses hold, so the theorem predicts before we compute anything.
Step 2. Kinetic energy and momentum: ; .
Step 3. Euler's theorem in numbers: ✓ — the factor of two that carries the whole identity, delivered by the quadratic structure of .
Step 4. The Hamiltonian from the definition: , so and . Compare: ✓. Identity confirmed to the joule — and since nothing carries an explicit , this is conserved for the whole swing.
2 · Riding the separatrix of the rotating wire (exam level)
A bead of mass slides on a horizontal wire rotating at constant . At it is launched inward along the wire at . (a) Compute and at launch. (b) Show the bead rides a separatrix and find . (c) How much energy has the motor absorbed by the time the bead reaches ?
Step 1. Both bookkeepings at launch. ; . Hamiltonian: . Energy: . The launch speed was chosen exactly at — the level set.
Step 2. Read the phase portrait of . Level sets are hyperbolas; is the degenerate pair of straight lines — the separatrix through the unstable equilibrium at the axis. Moving inward on it: , hence
The bead creeps toward the axis forever, never arriving — the signature slow approach to a saddle point. A launch a hair faster crosses to the other branch and shoots back out; a hair slower and it turns around before the axis: the separatrix is the knife-edge between the two behaviours, all organized by the conserved, non-energy .
Step 3. Energy audit at . On the separatrix always (that is what means), so .
Step 4. The motor's take: absorbed by the motor — the inward-spiralling bead tries to spin the wire faster (angular momentum conservation instinct), and the motor brakes it, harvesting energy. sat at zero throughout while fell by 75%: the two books, side by side, in one number each. Check the direction of energy flow against intuition: outward runaway forces the motor to pay; inward drift lets it collect — sign consistent with .
Origins · 1 minLeonhard Euler and how this was discovered
Euler owns the quiet engine of this article twice over. His theorem on homogeneous functions — differentiate, weight by the variable, recover the degree — is the two-line lemma that sorts kinetic energy and decides when the Hamiltonian is the energy, a century before Hamilton defined one. And his mechanics built the stage: generalized treatments of constrained motion, rotating frames, and the rigid body, all of which manufacture exactly the and terms this article tracks. Euler produced roughly half of everything written in eighteenth-century mathematics while raising thirteen children and going progressively blind; asked how he would manage after losing his second eye, he reportedly answered that he would have fewer distractions. The homogeneous-function theorem occupies one paragraph of that output — and every mechanics student since has used it, mostly without knowing whose it was.
Going further
References. Goldstein, Poole & Safko, Classical Mechanics, 3rd ed., §2.7 and §8.2 · Landau & Lifshitz, Mechanics, 3rd ed., §6–7 and §40 · Morin, Introduction to Classical Mechanics, Ch. 15 · Taylor, Classical Mechanics, Ch. 13
Provenance. Euler's theorem application and follow Goldstein §2.7/§8.2 and Landau–Lifshitz §6–7. A verifier should recompute: (1) the homogeneity identity ; (2) the cancellation giving ; (3) the rotating-bead Hamiltonian and its conservation; (4) the Lorentz Hamiltonian ; (5) the Jacobi identity . No empirical constants are quoted. Cross-check Morin Ch. 15 and Taylor Ch. 13. Worked-example numbers on this page (pendulum , ; bead , falling , motor take ) are illustrative arithmetic recomputed from the boxed formulas.
Builds on: The Hamiltonian Function · Legendre Transformation · Generalized Momenta Leads to: Hamilton's Canonical Equations · Equivalence of Lagrangian and Hamiltonian Formulations · Phase Space · Harmonic Oscillator in Phase Space
Which time dependence breaks which property — I keep confusing the two?
Anchor the slogan to the two derivatives. Conservation is governed by evaluated on the final, assembled Lagrangian: explicit clock present ⇒ drifts, by equation (3). The energy identity is governed by inside the coordinate transformation — moving scaffolding manufactures and , and the master identity then forces regardless of clocks. The bead shows they decouple: has time in the constraint, yet the assembled is clockless — identity broken, conservation intact. A ramped trap is the mirror image. When in doubt, compute both derivatives; never infer one switch from the other.
What physically is the conserved H of the bead, if not the energy?
It is the energy as reckoned in the frame co-rotating with the wire — kinetic energy of motion along the wire, plus the centrifugal potential energy that the rotating frame charges for position. In that frame the wire is motionless scaffolding, the constraint is scleronomic, and the co-rotating "energy" is legitimately conserved; the price is the centrifugal potential, imported by the frame exactly as in the centrifugal-force article. The lab and the rotating frame simply keep different books, and the transform automatically hands you the rotating one whenever the constraint co-rotates. In celestial mechanics the identical object, one frame up, is the Jacobi constant of the restricted three-body problem.
Where does the motor's energy show up in the formalism, if H never sees it?
In the gap between the two books: , which for the bead is . Differentiate the energy along the motion and you get the motor's instantaneous power, — positive when the bead runs outward (motor pays to keep fixed), negative when it drifts inward (motor brakes and harvests, as in Worked Example 2). The formalism has not lost energy conservation; it has delegated it. Enlarge the system to include the motor and flywheel and the total is conserved again — the reduced description traded that global ledger for the smaller conserved .
Is the relativistic Hamiltonian the energy, given that it is not T plus V?
Yes — total energy, with the rest energy included. The relativistic Lagrangian is not of the form, so the master theorem simply does not apply; running the definition directly gives , which is the full relativistic energy, conserved for the free particle. The lesson generalizes: "" is a theorem about a specific Lagrangian structure, but " = total energy" can hold more broadly — what counts as the energy is itself dictated by the dynamics. When a time-translation symmetry exists, its Noether charge is the honest definition of energy, and that charge is exactly .
Can T1 terms appear without rotation — what do they look like in practice?
Any constraint velocity that projects onto the generalized velocities makes . A pivot driven horizontally as under a pendulum gives : the cross term is , the term is . A uniformly rotating wire happens to produce pure (the constraint velocity is perpendicular to the along-wire velocity), which is why the bead's momenta stayed simple. The practical consequence of : the momentum acquires a velocity-independent offset , so inverting the momentum map and completing the square in takes one more line — but the master identity holds regardless, since cancels from the value.
Do the phase portraits drawn from a non-energy H mean anything physically?
Everything they usually mean, minus the energy label on the contours. Level sets of any conserved are the trajectories (in one degree of freedom), equilibria sit where both slopes vanish, and separatrices flag the unstable ones — Worked Example 2's knife-edge at is a textbook saddle structure, organizing real bead behaviour into runaway, return, and asymptotic-creep families. What you may not do is read a contour's value as joules-in-the-lab: the bead's changes along every one of those curves. The portrait is the co-rotating frame's honest energy landscape; translate before quoting lab numbers.
How does this discussion relate to the energy function h of the Lagrangian chapter?
They are one quantity in two coordinate systems. The energy function is assembled before trading velocities for momenta; the Hamiltonian is pushed through the Legendre dictionary to . Every statement here — the identity, the two switches, the bead — has a verbatim Lagrangian-side twin, developed with its own worked examples in The Energy Function and Jacobi Integral. The division of labour: answers conservation questions without leaving the Lagrangian workflow; carries the same answers into phase space, where the canonical machinery (and quantum mechanics) can use them.