Hamiltonian Mechanics
Recall prompts
Section titled “Recall prompts”Attempt these from memory before reading.
- Write down the Legendre transform. Why does it need the Hessian of to be non-singular?
- State Hamilton’s equations. How many first-order equations do they give for degrees of freedom?
- State Liouville’s theorem, and say what it rules out for Hamiltonian systems.
- Write down the fundamental Poisson brackets.
- What is a constant of motion in terms of the Poisson bracket with ?
Motivation: why switch from the Lagrangian
Section titled “Motivation: why switch from the Lagrangian”The Lagrangian gives second-order equations in the coordinates. Hamilton’s formulation rewrites them as first-order equations in the coordinates and their conjugate momenta, treating as independent variables.
That looks like no gain at all — more variables, same information. What it buys is a different geometry:
- Phase space is the natural home. A state of the system is a point , not a path. Initial-value problems become: start here, follow the flow.
- First order is what ODE theory wants. Existence, uniqueness and numerical integration are all theorems about first-order systems.
- Conserved quantities become geometry. A cyclic coordinate makes constant, so the flow is confined to a level surface of . Conservation laws turn into constraints on where the orbit can go.
- The transformation to quantum mechanics runs through it. The Poisson bracket is the classical object whose deformation gives the commutator.
The Lagrangian is the better formulation for solving a specific problem quickly; the Hamiltonian is the better one for understanding the structure of the solution space.
4.1 Generalised Momentum
Section titled “4.1 Generalised Momentum”The generalised momentum conjugate to is
4.2 The Hamiltonian
Section titled “4.2 The Hamiltonian”The Hamiltonian is defined by the Legendre transform:
When the transformation is regular (i.e., the Hessian Is non-singular), this is well-defined.
If does not depend explicitly on time and is velocity-independent, then (total Energy).
4.3 Worked Example: Legendre Transform for the Harmonic Oscillator
Section titled “4.3 Worked Example: Legendre Transform for the Harmonic Oscillator”Problem. A one-dimensional harmonic oscillator has . Find the Hamiltonian.
Solution
The conjugate momentum:
The Hamiltonian:
This is as expected for a natural system. Hamilton’s equations give:
Combining: I.e., .
4.4 Worked Example: Legendre Transform for the Simple Pendulum
Section titled “4.4 Worked Example: Legendre Transform for the Simple Pendulum”Problem. Find the Hamiltonian for a simple pendulum of mass and length .
Solution
From Section 3.4, .
Conjugate momentum:
Hamiltonian:
Hamilton’s equations:
4.5 Hamilton’s Equations
Section titled “4.5 Hamilton’s Equations”Theorem 4.1 (Hamilton’s Equations). The equations of motion in Hamiltonian form are
These are first-order ODEs (compared to second-order ODEs in the Lagrangian formulation).
Proof. From :
Since The terms cancel:
Comparing with :
4.6 Phase Space
Section titled “4.6 Phase Space”Hamiltonian mechanics lives in phase space: the -dimensional space with coordinates . Each point in phase space represents a complete state of the System (positions and momenta).
A phase portrait is the collection of trajectories in phase space. For a 1D harmonic oscillator the trajectories are ellipses in the plane, and that single picture carries the physics in four representations at once.
The same oscillator, four ways.
In words. Energy sloshes between kinetic and potential. When the mass is at maximum displacement it is momentarily at rest; when it passes through the centre it is moving fastest.
As equations. on each orbit, with and .
As a picture. Concentric ellipses in the plane:
p ^ ....... | ... ... | . . | . + . each ellipse is one energy | . . E = H on the curve | ... ... | ....... +----------------------> xAs a statement about area. The area enclosed by an orbit is , so energy sets the area. Liouville’s theorem says a bundle of such orbits keeps its total area as it deforms.
The picture also explains why the origin is called a centre: orbits circle it but never approach it, so it is stable without being attracting. An attracting fixed point would require the area to shrink, which Liouville forbids.
4.7 Liouville’s Theorem
Section titled “4.7 Liouville’s Theorem”Theorem 4.2 (Liouville’s Theorem). The flow in phase space is incompressible: the phase space volume is conserved along trajectories. Equivalently, the phase space density satisfies:
Proof. Consider a volume in phase space. The rate of change of the volume is:
By the continuity equation in dimensions:
Where is the phase space velocity. Using Hamilton’s equations:
By equality of mixed partial derivatives. Therefore:
Intuition. Liouville’s theorem is the classical analogue of unitarity in quantum mechanics. It tells us that phase space volume is conserved --- like an incompressible fluid flowing through phase space. This underlies the ergodic hypothesis of statistical mechanics.
4.8 Poisson Brackets
Section titled “4.8 Poisson Brackets”Definition. The Poisson bracket of two functions and is:
Theorem 4.3 (Equations of Motion via Poisson Brackets). For any function :
In particular, Hamilton’s equations become:
Proof. Using the chain rule:
Substituting Hamilton’s equations:
Properties of Poisson Brackets.
Theorem 4.4. The Poisson bracket satisfies:
- Antisymmetry:
- Linearity: for constants
- Leibniz rule:
- Jacobi identity:
Proof. Properties (1)—(3) follow directly from the definition. For the Jacobi identity, write out the terms explicitly:
Expanding and collecting terms, the second-order mixed partial derivatives cancel in groups of three (by equality of mixed partials), yielding the Jacobi identity.
Theorem 4.5. A quantity is a constant of motion if and only if . If does not depend explicitly on time, is conserved if and only if .
Proof. Immediate from Theorem 4.3 with .
Fundamental Poisson Brackets:
Counterexamples worth knowing by name
Section titled “Counterexamples worth knowing by name”| Claim | True? | Counterexample |
|---|---|---|
| The Hamiltonian always equals | no | a charged particle in an EM field, or any rheonomic constraint: comes from the Legendre transform, not from |
| The Legendre transform always exists | no | must be convex in ; for a relativistic particle near the Hessian degenerates |
| A Hamiltonian system always reaches equilibrium | no | Liouville forbids attractors entirely |
| Every conserved quantity comes from a symmetry of | no | momentum can be conserved with no obvious coordinate symmetry |
| Poisson brackets are invariant under any coordinate change | no | only under canonical transformations |
The relativistic row is the one to remember. It shows that the Legendre transform is a hypothesis about the Lagrangian, not a formality, and that the transform breaks exactly where the physics becomes singular.
Interleaving problems
Section titled “Interleaving problems”Mix these with material from Lagrangian mechanics, Noether’s theorem and the statistical mechanics module.
- (Lagrangian.) Show that the Legendre transform is an involution: applying it twice returns the original Lagrangian. Where is convexity used?
- (Noether.) For a particle in a central potential, show that rotational symmetry gives and hence is conserved.
- (Statistical mechanics.) Show that the microcanonical measure on the energy surface is invariant under the flow, using Liouville’s theorem.
- (Symplectic structure.) Show that the Poisson bracket can be written where is the symplectic form.
- (Hamilton-Jacobi.) Show that if is a complete integral depending on constants , then the and are constant along solutions.
Hamilton-Jacobi Equation
Section titled “Hamilton-Jacobi Equation”Definition. Hamilton’s principal function is the action evaluated along the classical path from to .
Theorem 4.6 (Hamilton-Jacobi Equation). The function satisfies:
This is a first-order nonlinear PDE in variables.
Proof. The action from to is . The total time derivative is:
But So by the chain rule:
From the definition of the conjugate momentum, (this can be shown rigorously by varying the endpoint). Therefore:
Since :
Which gives .
Intuition. The Hamilton-Jacobi equation is the bridge between classical and quantum mechanics. Schrodinger’s equation can be obtained from it via the substitution (up to constants), making the classical limit of the quantum phase.
Separation of Variables. If does not depend explicitly on Write . Then the time-independent Hamilton-Jacobi equation is:
Where is Hamilton’s characteristic function and is the constant energy.
4.10 Worked Example: Hamilton-Jacobi for the Harmonic Oscillator
Section titled “4.10 Worked Example: Hamilton-Jacobi for the Harmonic Oscillator”Problem. Solve the Hamilton-Jacobi equation for a 1D harmonic oscillator with .
Solution
Since is time-independent, write . The HJ equation becomes:
Integrating:
Let Then :
Where . The solution gives as expected.
Intuition
Section titled “Intuition”Hamiltonian mechanics is like switching from a video recording of motion to a snapshot of all possible states. While the Lagrangian tracks positions and velocities over time, the Hamiltonian lives in phase space where every point represents a complete snapshot of where something is and how fast it is going. Hamilton’s equations are beautifully symmetric: the rate of change of position depends on how energy changes with momentum, and the rate of change of momentum depends on how energy changes with position. Liouville’s theorem tells us that if you paint a region of phase space, its volume stays the same as it flows around like incompressible paint. This is why statistical mechanics works: the phase space volume that encodes all possible states of a system is preserved under time evolution.
Cross-References
Section titled “Cross-References”Lagrangian Mechanics: The Lagrangian formulation provides the foundation for deriving the Hamiltonian via Legendre transform.
Noether’s Theorem: Noether’s theorem connects symmetries to conserved quantities, which are expressed as Poisson brackets in Hamiltonian mechanics.
Quantum Mechanics: The Hamiltonian becomes an operator in quantum mechanics, and Poisson brackets become commutators.
4.11 Common Mistakes
Section titled “4.11 Common Mistakes”Mistake 1: Assuming the Hamiltonian always equals The Hamiltonian equals the total energy only when the potential is velocity-independent and the coordinate transformation is scleronomic. For systems with velocity-dependent potentials (like charged particles in electromagnetic fields) or rheonomic constraints, even though is still conserved when .
Mistake 2: Confusing canonical momentum with mechanical momentum Canonical momentum is not always equal to mechanical momentum . For a charged particle in a magnetic field, the canonical momentum includes the vector potential: . Always derive canonical momentum from the Lagrangian, not from .
Mistake 3: Misapplying Poisson brackets The Poisson bracket is antisymmetric: . A common error is forgetting this sign when computing brackets of position and momentum. The fundamental brackets are , , and . Mixing up the order changes the sign.