2.1.11 · D4Analytical Mechanics

Exercises — Hamiltonian — definition H = Σpᵢq̇ᵢ − L

3,372 words15 min readBack to topic

Before we start, fix two pieces of vocabulary that every trap on this page leans on.

The recipe we will use over and over (memorise it — it is the whole game):


Level 1 — Recognition

L1.1

Which of these is the correct definition of the conjugate momentum ? (a)   (b)   (c)   (d)

Recall Solution

(b). The conjugate (generalized) momentum is defined as the derivative of with respect to the velocity , not the coordinate.

  • (a) is only true for a free particle with ; it is a special case, not the definition.
  • (c) is by the Euler–Lagrange equation, not .
  • (d) is (Hamilton's equation), not .

L1.2

A student writes and stops. Is this a valid final Hamiltonian?

Recall Solution

No. must be a function of only. This expression still contains . You must invert and substitute, giving .

L1.3

State how many equations of motion Hamilton's formulation gives for a system with degrees of freedom, and their order.

Recall Solution

first-order ODEs: and . This replaces the second-order Euler–Lagrange equations of Lagrangian Mechanics.


Level 2 — Application

L2.1

For (1D harmonic oscillator), find .

Recall Solution

Momentum: . Invert: . Assemble & substitute:

L2.2

A free particle in 2D: . Find and write Hamilton's equations.

Recall Solution

Momenta: , , so , . Assemble: . Hamilton's equations: Momenta are constant → straight-line motion, as expected for a free particle.

L2.3

A particle sliding on a frictionless surface with (mass rising against gravity, = height). Find and confirm it equals the energy.

Recall Solution

Momentum: . Invert: . (We will now use this to remove every .) Assemble (before substituting, keep visible): Substitute everywhere it appears — the first becomes , and the becomes : This substitution is legitimate because holds identically once we define ; there are no leftover velocities, so as required. Here (quadratic in ) and (velocity-independent), so . ✓


Level 3 — Analysis

L3.1

For the pendulum , use Hamilton's equations to recover the equation of motion, and check it against the Lagrangian result .

Recall Solution

Differentiate the first: . Set equal to the second: 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.

L3.2

Show explicitly that if has no explicit time dependence, then is conserved along the motion, i.e. .

Recall Solution

Total time derivative of : Insert Hamilton's equations and : The two sums cancel term by term. So if , then is conserved. This is the Hamiltonian face of Conservation Laws & Noether's Theorem.

L3.3

A relativistic-flavoured Lagrangian . Find , invert it, and show , then express in terms of .

Recall Solution

Momentum: Assemble (before inverting, to see the structure): Put over a common denominator : In terms of : from , algebra gives , hence and — the famous relativistic energy. This is why Legendre-transforming (a function of velocity) into (a function of momentum) is so powerful: momentum is the natural variable of energy.


Level 4 — Synthesis

L4.1

A charged particle in 1D with a velocity-dependent Lagrangian , where and are constants. Find , invert it, and show . Is equal to ?

Recall Solution

Momentum: . Notice: the momentum is not ! It has the extra term. Invert: . Assemble: But , so : Is ? Numerically . The kinetic energy came out right, but the canonical momentum differs from the kinetic momentum . So while has the energy value, expressed in it carries the tell-tale structure. This is the seed of electromagnetic Hamiltonians.

L4.2

Combine two ideas: a 1D oscillator has . Compute the Poisson bracket and and confirm they reproduce Hamilton's equations. (Recall .)

Recall Solution

Both match , the Poisson-bracket form of the equations of motion in Phase Space.


Level 5 — Mastery

L5.1 (the classic case)

A bead of mass slides frictionlessly on a straight wire that rotates in a horizontal plane at fixed angular velocity . Let be the distance along the wire. Then (). (i) Find . (ii) Find the total energy . (iii) Show and quantify the gap. (iv) Is conserved?

The figure below shows both the physical set-up (left) and the punchline (right): as the bead moves out to larger , the curves and split apart, and the red double-arrow is the exact gap we compute in part (iii). Read the left panel first to see what , and the bead are; then read the right panel as "same momentum , two different bookkeeping quantities."

Figure — Hamiltonian — definition H = Σpᵢq̇ᵢ − L
Recall Solution

(i) Momentum: . Assemble and substitute : (ii) Energy: (using ; recall ). (iii) The gap: So . This is exactly the vertical red gap in the right panel of the figure. Why it fails: the constraint is time-dependent, so is not a pure homogeneous quadratic in — it has the -independent "centrifugal" piece . Euler's theorem (which would give ) no longer applies to all of . (iv) Conserved? has no explicit ( is a constant, is the variable), so is conserved. A conserved quantity that is not the energy.

L5.2 (Synthesis: build , then classify)

For (with a constant), find . Then decide: is conserved? Is ?

Recall Solution

Momentum: . Assemble: Since , we get , so Conserved? (no explicit ), so is conserved. ✓ ? The value is — yes, numerically here. The term is a total time derivative (), so it shifts the canonical momentum by but does not change the energy. A subtle case: the momentum is disguised, yet still holds.

L5.3 (Mastery — the degenerate / singular case)

Consider the Lagrangian , which is linear in the velocity (no term at all). are constants. (i) Compute the Hessian and show the Legendre transform is degenerate. (ii) Try to build and invert it — what goes wrong? (iii) What does evaluate to, and why is this the fingerprint of a singular Lagrangian?

Recall Solution

(i) Hessian: , which does not contain . So Since , the non-degeneracy condition from the recipe's warning fails. This is a singular (degenerate) Lagrangian. (ii) What goes wrong: the momentum is . Notice it depends only on , not on — so we cannot solve it for . Every value of gives the same momentum . Step 2 of the recipe (invert to get ) is impossible. Instead we get a constraint: must hold identically. The velocity is left undetermined. (iii) The Hamiltonian: On the constraint surface , the bracket vanishes, so The velocity has completely disappeared — but not because we substituted it away; it dropped out because its coefficient is forced to zero. This is the fingerprint of a singular system: is never expressible in terms of , and the dynamics is governed by constraints rather than by a clean invertible . (Systematically handling such systems is Dirac's constraint theory.) Contrast this with every other problem on the page, where and the inversion always succeeded.


Quick self-test