2.1.16 · D5Analytical Mechanics

Question bank — Canonical transformations — generating functions

2,130 words10 min readBack to topic

Before the traps, we rebuild the three ideas the whole page leans on — the master relation, the four generator types, and the phase-space picture — so no symbol is ever used before it is earned.

The picture below is the arena for every question that follows: phase space, the flat sheet whose two axes are (horizontal) and (vertical). A state of the system is one dot; as time runs the dot traces a curve. A CT redraws the grid on this sheet without tearing it.

Figure — Canonical transformations — generating functions

The one geometric fact that makes CTs special is that they preserve oriented area on this sheet. The next figure shows a little patch of states being carried by a CT: it can stretch and shear, but its area is unchanged — this is the visual meaning of the Poisson bracket test and of Liouville's theorem.

Figure — Canonical transformations — generating functions

True or false — justify

TF1. "Every invertible smooth map is canonical."
False — invertibility is not enough; the map must preserve the symplectic (area) structure, equivalently . Most random smooth maps stretch area unevenly and Hamilton's equations break.
TF2. "If the generating function has no explicit time dependence, then as functions on phase space."
True — since and , the value of the new Hamiltonian equals the old one at each phase point (just re-expressed in ).
TF3. "A canonical transformation cannot change the numerical value of the energy at a point."
False in general — when depends on , , so the new Hamiltonian's value differs; energy conservation as a concept survives but the number attached to it can change.
TF4. "The four generator types describe four different kinds of canonical transformation."
False — they describe the same CTs written with different independent variables; the type is a bookkeeping choice about which old/new pair is treated as free.
TF5. " generates the identity transformation."
True — the Type-2 rules give and , i.e. nothing changes; this "do-nothing" generator is the base point from which infinitesimal CTs grow.
TF6. "Because , is canonical, position and momentum play interchangeable roles."
True — with the Type-1 rules give (so ) and ; the minus is forced by the boxed relation's right-hand , and geometrically it is the rotation of the sheet (rotations preserve area, so it is canonical), showing phase space has no built-in "position" (see Symplectic geometry).
TF7. "The generating-function method might accidentally produce a non-canonical map."
False — any transformation derived from a valid generator is canonical by construction, because it descends from the shared variational principle (the boxed master relation) that fixes Hamilton's form.
TF8. "Canonical transformations preserve phase-space volume."
True — they preserve the symplectic area of figure s02, hence volume in higher dimensions (this is Liouville's theorem viewed through the CT lens).
TF9. "A time-dependent CT that makes leaves the system with no dynamics."
False — means the new variables are all constants of motion; the dynamics is fully encoded in the transformation itself, which is exactly the Hamilton–Jacobi equation strategy.

Spot the error

SE1. "Type-1 rule: and ."
The sign is wrong: . The minus arises because sits on the right of the master relation, so moving it across flips its sign.
SE2. "For we get ."
Wrong sign again: . Type 2 was built by a Legendre swap () precisely to make this term come out positive — as listed in the four-types box.
SE3. "We can freely choose , mixing an old coordinate with its own old momentum."
A generator must depend on one old and one new variable per degree of freedom; uses two old variables and cannot close the transformation equations.
SE4. "Since , adding a constant to changes ."
A constant has zero time-derivative and zero spatial derivatives, so it changes neither nor the transformation; only genuine dependence on matters.
SE5. "In the oscillator example , we solved by integrating a differential equation."
No differential equation was solved — the whole point is that the generator makes cyclic (), so the motion , follows purely algebraically.
SE6. "A point transformation is only canonical for linear ."
Any invertible point transformation is canonical once the momenta transform correctly (); nonlinearity is fine, it is generated by .
SE7. "Because Poisson brackets are invariant under CTs, computing can never test canonicity."
Invariance is why the bracket is a test: a proposed map is canonical iff (and ) evaluated in the old variables using the definition above.

Why questions

WHY1. Why must the two integrands differ by a total time derivative , not merely a constant?
A total time derivative integrates to a boundary term whose variation vanishes at fixed endpoints, so it leaves the equations of motion untouched; a mere constant is a special (trivial) case that cannot generate nontrivial variable changes.
WHY2. Why is the generating function a single scalar function rather than a set of formulas for each new variable?
All the transformation equations are partial derivatives of the one scalar , which automatically guarantees the integrability/consistency (mixed partials match) that keeps the map canonical.
WHY3. Why does the Legendre transformation appear when passing from to ?
Switching the free variable from to its conjugate is exactly a change of "natural variable," which is what a Legendre transformation does; we subtract to trade for .
WHY4. Why can a clever CT make a Hamiltonian's coordinate cyclic, and why is that a win?
If does not appear in then , so is conserved and is constant — the motion becomes trivial straight-line drift, the seed of Action–angle variables.
WHY5. Why are and treated as independent differentials when matching coefficients?
In the master relation (Type 1) are chosen as independent free variables, so their differentials can be varied separately; only then must each coefficient match on both sides.
WHY6. Why does the generating-function trick fail if we insist depend on both members of a conjugate pair simultaneously?
Then the transformation equations become degenerate — you cannot solve for all new variables in terms of old ones — because the pair is not independent under the symplectic constraint.

Edge cases

EC1. What happens to the Type-1 relations if is independent of ?
Then , forcing all new momenta to vanish — a degenerate, non-invertible map that is not a valid CT.
EC2. Is the swap , its own inverse?
Applying it twice gives , , i.e. a rotation in phase space, not the identity — so it is order-four, a nice reminder that CTs form a group.
EC3. What is the "smallest" nontrivial CT near the identity?
An infinitesimal one, ; to first order it shifts variables by , generating the Hamiltonian flow of itself.
EC4. If is already zero, is any transformation canonical?
The dynamics is trivial (), but a map is still canonical only if it preserves the symplectic form; canonicity is a property of the map, independent of whichever you carry.
EC5. Does a time-dependent CT preserve energy conservation?
Not necessarily — with , and may itself depend on time, so the conserved quantity (if any) is , not the original .
EC6. What is the limiting behaviour of the oscillator generator as ?
Using , the product stays finite, so (its maximum) while — the turning point where all energy is kinetic, with finite throughout.

Recall One-line self-audit
  • Can I state the master relation from memory and locate every sign? ::: ; the minus on (Types 1,3) comes from living on the right.
  • Do I know the one algebraic test of canonicity? ::: Poisson brackets , .
  • Can I explain why cyclic is the goal? ::: then drifts linearly — the whole trick of Hamilton–Jacobi and action–angle variables.

Connections