A free particle in 2D: L=21m(x˙2+y˙2). Find H(px,py) and write Hamilton's equations.
Recall Solution
Momenta:px=mx˙, py=my˙, so x˙=px/m, y˙=py/m.
Assemble:H=pxx˙+pyy˙−L=2mpx2+py2.
Hamilton's equations:x˙=∂px∂H=mpx,y˙=mpy,p˙x=−∂x∂H=0,p˙y=0.
Momenta are constant → straight-line motion, as expected for a free particle.
A particle sliding on a frictionless surface with L=21mq˙2−mgq (mass rising against gravity, q = height). Find H and confirm it equals the energy.
Recall Solution
Momentum:p=∂L/∂q˙=mq˙.
Invert:q˙=p/m. (We will now use this to remove every q˙.)Assemble (before substituting, keep q˙ visible):
H=pq˙−L=pq˙−(21mq˙2−mgq).Substituteq˙=p/m everywhere it appears — the first q˙ becomes p/m, and the 21mq˙2 becomes 21m(p/m)2=p2/(2m):
H=p⋅mp−21m(mp)2+mgq=mp2−2mp2+mgq=2mp2+mgq.
This substitution is legitimate because q˙=p/m holds identically once we define p; there are no leftover velocities, so H=H(q,p) as required.
Here T=p2/2m (quadratic in q˙) and V=mgq (velocity-independent), so H=T+V=E. ✓
For the pendulum H=2mℓ2pθ2−mgℓcosθ, use Hamilton's equations to recover the equation of motion, and check it against the Lagrangian result mℓ2θ¨=−mgℓsinθ.
Recall Solution
θ˙=∂pθ∂H=mℓ2pθ,p˙θ=−∂θ∂H=−mgℓsinθ.
Differentiate the first: pθ=mℓ2θ˙⇒p˙θ=mℓ2θ¨. Set equal to the second:
mℓ2θ¨=−mgℓsinθ.
This is exactly the Lagrangian equation of motion. ✓ The two first-order Hamilton equations together are equivalent to the one second-order Euler–Lagrange equation.
Show explicitly that if H has no explicit time dependence, then H is conserved along the motion, i.e. dtdH=0.
Recall Solution
Total time derivative of H(q,p,t):
dtdH=∑i∂qi∂Hq˙i+∑i∂pi∂Hp˙i+∂t∂H.
Insert Hamilton's equations q˙i=∂H/∂pi and p˙i=−∂H/∂qi:
dtdH=∑i∂qi∂H∂pi∂H−∑i∂pi∂H∂qi∂H+∂t∂H=∂t∂H.
The two sums cancel term by term. So if ∂H/∂t=0, then dH/dt=0 — H is conserved. This is the Hamiltonian face of Conservation Laws & Noether's Theorem.
A relativistic-flavoured Lagrangian L=−mc21−x˙2/c2. Find p, invert it, and show H=1−x˙2/c2mc2, then express H in terms of p.
Recall Solution
Momentum:p=∂x˙∂L=−mc2⋅1−x˙2/c2−x˙/c2=1−x˙2/c2mx˙.Assemble (before inverting, to see the structure):
H=px˙−L=1−x˙2/c2mx˙2+mc21−x˙2/c2.
Put over a common denominator 1−x˙2/c2:
H=1−x˙2/c2mx˙2+mc2(1−x˙2/c2)=1−x˙2/c2mx˙2+mc2−mx˙2=1−x˙2/c2mc2.In terms of p: from p1−x˙2/c2=mx˙, algebra gives x˙2=p2+m2c2p2c2, hence 1−x˙2/c2=p2+m2c2mc and
H=p2c2+m2c4
— the famous relativistic energy. This is why Legendre-transforming L (a function of velocity) into H (a function of momentum) is so powerful: momentum is the natural variable of energy.
A charged particle in 1D with a velocity-dependent Lagrangian L=21mx˙2+eAx˙−eφ, where A and φ are constants. Find p, invert it, and show H=2m(p−eA)2+eφ. Is H equal to T+V?
Recall Solution
Momentum:p=∂L/∂x˙=mx˙+eA. Notice: the momentum is notmx˙! It has the extra eA term.
Invert:x˙=mp−eA.
Assemble:H=px˙−L=px˙−21mx˙2−eAx˙+eφ=(p−eA)x˙−21mx˙2+eφ.
But (p−eA)=mx˙, so (p−eA)x˙=mx˙2:
H=mx˙2−21mx˙2+eφ=21mx˙2+eφ=2m(p−eA)2+eφ.Is H=T+V? Numerically H=21mx˙2+eφ=T+eφ. The kinetic energy came out right, but the canonical momentum p=mx˙+eA differs from the kinetic momentum mx˙. So while H has the energy value, expressed in p it carries the tell-tale (p−eA)2 structure. This is the seed of electromagnetic Hamiltonians.
Combine two ideas: a 1D oscillator has H=2mp2+21kx2. Compute the Poisson bracket{x,H} and {p,H} and confirm they reproduce Hamilton's equations. (Recall {f,g}=∂x∂f∂p∂g−∂p∂f∂x∂g.)
Recall Solution
{x,H}=∂x∂x∂p∂H−∂p∂x∂x∂H=1⋅mp−0=mp=x˙.✓{p,H}=∂x∂p∂p∂H−∂p∂p∂x∂H=0−1⋅kx=−kx=p˙.✓
Both match f˙={f,H}, the Poisson-bracket form of the equations of motion in Phase Space.
A bead of mass m slides frictionlessly on a straight wire that rotates in a horizontal plane at fixed angular velocity ω. Let r be the distance along the wire. Then L=21mr˙2+21mr2ω2 (V=0).
(i) Find H(r,pr). (ii) Find the total energy E=T+V. (iii) Show H=E and quantify the gap. (iv) Is H conserved?
The figure below shows both the physical set-up (left) and the punchline (right): as the bead moves out to larger r, the curves H(r) and E(r) split apart, and the red double-arrow is the exact gap mr2ω2 we compute in part (iii). Read the left panel first to see what r, ω and the bead are; then read the right panel as "same momentum pr, two different bookkeeping quantities."
Recall Solution
(i) Momentum:pr=∂L/∂r˙=mr˙⇒r˙=pr/m.
Assemble and substitute r˙=pr/m: H=prr˙−L=mpr2−(2mpr2+21mr2ω2)=2mpr2−21mr2ω2.(ii) Energy:E=T+V=21mr˙2+21mr2ω2=2mpr2+21mr2ω2 (using r˙=pr/m; recall V=0).
(iii) The gap:H−E=(−21mr2ω2)−(+21mr2ω2)=−mr2ω2=0.
So H=E−mr2ω2. This is exactly the vertical red gap in the right panel of the figure. Why it fails: the constraint ϕ=ωt is time-dependent, so T is not a pure homogeneous quadratic in r˙ — it has the r˙-independent "centrifugal" piece 21mr2ω2. Euler's theorem (which would give ∑piq˙i=2T) no longer applies to all of T.
(iv) Conserved?L has no explicit t (ω is a constant, r is the variable), so ∂L/∂t=0⇒∂H/∂t=0⇒His conserved. A conserved quantity that is not the energy.
For L=21mx˙2−21mω2x2+bxx˙ (with b a constant), find H(x,p). Then decide: is H conserved? Is H=T+V?
Recall Solution
Momentum:p=∂L/∂x˙=mx˙+bx⇒x˙=mp−bx.
Assemble:H=px˙−L=px˙−21mx˙2+21mω2x2−bxx˙=(p−bx)x˙−21mx˙2+21mω2x2.
Since (p−bx)=mx˙, we get (p−bx)x˙=mx˙2, so
H=mx˙2−21mx˙2+21mω2x2=21mx˙2+21mω2x2=2m(p−bx)2+21mω2x2.Conserved?∂L/∂t=0 (no explicit t), so H is conserved. ✓
H=T+V? The value is 21mx˙2+21mω2x2=T+V — yes, numerically H=E here. The bxx˙ term is a total time derivative (dtd(21bx2)), so it shifts the canonical momentum by bx but does not change the energy. A subtle case: the momentum is disguised, yet H=E still holds.
Consider the Lagrangian L=bxx˙−21kx2, which is linear in the velocity x˙ (no x˙2 term at all). b,k are constants.
(i) Compute the Hessian W=∂2L/∂x˙2 and show the Legendre transform is degenerate.
(ii) Try to build p and invert it — what goes wrong?
(iii) What does H=px˙−L evaluate to, and why is this the fingerprint of a singular Lagrangian?
Recall Solution
(i) Hessian:∂x˙∂L=bx, which does not contain x˙. So
W=∂x˙2∂2L=0.
Since detW=0, the non-degeneracy condition from the recipe's warning fails. This is a singular (degenerate) Lagrangian.
(ii) What goes wrong: the momentum is p=bx. Notice it depends only on x, not on x˙ — so we cannot solve it for x˙. Every value of x˙ gives the same momentum bx. Step 2 of the recipe (invert to get x˙(x,p)) is impossible. Instead we get a constraint: p−bx=0 must hold identically. The velocity is left undetermined.
(iii) The Hamiltonian:H=px˙−L=px˙−bxx˙+21kx2=(p−bx)x˙+21kx2.
On the constraint surface p=bx, the bracket (p−bx) vanishes, so
H=21kx2.
The velocity x˙ has completely disappeared — but not because we substituted it away; it dropped out because its coefficient (p−bx) is forced to zero. This is the fingerprint of a singular system: x˙ is never expressible in terms of p, and the dynamics is governed by constraints rather than by a clean invertible H(x,p). (Systematically handling such systems is Dirac's constraint theory.) Contrast this with every other problem on the page, where W=m=0 and the inversion always succeeded.