Intuition What this page is for
The parent note gave you the machinery. Here we hunt down every kind of problem a canonical
transformation (CT) can throw at you and grind through one of each. You will never meet a case on
an exam that you did not first meet here. Before every example, you forecast the answer —
guessing sharpens intuition even when you're wrong.
If any symbol looks unfamiliar, it was built in the parent note ; the four generator types, the sign rules, and the master relation all live there. One reminder we will lean on: throughout, t is the independent time coordinate — the single parameter every variable is a function of, exactly as in the parent's Hamilton's equations.
Every generating-function problem falls into one of these cells . Our job below is to hit every one.
Cell
What makes it distinct
Covered by
A. Direct forward
given F , read off ( Q , P ) by differentiating
Ex 1
B. Implicit inversion
relations tangle q , Q together; must solve for them
Ex 2
C. Sign / branch care
square roots & inverse trig → quadrant + sign ambiguity
Ex 3
D. Degenerate input
a variable is zero ; the origin q = p = 0 (P = 0 ) is the one true coordinate singularity of the oscillator action–angle map
Ex 4
E. Time-dependent F
∂ F / ∂ t = 0 , so K = H
Ex 5
F. Test-only (no F given)
prove a map is canonical via Poisson brackets
Ex 6
G. Word problem
physical oscillator, real numbers & units
Ex 7
H. Exam twist
a "trap": choose the right type, or catch a non-canonical map
Ex 8
We proceed A→H. Three figures carry the geometry: Figure 1 = the phase-space picture (Ex 3), Figure 2 = the sign-quadrant schematic (Ex 3), Figure 3 = the non-canonical bracket plot (Ex 8).
F 2 = q P + 2 1 P 2 (single degree of freedom)
Find the transformation ( q , p ) → ( Q , P ) .
Forecast: the q P part is the identity (from the parent). The extra 2 1 P 2 should
nudge Q by something linear in P . Guess Q = q + P , p = P .
Steps.
This is a Type-2 generator, so use p = ∂ F 2 / ∂ q and Q = ∂ F 2 / ∂ P .
Why this step? F 2 depends on old q and new P — that pairing is the definition of Type 2.
p = ∂ q ∂ ( q P + 2 1 P 2 ) = P . Why? only the q P term has a q ; its q -derivative pulls down P .
Q = ∂ P ∂ ( q P + 2 1 P 2 ) = q + P . Why? differentiate each term in P : q P → q , 2 1 P 2 → P .
Invert to express new-in-old: step 2 says P = p ; substitute that into step 3 to get Q = q + p .
Why this step? steps 2–3 give the answer partly in terms of the new variable P ; the transformation must read new-in-old, so we use the already-solved relation P = p to eliminate P .
Verify: compute the Poisson bracket { Q , P } = ∂ q ∂ Q ∂ p ∂ P − ∂ p ∂ Q ∂ q ∂ P = ( 1 ) ( 1 ) − ( 1 ) ( 0 ) = 1 . ✓ Canonical. Forecast was right.
F 1 = 2 Q q 2
Find ( Q , P ) in terms of ( q , p ) .
Forecast: F 1 mixes q and Q nonlinearly, so we'll get p and P each as ratios; we'll have to algebraically untangle to get Q ( q , p ) . Expect Q ∝ q / p .
Steps.
Type-1 rules: p = ∂ F 1 / ∂ q , P = − ∂ F 1 / ∂ Q . Why? F 1 ( q , Q ) = old q , new Q .
p = ∂ q ∂ 2 Q q 2 = Q q . Why? Q is held fixed; d q d q 2 = 2 q .
P = − ∂ Q ∂ 2 Q q 2 = − ( − 2 Q 2 q 2 ) = 2 Q 2 q 2 . Why? d Q d Q − 1 = − Q − 2 , and the leading minus flips it positive.
Untangle. From step 2, Q = q / p . Substitute into step 3: P = 2 ( q / p ) 2 q 2 = 2 q 2 q 2 p 2 = 2 p 2 .
Why this step? the problem asks for new variables as functions of old ones — step 2/3 gave them in terms of a leftover Q , which we eliminate.
So Q = p q , P = 2 p 2 .
Verify: { Q , P } = ∂ q ∂ Q ∂ p ∂ P − ∂ p ∂ Q ∂ q ∂ P . Compute: ∂ q ∂ Q = 1/ p , ∂ p ∂ P = p , ∂ p ∂ Q = − q / p 2 , ∂ q ∂ P = 0 . So { Q , P } = ( 1/ p ) ( p ) − ( − q / p 2 ) ( 0 ) = 1 . ✓
Here geometry matters, so we draw the phase plane. The phase point is ( q , p ) ; its distance from the origin and its angle both carry meaning. Figure 1 shows the phase plane with one worked point in each quadrant.
Worked example The oscillator generator, done carefully:
F 1 = 2 1 mω q 2 cot Q with m = ω = 1
We found in the parent note q = 2 P sin Q , p = 2 P cos Q (with m = ω = 1 ). Given a phase point ( q , p ) = ( − 1 , − 1 ) , find ( Q , P ) — and get the quadrant right .
Forecast: q , p both negative sits in the third quadrant of the phase plane (see Figure 1). Its radius is 2 . So expect P = 1 and Q an angle in the third quadrant, near 22 5 ∘ .
Steps.
Square-and-add to kill the angle: q 2 + p 2 = 2 P ( sin 2 Q + cos 2 Q ) = 2 P . Why this step? sin 2 + cos 2 = 1 isolates P with no sign ambiguity — squares are always ≥ 0 .
P = 2 q 2 + p 2 = 2 1 + 1 = 1 . Why? just plug in; P is the (radius2 )/2.
Divide to get the angle: p q = cos Q sin Q = tan Q , so naively Q = arctan ( q / p ) = arctan ( 1 ) = 4 5 ∘ . Why the caution? tan repeats every 18 0 ∘ , so arctan alone cannot tell 4 5 ∘ from 22 5 ∘ .
Fix the branch using the signs of q and p (look at the orange point in Figure 1): q < 0 means sin Q < 0 , p < 0 means cos Q < 0 — both negative ⟹ third quadrant ⟹ add 18 0 ∘ : Q = 4 5 ∘ + 18 0 ∘ = 22 5 ∘ = 4 5 π .
Why this step? this is exactly the arctan-quadrant fix: the ratio loses sign information, the individual signs restore it.
All four cases (the four coloured points in Figure 1; the quadrant logic is schematised in Figure 2), with r = q 2 + p 2 :
( q , p )
quadrant
sin Q
cos Q
Q
why the shift?
( + , + )
I
+
+
arctan ( q / p )
ratio > 0 , arctan already lands in ( 0 , 9 0 ∘ )
( + , − )
II
+
−
arctan ( q / p ) + 18 0 ∘
q / p < 0 so arctan ( q / p ) ∈ ( − 9 0 ∘ , 0 ) — negative , off by 18 0 ∘ ; add it
( − , − )
III
−
−
arctan ( q / p ) + 18 0 ∘
q / p > 0 so arctan gives ( 0 , 9 0 ∘ ) but true angle is 18 0 ∘ ahead; add it
( − , + )
IV
−
+
arctan ( q / p ) + 36 0 ∘ (or $-
...
Boundary / axis cases (where the ratio q / p is ill-posed):
point
which is 0
tan Q = q / p ?
correct Q
reason
q = 0 , p > 0
sin Q = 0
0/ p = 0 , OK
Q = 0 ∘
on + p axis; cos Q > 0
q = 0 , p < 0
sin Q = 0
0/ p = 0 , OK
Q = 18 0 ∘
on − p axis; cos Q < 0
q > 0 , p = 0
cos Q = 0
q /0 = ∞ undefined
Q = 9 0 ∘
division fails; read from sin Q > 0
q < 0 , p = 0
cos Q = 0
q /0 = ∞ undefined
Q = 27 0 ∘
division fails; read from sin Q < 0
q = 0 , p = 0
both
0/0 indeterminate
Q undefined
origin: P = 0 , angle meaningless (see Ex 4)
Why the axis cases matter: the branch-fix procedure of step 4 divides by p ; on the p = 0 axis that division blows up, so you must read the angle straight off the surviving sign of sin Q (i.e. of q ) instead of trusting the ratio.
Verify: reconstruct — q = 2 ⋅ 1 sin 22 5 ∘ = 2 ⋅ ( − 2 1 ) = − 1 ✓, p = 2 cos 22 5 ∘ = − 1 ✓.
Common mistake Blindly trusting
arctan ( q / p )
A calculator's arctan only ever returns angles in ( − 9 0 ∘ , 9 0 ∘ ) . For ( − 1 , − 1 ) it says 4 5 ∘ — wrong quadrant . Always cross-check the signs of q and p separately. (Same trap as recovering a vector's angle from its components.)
Figure 2 turns those sign rules into a schematic map of the four quadrants plus the four axis cases.
Worked example What happens at
Q = 0 in the oscillator generator?
Using F 1 = 2 1 mω q 2 cot Q , examine the point where Q → 0 .
Forecast: cot Q = cos Q / sin Q → ∞ as Q → 0 . Something blows up. But the physical answer (q , p ) should stay finite — this is a coordinate artefact, like the North Pole on a map of Earth.
Steps.
Recall q = 2 P / ( mω ) sin Q . As Q → 0 , sin Q → 0 , so q → 0 . Why? the sine factor forces the position to zero regardless of P .
And p = 2 P mω cos Q → 2 P mω (maximal). Why? cos 0 = 1 ; the particle is at the origin moving fastest — exactly the oscillator passing through q = 0 .
But the generator itself: F 1 ∝ q 2 cot Q . With q = 2 P / ( mω ) sin Q , q 2 cot Q = mω 2 P sin 2 Q ⋅ sin Q cos Q = mω 2 P sin Q cos Q → 0 .
Why this step? the apparent blow-up cancels : sin 2 Q beats the single 1/ sin Q . The transformation is perfectly regular at Q = 0 ; only the formula's naive form looks singular.
Verify (limit): Q → 0 lim q 2 cot Q with q = 2 P sin Q (m = ω = 1 ) = lim Q → 0 2 P sin Q cos Q = 0 . ✓ No true singularity.
Where it does break: the Jacobian ∂ ( Q , P ) / ∂ ( q , p ) must be nonzero for the map to be locally invertible. At q = 0 , p = 0 (the origin, P = 0 ) the angle Q is undefined — that single point is the genuine coordinate singularity, just like longitude at a pole.
Worked example A uniformly accelerating frame via
F 2 = ( q − 2 1 a t 2 ) P + ma t q
A free particle has H = 2 m p 2 . Use the above F 2 (with constant acceleration a , and t the independent time coordinate every variable evolves in) and find the new Hamiltonian K . Here Q is the position in a frame accelerating at a .
Forecast: because F 2 depends explicitly on t , the parent's rule K = H + ∂ F / ∂ t means K = H . The accelerating frame should introduce a fictitious force term (something linear in Q ).
Steps.
Type-2 relations: p = ∂ F 2 / ∂ q , Q = ∂ F 2 / ∂ P , K = H + ∂ F 2 / ∂ t . Why? F 2 ( q , P , t ) ; the last term appears because F 2 depends on the time coordinate t explicitly.
p = ∂ q ∂ F 2 = P + ma t . Why? ∂ q ∂ [( q − 2 1 a t 2 ) P ] = P and ∂ q ∂ [ ma tq ] = ma t . So P = p − ma t (momentum measured relative to the moving frame).
Q = ∂ P ∂ F 2 = q − 2 1 a t 2 . Why? only the first bracket carries P . So Q is the position minus the frame's displacement 2 1 a t 2 — exactly "position in the accelerating frame."
∂ t ∂ F 2 = ( − a t ) P + ma q = − a tP + ma q . Why? differentiate the explicit t 's (holding q , P fixed as the partial demands): ∂ t ∂ ( − 2 1 a t 2 ) P = − a tP , and ∂ t ∂ ( ma tq ) = ma q .
Assemble K = H + ∂ t F 2 = 2 m p 2 − a tP + ma q . Now rewrite in new variables (p = P + ma t , q = Q + 2 1 a t 2 ):
K = 2 m ( P + ma t ) 2 − a tP + ma ( Q + 2 1 a t 2 ) .
Expand 2 m ( P + ma t ) 2 = 2 m P 2 + a tP + 2 m a 2 t 2 . The + a tP cancels the − a tP :
K = 2 m P 2 + ma Q + m a 2 t 2 ( 2 1 m a 2 t 2 + 2 1 m a 2 t 2 ) .
Why this step? we must express K in its own variables to read off dynamics; the leftover pure-time term m a 2 t 2 adds no force (its Q , P derivatives vanish) and can be dropped.
Effective Hamiltonian: K = 2 m P 2 + ma Q . The term ma Q is a linear potential = fictitious force − ma — precisely what you feel in an accelerating car.
Why dropping m a 2 t 2 is legitimate: a term depending on t alone is the total time derivative of the function ∫ m a 2 t 2 d t , and adding a total time derivative to a Hamiltonian is a canonical gauge change — it enters the action only as an endpoint term, so it leaves Q ˙ = ∂ K / ∂ P and P ˙ = − ∂ K / ∂ Q completely unchanged (its Q - and P -derivatives are zero). No dynamics is lost.
Verify: Hamilton in new vars: Q ˙ = ∂ K / ∂ P = P / m , P ˙ = − ∂ K / ∂ Q = − ma . So in the frame the particle accelerates at − a — the correct pseudo-force. ✓ (See Hamilton–Jacobi equation for the extreme case that drives K → 0 .)
Q = ln ( q s i n p ) , P = q cot p canonical?
No F supplied. Test directly.
Forecast: these look engineered to work out — bet on { Q , P } = 1 .
Domain first. For Q = ln ( sin p / q ) to be a real number we need the argument of the log positive : q sin p > 0 . Restrict to the natural patch q > 0 and 0 < p < π (so sin p > 0 ); then cot p in P is finite except at p = 0 , π (where sin p = 0 and both Q and P blow up). Why this matters: the map is only a valid canonical transformation on the open region where its formulas are smooth and invertible — the log and the cot each carve out that region. On the boundary p → 0 + or p → π − , Q → + ∞ : an edge, not part of the chart.
Steps.
The only algebraic test of canonicity is { Q , P } = 1 (one degree of freedom). Why this step? preserving the fundamental Poisson bracket { Q , P } = 1 is equivalent to preserving Hamilton's equations — see Poisson brackets .
Write Q = ln sin p − ln q (valid because both factors are positive on our patch). Partials: ∂ q ∂ Q = − q 1 , ∂ p ∂ Q = cot p . Why? chain rule on each log.
P = q cot p : ∂ q ∂ P = cot p , ∂ p ∂ P = − q csc 2 p . Why? d p d cot p = − csc 2 p .
{ Q , P } = ∂ q ∂ Q ∂ p ∂ P − ∂ p ∂ Q ∂ q ∂ P = ( − q 1 ) ( − q csc 2 p ) − ( cot p ) ( cot p ) = csc 2 p − cot 2 p = 1.
Why the last equality? the identity csc 2 p − cot 2 p = 1 (Pythagoras divided by sin 2 ).
Verify: { Q , P } = 1 on the whole patch q > 0 , 0 < p < π . ✓ Canonical there.
Worked example A mass on a spring, solved by generator
A block of mass m = 2 kg on a spring of constant k = 8 N/m starts at q 0 = 0.10 m , at rest. Use the oscillator generator to find the amplitude in action–angle form and the period.
Forecast: angular frequency ω = k / m = 2 rad/s , so period ≈ 3.14 s . Energy is all potential at the start: E = 2 1 k q 0 2 .
Steps.
ω = k / m = 8/2 = 2 rad/s . Why? the harmonic Hamiltonian H = 2 m p 2 + 2 1 m ω 2 q 2 demands m ω 2 = k , so ω = k / m .
Total energy: at rest at q 0 , E = 2 1 k q 0 2 = 2 1 ( 8 ) ( 0.10 ) 2 = 0.04 J . Why? p = 0 initially, so H = spring potential energy only.
From the parent, K = ω P and K = E (energy conserved, F time-independent so K = H = E ). Hence the action P = E / ω = 0.04/2 = 0.02 J⋅s . Why this step? Q is cyclic ⟹ P is a conserved constant equal to E / ω .
Angle evolves as Q = ω t + ϕ (t = the independent time coordinate). Period T = 2 π / ω = 2 π /2 = π ≈ 3.1416 s . Why? Q advances by 2 π each cycle at constant rate Q ˙ = ω .
Amplitude check via q = 2 P / ( mω ) sin Q : max q m a x = 2 ( 0.02 ) / ( 2 ⋅ 2 ) = 0.01 = 0.10 m = q 0 . Why? started at rest at the turning point, so q 0 is the amplitude.
Verify (units & numbers): [ P ] = J⋅s (action, correct dimension); ω = 2 rad/s , E = 0.04 J , P = 0.02 J⋅s , T = π s ≈ 3.14 s , amplitude = 0.10 m . ✓ See Action–angle variables .
Q = q 2 , P = p canonical? If not, fix the momentum.
Forecast: doubling-type maps usually break the bracket. Bet it's not canonical, and the repair scales P by 1/ ( 2 q ) .
Steps.
Test { Q , P } . ∂ q ∂ Q = 2 q , ∂ p ∂ Q = 0 , ∂ q ∂ P = 0 , ∂ p ∂ P = 1 . Why? these are the only nonzero partial derivatives of Q = q 2 and P = p .
{ Q , P } = ( 2 q ) ( 1 ) − ( 0 ) ( 0 ) = 2 q = 1 . Why this matters? a canonical map must give exactly 1 ; 2 q fails everywhere except q = 2 1 . So Q = q 2 , P = p is not canonical.
Repair — fix the momentum. Keep Q = q 2 but seek P = f ( q ) p with { Q , P } = 1 . Then { q 2 , f ( q ) p } = ∂ q ∂ ( q 2 ) ∂ p ∂ ( f ( q ) p ) = ( 2 q ) f ( q ) = 1 ⇒ f ( q ) = 2 q 1 . Why this step? we solve for the multiplier that forces the bracket to 1 ; only a q -dependent scaling of p can cancel the offending factor 2 q .
So the canonical version is Q = q 2 , P = 2 q p . Why this is the fix promised in the statement: the coordinate change Q = q 2 stays, and only the momentum is rescaled by 1/ ( 2 q ) to restore { Q , P } = 1 .
Verify: { q 2 , 2 q p } = ∂ q ∂ ( q 2 ) ∂ p ∂ ( 2 q p ) − 0 = ( 2 q ) ( 2 q 1 ) = 1 . ✓
Sanity via a generator: this is exactly Type-2 F 2 = q 2 P . Check: Q = ∂ P F 2 = q 2 ✓ and p = ∂ q F 2 = 2 q P ⇒ P = p / ( 2 q ) ✓. Consistent. Figure 3 plots { Q , P } = 2 q against the required value 1 , showing the single accidental crossing at q = 2 1 .
Mnemonic The one universal test
When in doubt, compute { Q , P } . If it equals 1 (or δ ij in many variables), the map is canonical no matter how it was built. Generators guarantee it; suspicious maps must earn it.
Recall Test yourself (hide answers)
In Ex 3, why can't arctan ( q / p ) alone give Q , and what happens on the p = 0 axis?
In Ex 4, does F 1 blowing up at Q = 0 mean the transformation is singular there? Where is the one true singularity?
In Ex 5, which term of K is the fictitious force, and why can we drop the pure-time term?
In Ex 6, what domain makes Q = ln ( sin p / q ) well-defined?
In Ex 8, what multiplier repairs Q = q 2 ?
For which point does Q = q 2 , P = p accidentally satisfy the bracket? Only q = 2 1 , where { Q , P } = 2 q = 1 .
Action of the m = 2 , k = 8 block? P = E / ω = 0.04/2 = 0.02 J⋅s .
Period of that block? T = 2 π / ω = π ≈ 3.14 s .
Effective Hamiltonian in Ex 5? K = 2 m P 2 + ma Q , giving pseudo-force − ma .
Why can a pure-time term be dropped from K ? It is a total time derivative — a canonical gauge change — so its Q , P derivatives vanish and dynamics is unchanged.
On the p = 0 axis, why does the arctan branch-fix fail? It divides by p ; instead read Q straight from the sign of sin Q (i.e. of q ): q > 0 ⇒ 9 0 ∘ , q < 0 ⇒ 27 0 ∘ .
Where is the one true coordinate singularity of the oscillator action–angle map? The origin q = p = 0 (P = 0 ), where the angle Q is undefined.
Domain that makes Ex 6's map well-defined? q > 0 and 0 < p < π (so sin p / q > 0 for the log and cot p finite).