Skip to content
Tutorials Center
My learning

Topics

Lesson 29 of 44 · Hamiltonian Mechanics

Chapter 6 Review: Hamiltonian Mechanics

Review of the Legendre transform, Hamilton's equations, phase space, Liouville's theorem, Poisson brackets and canonical transformations, with a recap table and quiz.

This review ties the four ideas of the chapter into one loop: start with a Lagrangian, transform it to a Hamiltonian, draw the flow in phase space and describe it with brackets. The picture below is worth keeping next to you while you work the problems later in the course.

Lagrangian, Hamiltonian, phase space and Poisson bracket joined in a loop
Caption: the chapter's four ideas and the arrows that connect them.

Recap table

Idea Key formula One-line meaning
Conjugate momentum p = ∂L/∂q̇ the variable that replaces the velocity
Hamiltonian H = Σ pq̇ − L L seen as a function of (q, p)
Hamilton's equations q̇ = ∂H/∂p, ṗ = −∂H/∂q 2n first-order equations
Energy dH/dt = ∂H/∂t conserved without explicit time dependence
Phase space state = point (q, p) trajectories never cross
Liouville ∂q̇/∂q + ∂ṗ/∂p = 0 area (volume) is preserved
Poisson bracket ḟ = {f, H} + ∂f/∂t tests and computes change
Canonical map {Q, P} = 1 keeps Hamilton's form
Generating function F₁(q, Q): p = ∂F₁/∂q, P = −∂F₁/∂Q builds canonical maps

Remember:

  1. H must be written with q and p only.
  2. A charged particle has p = mv + qA.
  3. Friction destroys Liouville's theorem: area shrinks as e^(−γt).
  4. Two conserved quantities give a third through their bracket (Poisson's theorem).

Two routes to the same motion

A good check on a derivation is to solve the Lagrange and the Hamilton equations independently. The TryIt below does that for a pendulum (m = 1 kg, l = 1 m, g = 9.81 m/s², starting at θ = 2 rad). The Lagrange route integrates one second-order equation; the Hamilton route integrates two first-order ones. The maximum difference should be at the level of the integration error.

Python Lagrange and Hamilton agree

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 10 questions

of 10 answered You scored / 10 · perfect!

  1. 1. Which formula defines the Hamiltonian?

    H = Σ pq̇ − L, written as a function of q, p and t.
  2. 2. A system has 3 coordinates. How many Hamilton equations are there?

    Each of the 3 coordinates and 3 momenta has a first-order equation.
  3. 3. For a free particle, H = p²/2m. What is q̇?

    q̇ = ∂H/∂p = p/m.
  4. 4. A harmonic oscillator has H = p²/2m + kx²/2. What shape are its phase curves?

    H = E is a quadratic equation in x and p with positive coefficients.
  5. 5. Liouville's theorem says that Hamiltonian flow preserves...

    Volume is preserved; shapes can stretch and shear.
  6. 6. Which condition shows that f(q, p) with no explicit time is a constant of the motion?

    df/dt = {f, H} when f has no explicit time dependence.
  7. 7. What is {q, p}?

    That is the fundamental bracket in this lesson's sign convention.
  8. 8. The generating function F₁ = qQ gives which transformation?

    p = ∂F₁/∂q = Q and P = −∂F₁/∂Q = −q.
  9. 9. Which statement about damping is right?

    With friction −γp the divergence is −γ and the area decays as e^(−γt).
  10. 10. For a charged particle with vector potential A, H equals...

    From L = ½mv² − qφ + qA·v: p = mv + qA, and H = (p − qA)²/2m + qφ.

Summary

  • H(q, p, t) = Σ pq̇ − L and Hamilton's equations give 2n first-order equations.
  • Phase portraits are contour maps of H; Liouville's theorem makes the flow incompressible.
  • ḟ = {f, H} + ∂f/∂t is the universal evolution law; canonical transformations keep {Q, P} = 1.

Next: Chapter 7 overview: central forces and orbits