Fanlab

Physics · Mechanics · Year 2

Hamiltonian mechanics

How can the whole future of a swing fit on a single map?

Open the experiment

The situation

A swing is flying in a children's playground. At every moment its state is completely described by two numbers: the deflection angle θ and the momentum p. If we take these two numbers as a point on a map, the whole future of the swing becomes a single line on the map. On the big board next to the swing is exactly this map: oscillations, full rotations and the boundary that separates them. Why does the “fluid” on this map never get compressed — and which quantities stay completely unchanged?

Topic

Hamiltonian mechanics and phase space. Phase portrait of a pendulum: conservation laws from symmetry

Key ideas

  • Phase space and Hamilton's equations
  • Liouville's theorem
  • Symmetry and conservation laws

Formulas

H(θ,p)=p22ml2+mgl(1−cos⁡θ)

The Hamiltonian of the swing is the total energy; p=ml2θ˙ is the canonical momentum (angular momentum).

θ˙=∂H∂p,p˙=−∂H∂θ

Hamilton's equations: the velocity of a point on the map (the blue and red arrows on the board).

dFdt={F,H}+∂F∂t,{F,G}=∑i(∂F∂qi∂G∂pi−∂F∂pi∂G∂qi)

Poisson brackets: if {F,H}=0 and ∂F/∂t=0, then F is a constant of motion.

T=4lgK(k),k=sin⁡θ02

The period depends on the amplitude: K is the complete elliptic integral; at the separatrix (θ0→180°) T→∞.

J=∮pdθ≈2πEω=const

The action variable is the area enclosed by the orbit. If a parameter changes slowly, it is conserved (adiabatic invariant).

Theory

Phase space and Hamilton's equations

In Hamiltonian mechanics the state is given by a generalised coordinate q and the canonical momentum p=∂L/∂q˙. The Hamiltonian H=pq˙−L (here the total energy) gives two first-order Hamilton's equations and attaches a velocity vector to every point of the (θ,p) phase plane. Trajectories do not cross: from one state only one future emerges. On the board, closed lines are oscillations and wavy lines are full rotations; they are separated by the separatrix H=2mgl: this motion approaches the inverted upper position in an infinitely long time. H does not depend explicitly on time (homogeneity of time), so energy is conserved and the point always stays on one line. Model: a swing with a rigid rod (like the 360° swing ride at an amusement park), a point mass m=30 kg, no friction.

Principle of least action

The action S=∫Ldt assigns a single number to each path. Hamilton's principle: among paths with fixed end points, the true motion makes S stationary, and over a short interval a minimum. In the “Hamilton's principle” section, εsin⁡(πt/τ) is added to the true path (τ=0.4T0 — shorter than half a period): on the graph S(ε)−S(0)≥0, with the minimum exactly at ε=0. If we regard the action taken along the true path as a function of the end point, then ∂S/∂q=p and ∂S/∂t=−H. For a given energy, the Maupertuis principle applies: the abbreviated action S0=∫pdq is stationary on the true trajectory.

Liouville's theorem

Phase flow is incompressible: ∂q˙/∂q+∂p˙/∂p=∂2H/∂q∂p−∂2H/∂p∂q=0. So even if a blob of initial states is stretched into a thin spiral, its area (in many dimensions — phase volume) does not change. Friction (p˙=…−γp) makes the divergence −γ: the area decreases as e−γt. The numerical method also matters: the symplectic Störmer–Verlet (leapfrog) scheme preserves the area exactly, whereas the explicit Euler method changes it at every step by a factor of 1+h2ω02cos⁡θ. In statistical physics an ensemble flows in phase space like an incompressible fluid: dρ/dt=0 — the basis of equilibrium distributions.

Poisson brackets and canonical transformations

For any quantity, dF/dt={F,H}+∂F/∂t; the basic brackets are {q,p}=1, {q,q}={p,p}=0. A change of variables that preserves them is called canonical: in the new variables Hamilton's equations have the same form. It is convenient to write it with a generating function: for a harmonic oscillator, the transformation F1=12mωq2cot⁡φ gives q=2I/(mω)sin⁡φ, p=2mωIcos⁡φ (I=J/2π), and H=ωI. The (φ,J) view in “Adiabatic” mode is the exact version of this transformation for the pendulum; the simulation calculates the {φ,J/2π} in the HUD numerically, and it comes out equal to 1.

Action–angle variables and the adiabatic invariant

In periodic motion the action J=∮pdq is the area enclosed by the orbit, and the angle φ grows uniformly: φ˙=ω=∂H/∂I, I=J/2π. If a parameter (the rope length) changes slowly compared with the period, both the energy and the frequency change, but J stays almost constant — the adiabatic invariant. For small oscillations J=2πE/ω: if the rope is shortened 2 times, both ω and the energy increase 2 times (the work is done by the hand pulling the rope). If it is pulled quickly, the invariant is broken. The same idea works in magnetic traps: for a charged particle, μ=mv⟂2/(2B) is an adiabatic invariant, so a particle flying towards a strong field is reflected by a magnetic mirror — this is how the Earth's radiation belts are held (in detail — in the “Aurora and the Lorentz force” experiment).

Symmetry and conservation laws

To every continuous symmetry of the Lagrangian there corresponds a conserved quantity (Noether's theorem): homogeneity of time → energy, homogeneity of space → momentum, isotropy → angular momentum. If a coordinate does not enter H, it is cyclic: p˙x=−∂H/∂x=0. In a circular bowl, φ is cyclic, pφ=Lz is constant, and the Routhian reduces the problem to a single radial coordinate: Vef(r)=V(r)+Lz2/(2mr2) — that is what the graph shows. In a closed system, homogeneity means the centre of mass moves uniformly. The Hamilton–Jacobi equation ∂S/∂t+H(q,∂S/∂q)=0 separates in cyclic coordinates: S=−Et+Lzφ+Sr(r); the Kepler problem is also solved this way in polar and spherical coordinates (in detail — in the “Kepler's laws” experiment). Model: the surface of the bowl is the graph of the potential V=mgh(x,y); the puck moves on a horizontal plane without friction (slopes are taken to be small).

Did you know?

  • In 1911, at the first Solvay Congress, Hendrik Lorentz asked about a pendulum whose string is slowly shortened. Albert Einstein answered: if the length changes infinitely slowly, the ratio of the energy to the frequency, E/ν, stays constant. This is one of the earliest precise examples of an adiabatic invariant.
  • Emmy Noether published her theorem linking symmetries and conservation laws in 1918, in the paper “Invariante Variationsprobleme”.

Inside the experiment

The experiment starts from a real-life situation: you predict the result, change the controls, run the experiment and draw a conclusion. Inside are missions, theory, a quiz and a guided tour in which the camera moves and explains the key points.

More experiments in this section