Exercises — Hamilton's equations of motion
Quick reference (everything below is derived in the parent):
Level 1 — Recognition
L1.1 — Read off a momentum
For (a ball moving straight up under gravity, = height), write the conjugate momentum and invert it to get .
Recall Solution
WHAT: apply . Only the first term contains . Invert: . WHY it matters: this inversion is the step that lets us express everything in instead of — the doorway to .
L1.2 — Identify from a graph description
A Hamiltonian is . Without any calculation, state (a) what physical system this is, (b) whether is conserved, (c) the shape of a constant- curve in the plane.
Recall Solution
(a) A mass on a spring of stiffness — a simple harmonic oscillator, since is spring potential energy. (b) There is no explicit in , so by , is conserved. (c) is the equation of an ellipse in the plane — a closed loop the state travels around forever. (The word "ellipse" is clozed as a recall cue, not a link.) See the figure below.

L1.3 — Count the equations
A system has generalized coordinates. How many first-order Hamilton equations describe it, and why is that different from the Lagrangian count?
Recall Solution
Hamilton gives two equations per coordinate ( and ), so first-order equations. Lagrange gives one second-order equation per coordinate, so equations — but each is second-order. Trading order for number, the total "amount of information" ( initial conditions) is the same. This -dimensional picture is exactly the phase space.
Level 2 — Application
L2.1 — Full recipe on a falling ball
Using from L1.1, build and write both Hamilton equations. Check that they reproduce free fall.
Recall Solution
Step 1 (momentum): . Why: to eliminate . Step 2 (Hamiltonian): Why: substitute everywhere so depends only on . This equals . Step 3 (equations): Check: means , i.e. — free fall. Newton re-emerges. ✓
L2.2 — Pendulum Hamiltonian
For a plane pendulum, ( measured from the downward vertical, = length). Find , , and the two equations of motion.
Recall Solution
Step 1 (momentum). Why: we need the variable that will replace , so differentiate with respect to — only the kinetic term contains it. Why invert: must depend on , never on , so we need written in terms of . Step 2 (Hamiltonian). Why: plug into so every disappears. Reading it: the first term is rotational kinetic energy, the second is gravitational potential energy (lowest at the bottom, ). Step 3 (equations). Why: apply the two canonical rules — reads off the -slope of , and reads off minus the -slope. Why the last minus: the potential slope pushes the momentum down the hill, exactly the "p fights q minus" rule. Check. Why: to confirm we recover known physics, eliminate by differentiating : — the exact pendulum equation. ✓
L2.3 — Is this conserved?
A driven system has . Is conserved? Justify with the time law.
Recall Solution
Step 1. Why: the time law says the only way can change along the motion is through an explicit in the formula — so we hunt for that explicit . Here it sits inside . Step 2. Why: differentiate with respect to treating as fixed labels (that is what "explicit" means): which is not zero. Step 3. Why: feed this into the time law to get the actual rate of change along a trajectory: So is not conserved — the external drive pumps energy in and out. The explicit in is the tell-tale.
Level 3 — Analysis
L3.1 — Phase-space direction field
For the SHO , the flow is . Pick the crossing points of one constant- orbit with the axes. Because the orbit is the ellipse , its -axis crossing is at with , and its -axis crossing is at with ; these are forced to satisfy so all four points lie on the same orbit. Give the direction the state moves at each of the four points, and deduce whether the orbit runs clockwise or counter-clockwise.
Recall Solution
Consistency first. Why: the four points must lie on one energy contour, otherwise comparing their flow is meaningless. From and , So we take and — not independent. Evaluate the velocity vector at each point:
- : → moving down.
- : → moving right.
- : → moving up.
- : → moving left.
Right at the top, down at the right, left at the bottom, up at the left — that circulation is clockwise. See the arrows.

