Worked examples — Liouville's theorem — phase space volume conservation
This page is a case-by-case workout of Liouville's theorem. The parent note proved why Hamiltonian flow keeps phase-space volume constant. Here we throw every kind of system at that claim and watch it hold — or, for the deliberate counterexamples, watch it fail so you learn exactly where the boundary lies.
Before we start, one tiny reminder of the two objects we keep measuring, so no symbol sneaks in undefined:
The scenario matrix
Every cell below is a class of situation this topic can throw at you. The examples that follow are tagged with the cell they cover, so together they fill the whole grid.
| # | Case class | What is special about it | Covered by |
|---|---|---|---|
| A | Free particle (zero force) | , pure shear | Ex 1 |
| B | Restoring force (oscillator) | rigid rotation of the blob | Ex 2 |
| C | Multiple degrees of freedom () | must sum over all | Ex 3 |
| D | Degenerate blob (zero-area line/point) | limiting input, area stays | Ex 4 |
| E | Sign / direction cases (, backward time ) | flow reverses, must still preserve | Ex 5 |
| F | Non-Hamiltonian: dissipation | divergence , blob shrinks | Ex 6 |
| G | Non-Hamiltonian: anti-damping / pumping | divergence , blob grows | Ex 7 |
| H | Real-world word problem (beam of particles) | apply theorem to physical density | Ex 8 |
| I | Exam twist: nonlinear , is it still divergence-free? | general Hamiltonian, prove | Ex 9 |
Example 1 — Free particle: pure shear (cell A)
Forecast: guess before reading — bigger moves faster, so the shape must lean over. Does the area change? Write down your guess.

- Write the flow. , and . Why this step? Everything downstream needs the actual velocity field; Hamilton's equations give it.
- Move every point. After time , , while (unchanged, since ). Why this step? Constant velocity displacement velocity time. Points with larger slide further right — this is a shear (look at the red top edge in the figure sliding past the blue bottom edge).
- Compute the Jacobian. The map is . Its matrix is Why this step? is exactly the area-multiplication factor. A shear matrix always has .
- Area. , so . Why this step? By the bridge formula an area is just ; with the original passes through untouched — the shear tilted the shape but multiplied its area by .
Verify: Divergence check: — flow is divergence-free, so area cannot change. Units: · = length·momentum = action; the parallelogram carries the same action . ✔
Example 2 — Harmonic oscillator: rigid rotation (cell B)
Forecast: the phase portrait is circles. A quarter turn is . Does a rotation change area? Guess.

