Skip to content
Tutorials Center
My learning

Topics

Lesson 43 of 44 · Projects and Practice

Cheat Sheet: Lagrangian and Hamiltonian Mechanics

A one-page summary of the key formulas of Lagrangian and Hamiltonian mechanics, with units, sanity checks and quick calculators for orbits, oscillations and rotation.

Here is the whole course on one page. Keep the picture open when you solve problems, and use the tables below it when you need the exact statement, the units or the conditions under which a formula holds.

Nine cards of key formulas, from Euler-Lagrange to phase space
Caption: key formulas of the course, grouped by topic.

What you will learn

  • Where each key formula applies and what its units are.
  • A short list of checks that catch most mistakes.
  • How to turn the formulas into quick numerical calculators.

Formulas with their conditions

Topic Formula Condition or note
Lagrangian L = T − V V independent of velocities
Euler-Lagrange d/dt(∂L/∂q̇ᵢ) = ∂L/∂qᵢ holonomic constraints, one equation per qᵢ
Momentum pᵢ = ∂L/∂q̇ᵢ with a vector potential p = mv + qA
Cyclic coordinate ∂L/∂q = 0 ⇒ p constant choose coordinates that expose symmetry
Energy function h = Σ q̇ p − L, dh/dt = −∂L/∂t h = T + V only if constraints are time independent
Noether δL = ε dF/dt ⇒ Q = Σ pK − F on solutions of the equations of motion
Hamiltonian H = Σ pq̇ − L written in q, p, t only
Hamilton's equations q̇ = ∂H/∂p, ṗ = −∂H/∂q 2n first-order equations
Poisson bracket ḟ = {f, H} + ∂f/∂t, {q, p} = 1 {f, g} = Σ(∂f/∂q ∂g/∂p − ∂f/∂p ∂g/∂q)
Canonical map {Q, P} = 1 built from F₁(q, Q) or F₂(q, P)
Liouville ∂q̇/∂q + ∂ṗ/∂p = 0 no friction
Reduced mass μ = m₁m₂/(m₁ + m₂) two-body central problem
Angular momentum ℓ = μr²θ̇, dA/dt = ℓ/2μ any central force
Effective potential V_eff = ℓ²/(2μr²) + V(r) E = ½μṙ² + V_eff
Kepler orbit r = p/(1 + e cosθ), p = ℓ²/(μk) e = √(1 + 2Eℓ²/(μk²))
Ellipse a = −k/(2E), T² = 4π²a³/G(m₁+m₂) bound orbits
Vis-viva v² = GM(2/r − 1/a) any Kepler orbit
Small oscillations Mη̈ + Kη = 0, det(K − ω²M) = 0 near a stable equilibrium
Inertia tensor T = ½ωᵀIω, L = Iω principal axes diagonalize I
Euler's equations I₁ω̇₁ = (I₂ − I₃)ω₂ω₃ + N₁ body frame; middle axis unstable

Quick sanity checks

  1. Units. L and H have the unit of energy (J), the action has J·s, a conjugate momentum has the unit of [L]/[q̇].
  2. Limits. Set the coupling to zero, the angle to zero or the distance to infinity, and compare with a known result.
  3. Conservation. Check E (or h), and any p or ℓ the symmetry promises.
  4. Signs. ṗ = −∂H/∂q; the force and potential are related by F = −∇V; {L_z, x} = y.
  5. Special cases. A circular orbit has e = 0, a parabola E = 0, and the pendulum's separatrix has E = mgl.

Try it

The calculator below collects the formulas that you meet most often. It reports the small-angle pendulum period, an orbital period and vis-viva speed (using GM = 3.986 × 10¹⁴ m³/s² for Earth), the double-pendulum normal frequencies and the moments of inertia of a few standard bodies. Change the numbers and compare with your hand calculation. The values are computed by the code; none are measured data.

Python Quick calculators

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 · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. Which formula gives the speed anywhere on a Kepler orbit?

    This is the vis-viva equation; it reduces to √(GM/r) for a circle.
  2. 2. Which condition makes h equal to T + V?

    With time-independent coordinates, T is quadratic in the velocities.
  3. 3. What is the unit of the action S = ∫ L dt?

    Energy times time.
  4. 4. Which tool finds normal frequencies?

    That is the characteristic equation of the small-oscillation problem.

Summary

  • The formulas split into three groups: Lagrangian and symmetry, Hamiltonian and brackets, and applications (orbits, oscillations, rotation).
  • Always check units, limits and conserved quantities.

Next: Further study