L3.2 — When (rotating bead)
A bead of mass slides on a straight wire that is forced to rotate in a horizontal plane at constant angular rate . With the distance along the wire, . Find and state whether equals the energy (the mechanical energy contains the centrifugal potential ).
Recall Solution
Momentum. Why: differentiate by to get the replacement variable; only contains . Hamiltonian. Why: substitute into to remove . Compare. , written in , is as well — here they happen to coincide, because the term was absorbed into the effective potential and the Lagrangian, once reduced to the single coordinate , is time-independent so is conserved. The subtle point: here is not the total kinetic energy of the moving bead in the lab frame. The reduced is a conserved quantity (Jacobi integral), but it is not the lab-frame kinetic energy plus zero potential. This is the canonical example where " = energy" needs care: the wire does work, and measures the conserved Jacobi function, not naive .
L3.3 — Reading off constants of motion
For (potential depends on only), which of is conserved? Prove it from a canonical equation.
Recall Solution
Apply . Since has no in it, , so — is conserved. Meanwhile in general — is not conserved. Insight: a coordinate absent from (a cyclic coordinate) hands you a conserved momentum for free — the seed of Noether's Theorem.
Level 4 — Synthesis
L4.1 — Charged particle in a magnetic field (velocity cross-term)
A particle of mass , charge , in one dimension has , where is a given vector-potential component. Find the conjugate momentum , invert it, and build .
Recall Solution
Step 1 (momentum — watch the cross-term). Why: differentiate the actual by ; here the linear term also contributes, so is not just . So ! Why invert: we still need in terms of to eliminate it — solve the linear relation: . Step 2 (Hamiltonian). Why: substitute that into and simplify. Why group : it is exactly , so the algebra collapses cleanly. Put : The lesson: the canonical momentum differs from the kinetic momentum ; is quadratic in the gauge-invariant combination . This is the origin of the "minimal coupling" used in quantum mechanics.
L4.2 — Poisson-bracket time evolution
Given any function with no explicit time, its rate of change along the flow is where the Poisson bracket is . Derive this from Hamilton's equations, then use it to recompute .
Recall Solution
Derivation. Why start with the chain rule: changes only because and move, so Why substitute Hamilton's equations: to express the rate purely in terms of . Insert and : Recompute . Why set : to test the bracket on itself. Then So (with no explicit ) — consistent with the parent note, and now packaged in one bracket. Anything whose bracket with vanishes is conserved.
L4.3 — Build from scratch, two coordinates
A 2D isotropic oscillator: . Find both momenta, , all four canonical equations, and confirm the total energy is conserved.
Recall Solution
Momenta. Why: differentiate by each velocity separately; the two coordinates do not mix. Hamiltonian. Why: substitute both inversions into . Four equations. Why: one and one per coordinate. Conservation. Why: has no explicit , so . Energy conserved. ✓ (Bonus: is also conserved — angular momentum — because the potential is rotationally symmetric.)
Level 5 — Mastery
L5.1 — that is conserved but is not the naive form (explicit sign check)
Consider , where is a constant. (i) Show the term is a total time derivative, so it cannot change the equations of motion. (ii) Compute and fully, and decide whether equals the naive .
Recall Solution
(i) Why check this: a term that is a total time derivative adds a constant-endpoint piece to the action and so leaves the Euler–Lagrange equations untouched. Indeed , so the motion is the same simple harmonic oscillator. (ii) Momentum. Why: differentiate the given by ; the term is linear in and contributes . Hamiltonian. Why: substitute into , term by term. Why group : it equals , so the first two terms combine just like a plain kinetic term. Put : Punchline: the Hamiltonian is not the naive — it carries the shift . It is still conserved (no explicit ), and it still generates the same SHO motion, but its form in was changed by a mere total-derivative gauge in . This is a hands-on view of what Canonical Transformations formalize: different 's can describe the same physics.
L5.2 — Ellipse area = action (mastery link)
For the SHO , compute the area enclosed by one phase-space orbit, , and show it equals .
Recall Solution
Why an ellipse: the orbit is , an ellipse with semi-axes Why the area formula: an ellipse of semi-axes encloses area , so Meaning: this enclosed area is the action variable . Its constancy under slow parameter changes (adiabatic invariance) and its quantization are gateways into Hamilton-Jacobi Theory and old quantum theory.
L5.3 — Prove Hamilton's equations preserve the bracket structure
Show that using the Poisson bracket, and that , reproduce the canonical equations. This is the algebraic restatement that underlies Phase Space and Liouville's Theorem.
Recall Solution
Fundamental bracket. Why: plug into ; note , , etc. Reproduce the equations. Why: using with then should hand back Hamilton's equations if the bracket formulation is equivalent. The whole of Hamiltonian mechanics can thus be phrased as "time evolution = bracket with ," and the invariance of is exactly the condition that a change of variables is a canonical transformation.
Recall One-line self-quiz
Why does a cyclic coordinate (absent from ) give a conserved momentum? ::: Because when does not contain . In L4.1, why is ? ::: The Lagrangian has a term linear in , so . What is for the SHO of energy ? ::: , the action variable.