- Flow. , (with ). Why this step? Plug into Hamilton's equations. This is the classic "clockwise circulation" field — every arrow points off the radius (see the green arrows in the figure).
- Solve. The solution is a rotation: , . Why this step? is the equation of a rotation at unit angular speed; the whole blob turns rigidly.
- Jacobian. The map matrix is the rotation Why this step? of any rotation is — that is the algebraic reason a rotating blob keeps its area.
- After . Area . A centre at moves to . Why this step? Area ; the centre is just one point run through the rotation solution of step 2, so we substitute into it.
Verify: Divergence ✔. Numeric: centre new position , distance from origin = original radius pure rotation, area unchanged. ✔
Example 3 — Two degrees of freedom (cell C)
Forecast: each pair rotates. Two rotations stacked — does -volume survive?
- Flow, all four components. . Why this step? With you must list every coordinate's velocity — Liouville sums over all , not just one.
- Divergence — sum over everything. Why this step? Volume conservation in higher dimensions requires the total divergence to vanish. Each pair contributes , so the whole does too.
- Jacobian. The map is block-diagonal: two independent rotation blocks. . Why this step? Determinant of a block-diagonal matrix is the product of block determinants.
- Volume. for all . Why this step? The bridge formula reads ; with the -volume is frozen — the two rotations independently preserve area, and their product preserves -volume.
Verify: Total divergence ✔. Block determinants , so unchanged. ✔
Example 4 — Degenerate blob: a line of zero area (cell D)
Forecast: an area- object under an area-preserving flow — trick question or not? Guess.
- Flow the segment. Each point (from Ex 1's map). Why this step? Same shear map applies; we just feed it a degenerate input.
- New shape. Bottom point ; top point . The segment becomes a slanted line from to . Why this step? A shear maps a straight line to a straight line — still one-dimensional.
- Area. A line has zero width, so area before and after. Why this step? multiplies any area by ; . Liouville is perfectly consistent with degenerate blobs — "volume preserved" includes "zero stays zero."
Verify: endpoints and ; the map is invertible () so no folding, area stays . ✔
Example 5 — Sign cases: negative momentum & backward time (cell E)
Forecast: negative means moving left; backward time means the shear tilts the other way. Does the sign of anything break conservation?

- (a) Negative momentum. Map is . With , points drift left (see the yellow arrows pointing left in the figure). The Jacobian is still , . Why this step? The Jacobian does not depend on the sign of — it depends only on the map's structure. So area regardless of direction of motion.
- (b) Backward time. Set : map is , matrix , . Why this step? Hamiltonian flow is time-reversible; running it backward is another volume-preserving shear (tilting the opposite way). Volume is conserved in both time directions.
- Areas. (a) . (b) . Why this step? Both maps have , and area ; neither the sign of nor the sign of enters the determinant, so both blobs keep area .
Verify: Both Jacobian determinants equal ; original area ⇒ both answers . Direction of drift changed, area did not. ✔
Example 6 — Dissipation: the blob shrinks (cell F)
Forecast: friction eats energy. Where do the states pile up? Guess whether area grows or shrinks.

- Divergence. . Why this step? Divergence is the instantaneous fractional rate of area change: .
- Solve the area ODE. . Why this step? Constant fractional shrink rate integrates to an exponential. The blob spirals into the origin (the attractor) — see the inward green spiral.
- Numbers. At : . Why this step? We evaluate the general law from step 2 at a concrete time , turning the abstract exponential into a number you can check — this makes the "blob shrinks" statement quantitative.
Verify: Divergence ⇒ Liouville violated (as it must be — no Hamiltonian generates this). ✔. This is exactly why the theorem needs a genuine Hamiltonian.
Example 7 — Anti-damping / pumping: the blob grows (cell G)
Forecast: the opposite sign — states now fly outward. Grows or shrinks?
- Divergence. . Why this step? A positive divergence means the flow locally expands. This is the mirror image of Ex 6.
- Area law. . Why this step? Positive fractional rate ⇒ exponential growth; the spiral runs outward, away from the origin.
- Number. At : . Why this step? We plug into the general law from step 2, giving a concrete number that quantifies exactly how fast a pumped blob inflates — the numeric counterpart of the general derivation.
Verify: Divergence ⇒ not volume-preserving, not Hamiltonian. ✔. Together, Ex 6 and Ex 7 bracket the Hamiltonian case: only divergence exactly conserves volume.
Example 8 — Real-world word problem: a beam of particles (cell H)
Forecast: we're squeezing the beam narrower in position. Intuition from Liouville: something must pay. Guess what happens to momentum spread.
- Emittance is conserved. The lens + drift is a Hamiltonian (force-based) system, so phase-space area is frozen: . Why this step? This is Liouville applied physically — you cannot shrink both position spread and momentum spread at once. This is the beam-physics form of the theorem.
- Solve for . Area (best case, no filamentation waste). , so . Why this step? Fixed area with a smaller base forces a taller height — the blob got narrower in , so it must get taller in .
- Interpret. Squeezing the beam to its width quadruples its momentum (angular) spread. This is a hard physical limit on how tightly any beam can be focused. Why this step? We translate the bare number back into physics: because Liouville freezes the area, any gain in spatial focus is paid for by an equal loss in momentum focus — that trade-off is the whole practical content of the theorem for accelerators.
Verify: ✔. The factor: -spread ⇒ -spread (from to ). Units of area (emittance) preserved. ✔
Example 9 — Exam twist: a nonlinear Hamiltonian, still divergence-free? (cell I)
Forecast: nonlinearity often breaks nice properties. Bet: does the divergence still vanish, or does ruin it?
- Flow. , and . Why this step? Hamilton's equations don't care whether is linear or not.
- Divergence. Why this step? The key: depends only on (so kills it) and depends only on (so kills it). The mixed-partial cancellation is what makes this automatic for any — nonlinearity is irrelevant.
- At the point. , exactly, regardless of . So at the divergence is . Why this step? Since step 2 showed the divergence is identically as a function of , evaluating at any specific point — including this exam value — must return ; we do it to confirm no special point sneaks in a nonzero contribution.
Verify: Symbolically for ✔. The lesson: every Hamiltonian, linear or not, gives a divergence-free flow — that's the whole robustness of Liouville's theorem. See also Poisson Brackets and Hamilton's Equations for the structural reason.
Recall Which cell did I just conquer?
Free/shear ::: Ex 1 (A) Rigid rotation ::: Ex 2 (B) Many DOF, sum over all ::: Ex 3 (C) Degenerate zero-area blob ::: Ex 4 (D) Negative and backward time ::: Ex 5 (E) Dissipation shrinks area ::: Ex 6 (F) Pumping grows area ::: Ex 7 (G) Beam emittance limit ::: Ex 8 (H) Nonlinear still divergence-free ::: Ex 9 (I)
Related structure worth revisiting: Phase Space, Canonical Transformations, Statistical Mechanics — Ensembles, Poincaré Recurrence Theorem, Symplectic Geometry.