Skip to content
The book

Hamiltonian formalism and conservation laws

Why this is asked: H = Σpq̇ − L expressed in (q, p). Poisson brackets test canonicity: {Qᵢ, Pⱼ} = δᵢⱼ, {Qᵢ, Qⱼ} = {Pᵢ, Pⱼ} = 0.

In one sentence

The Legendre transform replaces nn second-order equations with 2n2n first-order ones on phase space, where the flow preserves volume — and HH equals the energy only under conditions that must be checked rather than assumed.

Why the exam asks it

Because "H=T+VH = T+V" and "HH is conserved" are two different statements with two different hypotheses, and options treat them as one. Phase-space questions are also concrete: draw the level curves and read off the motion.

The idea

Define the conjugate momenta pi=∂L/∂q˙ip_i = \partial L/\partial\dot q_i, invert for q˙\dot q, and set

H(q,p,t)=∑ipiq˙i−L.H(q,p,t) = \sum_i p_i\dot q_i - L .

Then Hamilton's equations:

q˙i=∂H∂pi,p˙i=−∂H∂qi.\dot q_i = \frac{\partial H}{\partial p_i}, \qquad \dot p_i = -\frac{\partial H}{\partial q_i}.

2n2n first-order equations, symmetric in qq and pp, on phase space. That symmetry is what makes the geometric results possible.

The two conditions, kept apart

H=T+VH = T+V requires the constraints to be time-independent (so TT is quadratic in the velocities) and VV to be velocity-independent. Both can fail: a bead on a rotating wire has time-dependent constraints and H≠EH \ne E, and a charged particle in a magnetic field has a velocity-dependent potential.

HH is conserved requires ∂H/∂t=0\partial H/\partial t = 0, and nothing else.

These are independent. HH can be conserved without being the energy, and can be the energy without being conserved. Any option asserting one from the other is wrong, and this is the topic's central distinction.

Poisson brackets

{f,g}=∑i(∂f∂qi∂g∂pi−∂f∂pi∂g∂qi).\{f,g\} = \sum_i\left(\frac{\partial f}{\partial q_i}\frac{\partial g}{\partial p_i} - \frac{\partial f}{\partial p_i}\frac{\partial g}{\partial q_i}\right).

The fundamental ones are {qi,pj}=δij\{q_i,p_j\}=\delta_{ij}, {qi,qj}={pi,pj}=0\{q_i,q_j\}=\{p_i,p_j\}=0. Then

dfdt={f,H}+∂f∂t,\frac{df}{dt} = \{f,H\} + \frac{\partial f}{\partial t},

so a quantity with no explicit time dependence is conserved exactly when it commutes with HH under the bracket. Hamilton's equations are the special cases f=qf=q and f=pf=p.

A transformation is canonical when it preserves the fundamental brackets — equivalently when its Jacobian is symplectic. That is the precise sense in which qq and pp are interchangeable.

Liouville's theorem

The Hamiltonian flow preserves phase-space volume. For the harmonic oscillator, H=12(p2+x2)H = \tfrac12(p^2+x^2) and the flow is a rotation, whose determinant is 11 — the volume element is carried around unchanged, deformed but never compressed.

This is why Hamiltonian systems have no attractors: a damped oscillator's spiral into the origin shrinks phase-space volume, so it cannot be Hamiltonian. Dissipation and Hamiltonian structure are incompatible, and recognising that answers several questions directly.

Phase portraits

For one degree of freedom, H(q,p)=EH(q,p)=E is a curve, and the motion follows it. The pendulum with m=ℓ=g=1m=\ell=g=1 has

H=p22−cos⁡θ.H = \tfrac{p^2}{2} - \cos\theta .
θ from −π to π closed: swinging E < 1, turning points separatrix: E = 1 just reaches the top open: rotating E > 1, goes over
The pendulum in phase space. Closed curves are swinging, open ones are rotating, and the separatrix at E = 1 is the orbit that just reaches the top.
  • E<1E<1: closed curves — libration, the pendulum swings between turning points.
  • E=1E=1: the separatrix, reaching the inverted position with exactly zero speed, taking infinite time to get there.
  • E>1E>1: open curves — rotation, the pendulum goes over the top.

The separatrix passes through the unstable equilibrium at θ=π\theta=\pi, which is the saddle from the stability chapter, and the centre at θ=0\theta=0 is the stable equilibrium. Reading a phase portrait is reading the level sets of HH.

Where intuition breaks

"H=T+VH = T+V." Only with time-independent constraints and a velocity-independent potential. A bead on a rotating wire breaks it.

"HH is conserved because it is the energy." Conservation needs ∂H/∂t=0\partial H/\partial t=0. The two conditions are separate and either can hold without the other.

"Hamilton's equations are just Newton's laws rewritten." They are equivalent in content and different in structure — first order, symmetric, and on a space where volume is conserved. The structure is what gives Liouville and canonical transformations.

"A damped oscillator has a Hamiltonian." Not a standard one: the spiral shrinks phase-space volume, contradicting Liouville.

"Canonical transformations are any change of variables." Only those preserving the Poisson brackets. An arbitrary change of qq and pp is not canonical.

"On the separatrix the pendulum reaches the top and stops." It approaches the top asymptotically, taking infinite time. The separatrix is not a periodic orbit.

"{f,H}=0\{f,H\}=0 means ff is constant." Means ff is conserved if it has no explicit time dependence. The full statement carries ∂f/∂t\partial f/\partial t.

The exam's angle

  1. Get pp from LL, then H=∑pq˙−LH = \sum p\dot q - L, and express HH in terms of qq and pp — not q˙\dot q. Leaving a velocity in HH is the standard slip.
  2. Check the two conditions separately when asked whether HH is the energy and whether it is conserved.
  3. For conservation, compute a Poisson bracket with HH.
  4. For one degree of freedom, sketch H=EH=E. Closed means oscillation, open means unbounded motion, and the separatrix divides them.
  5. Use Liouville to rule things out — anything with an attractor or dissipation is not Hamiltonian.

The night before

  • pi=∂L/∂q˙ip_i = \partial L/\partial \dot q_i; H=∑pq˙−LH = \sum p\dot q - L, expressed in qq and pp.
  • q˙=∂H/∂p\dot q = \partial H/\partial p, p˙=−∂H/∂q\dot p = -\partial H/\partial q: 2n2n first-order equations.
  • H=T+VH=T+V needs time-independent constraints and velocity-independent VV. HH conserved needs ∂H/∂t=0\partial H/\partial t=0. Two separate conditions.
  • {qi,pj}=δij\{q_i,p_j\}=\delta_{ij}; dfdt={f,H}+∂f∂t\dfrac{df}{dt}=\{f,H\}+\dfrac{\partial f}{\partial t}.
  • Canonical == preserves the brackets == symplectic Jacobian.
  • Liouville: phase-space volume is preserved, so no attractors and no dissipation.
  • Pendulum: H=p22−cos⁡θH=\tfrac{p^2}2-\cos\theta. E<1E<1 libration, E=1E=1 separatrix through the unstable equilibrium, E>1E>1 rotation.

See it move

From Lagrangian to Hamiltonian, and what the flow preservesinteractive

This visual is part of Trap Analysis

The Legendre transform done once, plus the reason a Hamiltonian system can never have an attractor.

Unlock interactive visuals

The trap here

“The Hamiltonian always equals the total energy” — false

A bead on a wire rotating at forced angular velocity ω\omega

The constraint is time-dependent, so H is conserved but differs from T + V.

More on this →

More in Classical Mechanics

Take it further

Last revised . Found a mistake? Tell us — corrections are the fastest thing we act on.

Next: Axioms, conditional probability, independence, Bayes

Create a free account to keep your place and have this feed your study plan.

ShareWhatsAppTelegram

Open this in the full syllabus view · Unit 3