Chapter 8 · Classical Mechanics

8.2 Hamilton’s Equations and Variational Principles

The true motion makes the action $\int L\,dt$ stationary; trading velocities for momenta turns Lagrange's $n$ second-order equations into Hamilton's $2n$ first-order ones, $\dot q=\partial H/\partial p$, $\dot p=-\partial H/\partial q$, whose geometry — Poisson brackets, conserved phase area, least action — organises all of mechanics.

In §8.1 Lagrange's equations were obtained from Newton's laws through D'Alembert's principle. In this section we turn the logic around and start from a single statement: of all the conceivable ways in which a system can get from one configuration at time $t_1$ to another at time $t_2$, the actual motion is the one that makes the action $S=\int_{t_1}^{t_2}L\,dt$ stationary. This is Hamilton's principle (1834). Because $S$ is a functional, the calculus of variations of §6.1 applies at once: its Euler–Lagrange equations are Lagrange's equations. The principle is coordinate-free, it extends verbatim to fields, optics and relativity, and its "stationary, not minimal" fine print is a precise statement about conjugate points (§6.2).

Hamilton's second contribution was to replace the generalised velocities $\dot q_j$ by the generalised momenta $p_j=\partial L/\partial\dot q_j$ through a Legendre transform. The $n$ second-order Lagrange equations become $2n$ first-order canonical equations for the Hamiltonian $H(q,p,t)$, which in most problems is simply the energy expressed in coordinates and momenta. In the $2n$-dimensional phase space the motion is a flow with remarkable structure: it preserves areas (Liouville), its constants of motion are detected by Poisson brackets, and the changes of variables that respect it — canonical transformations — are characterised by one bracket. We end with the older principle of least action of Maupertuis, Euler and Jacobi, which describes the shape of trajectories of given energy as geodesics, and with Routh's procedure for cyclic coordinates. CSIR NET asks for Hamiltonians of given Lagrangians (and conversely), for Poisson brackets and constants of motion, for whether a transformation is canonical, and for the conditions under which $H$ is conserved or equals $T+V$.

Hamilton's Principle

Throughout, the system is holonomic with $n$ degrees of freedom and Lagrangian $L(q,\dot q,t)$ of class $C^2$ (for example $L=T-V$, or with a velocity-dependent potential). A path is a $C^2$ map $q:[t_1,t_2]\to\mathbb R^n$ (a curve in configuration space parametrised by time).

📘 Definition 8.7 — Action; admissible variations
The action of a path is the functional $$S[q]=\int_{t_1}^{t_2}L\big(q(t),\dot q(t),t\big)\,dt .$$ For fixed end configurations $q(t_1)=A$, $q(t_2)=B$, an admissible variation is a $C^2$ function $\eta:[t_1,t_2]\to\mathbb R^n$ with $\eta(t_1)=\eta(t_2)=0$; the varied paths are $q+\varepsilon\eta$. The path $q$ makes $S$ stationary if the first variation $\delta S=\dfrac{d}{d\varepsilon}S[q+\varepsilon\eta]\Big|_{\varepsilon=0}$ vanishes for every admissible $\eta$.
📐 Theorem 8.12 — Hamilton's principle
A $C^2$ path $q(t)$ with $q(t_1)=A$, $q(t_2)=B$ satisfies Lagrange's equations $\dfrac{d}{dt}\dfrac{\partial L}{\partial\dot q_j}-\dfrac{\partial L}{\partial q_j}=0$ $(j=1,\dots,n)$ on $[t_1,t_2]$ if and only if it makes the action stationary among all paths with the same end configurations at the same end times.

Proof. Differentiation under the integral sign (legitimate: the integrand is $C^1$ in $\varepsilon$ on a compact interval) and the chain rule give $$\delta S=\int_{t_1}^{t_2}\sum_{j=1}^n\Big(\frac{\partial L}{\partial q_j}\eta_j+\frac{\partial L}{\partial\dot q_j}\dot\eta_j\Big)dt .$$ Integrate the second term by parts; $\partial L/\partial\dot q_j$ evaluated along $q$ is $C^1$ in $t$ because $L$ and $q$ are $C^2$: $$\delta S=\Big[\sum_j\frac{\partial L}{\partial\dot q_j}\eta_j\Big]_{t_1}^{t_2}-\int_{t_1}^{t_2}\sum_{j=1}^n\Big(\frac{d}{dt}\frac{\partial L}{\partial\dot q_j}-\frac{\partial L}{\partial q_j}\Big)\eta_j\,dt .$$ The boundary term vanishes because $\eta(t_1)=\eta(t_2)=0$. If Lagrange's equations hold, the integrand vanishes and $\delta S=0$. Conversely suppose $\delta S=0$ for every admissible $\eta$. Fix $j$ and take $\eta$ with only its $j$-th component non-zero, $\eta_j=\phi$ an arbitrary $C^2$ function vanishing at the ends. Then $\int_{t_1}^{t_2}\mathcal E_j(t)\phi(t)\,dt=0$ for all such $\phi$, where $\mathcal E_j$ is the (continuous) Lagrange expression along $q$. By the fundamental lemma of the calculus of variations (§6.1), $\mathcal E_j\equiv0$. ∎

Three consequences are immediate. First, Hamilton's principle does not mention coordinates, so Lagrange's equations have the same form in every coordinate system (the invariance under change of coordinates proved in §8.1, now with a one-line proof). Second, adding $dF(q,t)/dt$ to $L$ changes $S$ by the constant $F(B,t_2)-F(A,t_1)$, which has no effect on stationarity (the freedom $L\to cL+dF/dt$ of §8.1 again). Third, for a system with several degrees of freedom the principle is exactly the Euler–Lagrange problem for several unknown functions treated in §6.1.

✏️ Example 1 — The action of a thrown ball
A particle of mass $m$ moves vertically in uniform gravity, $L=\tfrac12m\dot x^2-mgx$, leaving $x=0$ at $t=0$ and returning to $x=0$ at $t=T$. Compute the action of the trial paths $x_\varepsilon(t)=\tfrac12gt(T-t)+\varepsilon\,t(T-t)$, and show that the true path ($\varepsilon=0$) minimises $S$ within this family. Then show that it minimises $S$ among all admissible paths.
True path $m\ddot x=-mg$ with $x(0)=x(T)=0$ gives $x_0=\tfrac12gt(T-t)$, the case $\varepsilon=0$.
Family With $c=\tfrac12g+\varepsilon$, $x_\varepsilon=ct(T-t)$, $\dot x_\varepsilon=c(T-2t)$. Using $\int_0^T(T-2t)^2dt=\tfrac{T^3}{3}$ and $\int_0^Tt(T-t)\,dt=\tfrac{T^3}{6}$, $$S(\varepsilon)=\tfrac12mc^2\cdot\tfrac{T^3}{3}-mgc\cdot\tfrac{T^3}{6}=\frac{mT^3}{6}\big(c^2-gc\big).$$
Minimum Substituting $c=\tfrac g2+\varepsilon$: $c^2-gc=\varepsilon^2-\tfrac{g^2}{4}$, so $$S(\varepsilon)=-\frac{mg^2T^3}{24}+\frac{mT^3}{6}\,\varepsilon^2 .$$ There is no linear term (stationarity) and the quadratic term is positive (minimum).
All paths For any admissible $\eta$, $$S[x_0+\eta]-S[x_0]=\int_0^T\big(m\dot x_0\dot\eta-mg\eta\big)dt+\tfrac12m\int_0^T\dot\eta^2dt$$. The first integral is $\delta S=0$ (integrate by parts: $-\int(m\ddot x_0+mg)\eta=0$), so the difference is $\tfrac12m\int\dot\eta^2\gt0$ unless $\eta\equiv0$. Because $L$ is quadratic, the expansion in $\eta$ stops at second order — there is no remainder to estimate.

Is the action always a minimum? The harmonic oscillator shows that it is not, and shows exactly when it stops being one.

📐 Theorem 8.13 — The action of the oscillator: minimum for short times only
Let $L=\tfrac12m(\dot x^2-\omega^2x^2)$ with $m,\omega\gt0$, let $T\gt0$ and let $x_0$ be a solution of $\ddot x+\omega^2x=0$ on $[0,T]$. For every admissible variation $\eta$ (with $\eta(0)=\eta(T)=0$), $$S[x_0+\eta]-S[x_0]=\frac m2\int_0^T\big(\dot\eta^2-\omega^2\eta^2\big)\,dt .$$ If $\omega T\lt\pi$, this is positive for every $\eta\not\equiv0$: $x_0$ is a strict minimum. If $\omega T\gt\pi$, it is negative for $\eta=\sin(\pi t/T)$, so $x_0$ is not a minimum (for $\pi\lt\omega T\lt2\pi$ it is a saddle: $\eta=\sin(2\pi t/T)$ gives a positive value).

Proof. Expand $L(x_0+\eta,\dot x_0+\dot\eta)$: the zeroth-order part integrates to $S[x_0]$, the first-order part to $\delta S=0$ (Theorem 8.12), and the second-order part is exactly $\tfrac m2(\dot\eta^2-\omega^2\eta^2)$; there are no higher terms because $L$ is quadratic. For the sign we use Wirtinger's inequality: if $\eta$ is $C^1$ on $[0,T]$ with $\eta(0)=\eta(T)=0$, then $$\int_0^T\dot\eta^2\,dt\ \ge\ \frac{\pi^2}{T^2}\int_0^T\eta^2\,dt,$$ with equality only for $\eta=c\sin(\pi t/T)$. To prove it, expand $\eta$ in its Fourier sine series $\eta=\sum_{k\ge1}b_k\sin(k\pi t/T)$ on $[0,T]$ (§4.2); then $\dot\eta$ has the cosine series $\sum_kb_k\frac{k\pi}{T}\cos(k\pi t/T)$ (integrate the cosine coefficients of $\dot\eta$ by parts, using $\eta(0)=\eta(T)=0$), and Parseval's identity gives $$\int_0^T\dot\eta^2=\frac T2\sum_kb_k^2\frac{k^2\pi^2}{T^2}\ \ge\ \frac{\pi^2}{T^2}\cdot\frac T2\sum_kb_k^2=\frac{\pi^2}{T^2}\int_0^T\eta^2,$$ with equality iff $b_k=0$ for all $k\ge2$. Hence, if $\omega T\lt\pi$, $$\int_0^T(\dot\eta^2-\omega^2\eta^2)\ge\Big(\frac{\pi^2}{T^2}-\omega^2\Big)\int_0^T\eta^2\gt0\qquad(\eta\not\equiv0).$$ For $\eta_k=\sin(k\pi t/T)$ a direct computation gives $\int_0^T(\dot\eta_k^2-\omega^2\eta_k^2)=\frac T2\Big(\frac{k^2\pi^2}{T^2}-\omega^2\Big)$, negative for $k=1$ when $\omega T\gt\pi$ and positive for $k=2$ when $\omega T\lt2\pi$. ∎

The critical time $T=\pi/\omega$ is the first instant at which the solutions $x=c\sin\omega t$ leaving $x(0)=0$ return to $0$ all together: $t=\pi/\omega$ is the first conjugate point of $t=0$, and Theorem 8.13 is the oscillator case of Jacobi's condition (§6.2). In general the true path minimises the action over sufficiently short time intervals and merely makes it stationary over long ones; "the principle of least action" is a historical name for a principle of stationary action.

Interactive 1 — Hamilton's Principle: the Action of Trial Paths

Left: the true path $x_0(t)$ (solid) and the trial path $x_0+\varepsilon\sin(k\pi t/T)$ (dashed) with the same end points. Right: the action $S(\varepsilon)$ of the trial path, computed by numerical integration, with the parabola $S_0+\varepsilon^2\cdot\frac T4\big(\frac{k^2\pi^2}{T^2}-\omega^2\big)$ through it. For the oscillator ($m=\omega=1$, $x(0)=-\tfrac12$, $x(T)=\tfrac12$) move $T$ past $\pi$ with $k=1$: the parabola turns over, and the true path becomes a maximum in that direction — while for $k=2$ it is still a minimum. For free fall every direction is a minimum.

2.500.60
S(ε) numerical—
S₀ (true path)—
coefficient of ε²—
true path in this direction—

Generalised Momenta, the Legendre Transform and Hamilton's Equations

Lagrange's equations are $n$ second-order equations in the $n$ unknowns $q_j$. Hamilton's reformulation treats the generalised momenta $p_j=\partial L/\partial\dot q_j$ (introduced with cyclic coordinates in §8.1) as independent variables on an equal footing with the $q_j$. The tool that exchanges $\dot q$ for $p$ is the Legendre transform.

📘 Definition 8.8 — Legendre transform
Let $f$ be a $C^2$ function on an open convex set $\Omega\subseteq\mathbb R^n$ whose Hessian $\big(\partial^2f/\partial v_j\partial v_k\big)$ is positive definite, and suppose the gradient map $v\mapsto p=\nabla f(v)$ is a bijection of $\Omega$ onto an open set $\Omega^*$. The Legendre transform of $f$ is the function on $\Omega^*$ $$g(p)=p\cdot v(p)-f\big(v(p)\big),\qquad\text{where }v(p)\text{ solves }\nabla f(v)=p .$$
📐 Theorem 8.14 — Properties of the Legendre transform
Under the hypotheses of Definition 8.8: (a) $g$ is $C^2$ with $\nabla g(p)=v(p)$, and its Hessian is the inverse of the Hessian of $f$ at $v(p)$; in particular $g$ is again strictly convex. (b) The transform is an involution: the Legendre transform of $g$ is $f$. (c) $g(p)=\max_{v\in\Omega}\big(p\cdot v-f(v)\big)$. (d) If $f=f(v;x)$ depends on parameters $x$ that do not take part in the transform, then $\dfrac{\partial g}{\partial x}=-\dfrac{\partial f}{\partial x}$, the partial derivatives being taken at corresponding points.

Proof. The Hessian of $f$ is the Jacobian of $v\mapsto\nabla f(v)$; it is invertible, so by the inverse function theorem $p\mapsto v(p)$ is $C^1$ with Jacobian the inverse Hessian. (a) and (d): by the chain rule, for each component, $$\frac{\partial g}{\partial p_k}=v_k+\sum_jp_j\frac{\partial v_j}{\partial p_k}-\sum_j\frac{\partial f}{\partial v_j}\frac{\partial v_j}{\partial p_k}=v_k,$$ because $\partial f/\partial v_j=p_j$; the same cancellation gives $\partial g/\partial x=-\partial f/\partial x$. Then the Hessian of $g$ is the Jacobian of $p\mapsto v(p)$, the inverse of a positive definite matrix, hence positive definite. (b) Since $\nabla g(p)=v$, the transform of $g$ is $v\cdot p(v)-g(p(v))=v\cdot p-(p\cdot v-f(v))=f(v)$. (c) For fixed $p$ the function $\phi(v)=p\cdot v-f(v)$ is strictly concave on the convex set $\Omega$, and its only critical point is $v(p)$; a critical point of a concave function is a global maximum, so $\max\phi=\phi(v(p))=g(p)$. ∎

📘 Definition 8.9 — Hamiltonian
A Lagrangian is regular if $\det\big(\partial^2L/\partial\dot q_j\partial\dot q_k\big)\ne0$, so that the equations $p_j=\partial L/\partial\dot q_j(q,\dot q,t)$ can be solved (locally) for $\dot q=\dot q(q,p,t)$. The Hamiltonian is the Legendre transform of $L$ with respect to the velocities: $$H(q,p,t)=\sum_{j=1}^np_j\,\dot q_j-L(q,\dot q,t)\Big|_{\dot q=\dot q(q,p,t)} .$$ The $2n$-dimensional space of $(q,p)$ is the phase space.

Note that $H$ is Jacobi's energy function $h$ of §8.1 re-expressed in terms of momenta — the same number, a different function. The distinction matters: $h$ must be differentiated with $\dot q$ held fixed, $H$ with $p$ held fixed.

📐 Theorem 8.15 — Hamilton's canonical equations
Let $L$ be a regular $C^2$ Lagrangian with Hamiltonian $H$. A path $q(t)$ satisfies Lagrange's equations if and only if $q(t)$ and $p(t)=\partial L/\partial\dot q\,(q,\dot q,t)$ satisfy $$\dot q_j=\frac{\partial H}{\partial p_j},\qquad \dot p_j=-\frac{\partial H}{\partial q_j}\qquad(j=1,\dots,n).$$ Moreover $\dfrac{\partial H}{\partial t}=-\dfrac{\partial L}{\partial t}$ and, along solutions, $\dfrac{dH}{dt}=\dfrac{\partial H}{\partial t}$.

Proof. Theorem 8.14(a),(d) with $v=\dot q$, $f=L$ and the parameters $x=(q,t)$ give $$\frac{\partial H}{\partial p_j}=\dot q_j(q,p,t),\qquad \frac{\partial H}{\partial q_j}=-\frac{\partial L}{\partial q_j},\qquad \frac{\partial H}{\partial t}=-\frac{\partial L}{\partial t}$$ (here the Hessian need only be non-singular, not positive definite, for (a) and (d)). The first set of identities is the first canonical equation; it simply restates the definition of $p$. Given that, Lagrange's equation $\frac{d}{dt}p_j=\partial L/\partial q_j$ is equivalent to $\dot p_j=-\partial H/\partial q_j$. Finally, along a solution, $$\frac{dH}{dt}=\sum_j\Big(\frac{\partial H}{\partial q_j}\dot q_j+\frac{\partial H}{\partial p_j}\dot p_j\Big)+\frac{\partial H}{\partial t}=\sum_j\Big(\frac{\partial H}{\partial q_j}\frac{\partial H}{\partial p_j}-\frac{\partial H}{\partial p_j}\frac{\partial H}{\partial q_j}\Big)+\frac{\partial H}{\partial t}=\frac{\partial H}{\partial t}.$$ ∎

📐 Theorem 8.16 — The Hamiltonian of a quadratic Lagrangian
Let $L=\tfrac12\dot q^{\mathsf T}A(q,t)\dot q+b(q,t)^{\mathsf T}\dot q+T_0(q,t)-V(q,t)$ with $A$ symmetric positive definite (the kinetic-energy decomposition $T_2+T_1+T_0$ of §8.1, plus possibly a magnetic-type linear term in $b$). Then $p=A\dot q+b$ and $$H(q,p,t)=\tfrac12\,(p-b)^{\mathsf T}A^{-1}(p-b)-T_0+V .$$ In particular, for scleronomic coordinates and $V=V(q)$ (so $b=0$, $T_0=0$), $H=\tfrac12p^{\mathsf T}A(q)^{-1}p+V(q)=T+V$, the total energy.

Proof. $\partial L/\partial\dot q=A\dot q+b$, so $\dot q=A^{-1}(p-b)$. Then $$p^{\mathsf T}\dot q-L=(A\dot q+b)^{\mathsf T}\dot q-\tfrac12\dot q^{\mathsf T}A\dot q-b^{\mathsf T}\dot q-T_0+V$$ $$=\tfrac12\dot q^{\mathsf T}A\dot q-T_0+V$$, and $\tfrac12\dot q^{\mathsf T}A\dot q=\tfrac12(p-b)^{\mathsf T}A^{-1}(p-b)$ because $A^{-1}$ is symmetric. ∎

For a charge in a magnetic field, $L=\tfrac12m|\dot{\mathbf r}|^2+e\dot{\mathbf r}\cdot\mathbf A-e\phi$ gives $\mathbf p=m\dot{\mathbf r}+e\mathbf A$ and $H=\dfrac{|\mathbf p-e\mathbf A|^2}{2m}+e\phi$: the canonical momentum $\mathbf p$ differs from the mechanical momentum $m\dot{\mathbf r}$, and the magnetic field disappears from the value of $H$ (it does no work) while still shaping the motion.

📐 Theorem 8.17 — When is $H$ conserved, and when is it the energy?
(a) $H$ is a constant of the motion if and only if $\partial H/\partial t=0$ along the motion, in particular whenever $L$ has no explicit time dependence. (b) $H=T+V$ whenever the coordinates are scleronomic ($\mathbf r_i=\mathbf r_i(q)$) and the potential $V$ does not depend on velocities. The two conditions are independent; all four combinations occur:
Conserved, $=T+V$Simple pendulum; particle in a central field in polar coordinates.
Conserved, $\ne T+V$Bead on a hoop or wire rotating at constant $\omega$: $H=T_2-T_0+V$, with no explicit $t$.
Not conserved, $=T+V$Fixed coordinates, time-dependent potential: a spring of stiffness $k(t)$, $H=\tfrac{p^2}{2m}+\tfrac12k(t)q^2$.
Not conserved, $\ne T+V$Bead on a hoop whose rotation rate $\omega(t)$ varies; pendulum with a driven support.

Proof. (a) is the last statement of Theorem 8.15 together with $\partial H/\partial t=-\partial L/\partial t$. (b) is Theorem 8.16 with $b=0$, $T_0=0$. The examples: for the rotating hoop, Theorem 8.16 gives $H=\dfrac{p_\theta^2}{2ma^2}-\tfrac12ma^2\omega^2\sin^2\theta-mga\cos\theta$, while $T+V$ has $+\tfrac12ma^2\omega^2\sin^2\theta$; for the spring, $\partial H/\partial t=\tfrac12\dot k(t)q^2$. ∎

Whether $H$ equals the energy depends on the coordinates, not only on the system: a free particle in the plane has $H=T$ in inertial coordinates, but in coordinates rotating at rate $\omega$ (Exercise I.6) $H=\dfrac{|\mathbf p|^2}{2m}-\omega(Xp_Y-Yp_X)$, which is conserved but is not the kinetic energy.

📐 Theorem 8.18 — Hamilton's principle in phase space
Consider paths $(q(t),p(t))$ in phase space, $C^1$ on $[t_1,t_2]$, with $q(t_1),q(t_2)$ fixed and $p$ free at the ends. The functional $$\mathcal S[q,p]=\int_{t_1}^{t_2}\Big(\sum_jp_j\dot q_j-H(q,p,t)\Big)dt$$ is stationary under all such variations if and only if $(q,p)$ satisfies Hamilton's equations.

Proof. Vary $q\to q+\varepsilon\xi$ (with $\xi=0$ at the ends) and $p\to p+\varepsilon\pi$ ($\pi$ arbitrary). Then $$\delta\mathcal S=\int_{t_1}^{t_2}\sum_j\Big(\pi_j\dot q_j+p_j\dot\xi_j-\frac{\partial H}{\partial q_j}\xi_j-\frac{\partial H}{\partial p_j}\pi_j\Big)dt=\int_{t_1}^{t_2}\sum_j\Big[\Big(\dot q_j-\frac{\partial H}{\partial p_j}\Big)\pi_j-\Big(\dot p_j+\frac{\partial H}{\partial q_j}\Big)\xi_j\Big]dt,$$ after integrating $p_j\dot\xi_j$ by parts (the boundary term vanishes because $\xi=0$ at the ends; this needs $p\in C^1$). Since $\pi$ and $\xi$ are independent and arbitrary, the fundamental lemma gives both canonical equations, and conversely. ∎

Along a curve where $p=\partial L/\partial\dot q$, the integrand $p\cdot\dot q-H$ equals $L$, so this is Hamilton's principle with the velocities freed from the coordinates. The term $\int p\,dq$ is the abbreviated action that reappears in the principle of least action below.

📐 Theorem 8.19 — Liouville's theorem
Let $H(q,p,t)$ be $C^2$ and let $\Phi_t$ be the flow of Hamilton's equations (the map sending an initial point of phase space to its position at time $t$). Then $\Phi_t$ preserves $2n$-dimensional volume: for every bounded measurable set $D$ in phase space, $\mathrm{vol}\,\Phi_t(D)=\mathrm{vol}\,D$.

Proof. Write the canonical equations as $\dot z=X(z,t)$ with $z=(q,p)$ and $X=\big(\partial H/\partial p,\,-\partial H/\partial q\big)$. Its divergence is $$\nabla\cdot X=\sum_j\Big(\frac{\partial^2H}{\partial q_j\,\partial p_j}-\frac{\partial^2H}{\partial p_j\,\partial q_j}\Big)=0 .$$ The Jacobian matrix $Y(t)=D\Phi_t(z_0)$ satisfies the variational equation $\dot Y=DX\big(\Phi_t(z_0),t\big)\,Y$, $Y(0)=I$, a linear system whose coefficient matrix has trace $\nabla\cdot X=0$. By Liouville's formula for linear systems (§1.3), $\det Y(t)=\exp\int_0^t\mathrm{tr}\,DX\,ds=1$. The change-of-variables formula then gives $\mathrm{vol}\,\Phi_t(D)=\int_D|\det D\Phi_t|=\mathrm{vol}\,D$. ∎

A damped oscillator $\dot q=p$, $\dot p=-q-\gamma p$ is not Hamiltonian: its divergence is $-\gamma$, and phase areas shrink like $e^{-\gamma t}$ (Exercise IV.2). Liouville's theorem is also why Hamiltonian systems can have no asymptotically stable equilibria — a small disc around such an equilibrium would have to shrink.

Interactive 2 — Phase Space of the Pendulum: Hamilton's Flow Preserves Area

The curves are level sets of $H=\tfrac12p^2-\cos q$: closed curves inside the separatrix $H=1$ are swings (libration), wavy curves outside are full rotations. A disc of initial conditions (radius $0.3$) is carried by Hamilton's equations $\dot q=p$, $\dot p=-\sin q$. Watch it shear — points with higher energy go round faster — while its area stays at $0.2827$. Then add friction: the flow is no longer Hamiltonian and the area decays like $e^{-\gamma t}$.

time t—
area of the blob—
prediction—
H at the blob's centre—
✏️ Example 2 — A particle in a central field, in spherical coordinates
For $L=\tfrac12m\big(\dot r^2+r^2\dot\theta^2+r^2\sin^2\theta\,\dot\varphi^2\big)-V(r)$, find $H$, write Hamilton's equations, and identify three independent constants of motion.
Momenta $p_r=m\dot r$, $p_\theta=mr^2\dot\theta$, $p_\varphi=mr^2\sin^2\theta\,\dot\varphi$. The coordinates are scleronomic and $V$ is velocity-free, so by Theorem 8.16 $$H=\frac{p_r^2}{2m}+\frac{p_\theta^2}{2mr^2}+\frac{p_\varphi^2}{2mr^2\sin^2\theta}+V(r).$$
Equations $\dot r=\dfrac{p_r}{m}$, $\dot\theta=\dfrac{p_\theta}{mr^2}$, $\dot\varphi=\dfrac{p_\varphi}{mr^2\sin^2\theta}$, and $$\dot p_r=\frac{p_\theta^2}{mr^3}+\frac{p_\varphi^2}{mr^3\sin^2\theta}-V'(r),\qquad \dot p_\theta=\frac{p_\varphi^2\cos\theta}{mr^2\sin^3\theta},\qquad \dot p_\varphi=0 .$$
Constants $H$ (no explicit $t$); $p_\varphi$ ($\varphi$ cyclic: the $z$-component of angular momentum); and $J^2=p_\theta^2+\dfrac{p_\varphi^2}{\sin^2\theta}$. For the last, differentiate using the equations: $$\frac{d}{dt}J^2=2p_\theta\dot p_\theta-\frac{2p_\varphi^2\cos\theta}{\sin^3\theta}\dot\theta$$ $$=\frac{2p_\theta p_\varphi^2\cos\theta}{mr^2\sin^3\theta}-\frac{2p_\varphi^2\cos\theta}{\sin^3\theta}\cdot\frac{p_\theta}{mr^2}=0$$.
Reduction In terms of $J^2$, $H=\dfrac{p_r^2}{2m}+\dfrac{J^2}{2mr^2}+V(r)$: the radial motion is one-dimensional motion in the effective potential of §8.1, Example 6, with $\ell^2=J^2$.
✏️ Example 3 — From a Hamiltonian back to a Lagrangian
(a) Find the Lagrangian and the equation of motion corresponding to $H(q,p)=\tfrac12(p-kq)^2+\tfrac12\omega^2q^2$, where $k,\omega$ are constants. (b) Is $H$ the energy? Is it conserved? (c) Show that $H(q,p)=qp$ has no regular Lagrangian.
(a) Invert $\dot q=\partial H/\partial p=p-kq$, so $p=\dot q+kq$. The inverse transform (Theorem 8.14(b)) is $L=p\dot q-H$: $$L=(\dot q+kq)\dot q-\tfrac12\dot q^2-\tfrac12\omega^2q^2=\tfrac12\dot q^2+kq\dot q-\tfrac12\omega^2q^2 .$$
Equation $kq\dot q=\frac{d}{dt}\big(\tfrac12kq^2\big)$ is a total derivative, so the equation is that of $\tfrac12\dot q^2-\tfrac12\omega^2q^2$: $\ddot q+\omega^2q=0$. Check with Hamilton's equations: $\dot p=-\partial H/\partial q=k(p-kq)-\omega^2q$, and $\ddot q=\dot p-k\dot q=k\dot q-\omega^2q-k\dot q=-\omega^2q$ ✓.
(b) $H$ has no explicit $t$, so it is conserved. Its value $\tfrac12\dot q^2+\tfrac12\omega^2q^2$ is the oscillator energy, although as a function of $(q,p)$ it looks different from $\tfrac12p^2+\tfrac12\omega^2q^2$: the canonical momentum $p=\dot q+kq$ is not $\dot q$. The two Hamiltonians are related by the canonical transformation $P=p-kq$, $Q=q$.
(c) $\partial^2H/\partial p^2=0$: the map $p\mapsto\partial H/\partial p=q$ does not depend on $p$, so it cannot be inverted to express $p$ in terms of $\dot q$; the Legendre transform does not exist. Hamilton's equations $\dot q=q$, $\dot p=-p$ still make sense ($q=q_0e^t$, $p=p_0e^{-t}$) — phase space is more general than configuration space.
✏️ Example 4 — The rotating hoop in Hamiltonian form
For the bead on the hoop of §8.1 (Example 4), $L=\tfrac12ma^2(\dot\theta^2+\omega^2\sin^2\theta)+mga\cos\theta$, find $H$, decide whether it is conserved and whether it equals $T+V$, and find the rate at which the mechanical energy changes.
Hamiltonian $p_\theta=ma^2\dot\theta$ and $$H=\frac{p_\theta^2}{2ma^2}-\tfrac12ma^2\omega^2\sin^2\theta-mga\cos\theta .$$
Conserved No explicit $t$: $dH/dt=\partial H/\partial t=0$. (Check: $\dot\theta=p_\theta/ma^2$ and $\dot p_\theta=ma^2\omega^2\sin\theta\cos\theta-mga\sin\theta$, which is the equation of motion of §8.1.)
Not the energy $$E=T+V=\dfrac{p_\theta^2}{2ma^2}+\tfrac12ma^2\omega^2\sin^2\theta-mga\cos\theta=H+ma^2\omega^2\sin^2\theta$$. The coordinate $\theta$ is rheonomic ($\mathbf r$ depends on $t$ through $\omega t$), so Theorem 8.17(b) does not apply.
Power $$\dfrac{dE}{dt}=ma^2\omega^2\cdot2\sin\theta\cos\theta\,\dot\theta=\omega\,\dfrac{d}{dt}\big(ma^2\omega\sin^2\theta\big)$$. Since $ma^2\omega\sin^2\theta$ is the angular momentum $J_z$ of the bead about the axis, this is $\omega\,\dot J_z$: the power of the torque the motor must apply to keep $\omega$ fixed.

Poisson Brackets, Constants of Motion and Canonical Transformations

📘 Definition 8.10 — Poisson bracket
For $C^1$ functions $f(q,p,t)$, $g(q,p,t)$ on phase space, the Poisson bracket is $$[f,g]=\sum_{j=1}^n\Big(\frac{\partial f}{\partial q_j}\frac{\partial g}{\partial p_j}-\frac{\partial f}{\partial p_j}\frac{\partial g}{\partial q_j}\Big).$$ (Some books use the opposite sign; with ours $[q,p]=1$. Always check the convention in a question.)
📐 Theorem 8.20 — Algebra of Poisson brackets
For $C^2$ functions $f,g,h$ and constants $a,b$:
  1. antisymmetry $[f,g]=-[g,f]$, so $[f,f]=0$; bilinearity $[af+bg,h]=a[f,h]+b[g,h]$;
  2. Leibniz rule $[f,gh]=[f,g]\,h+g\,[f,h]$;
  3. Jacobi identity $[f,[g,h]]+[g,[h,f]]+[h,[f,g]]=0$;
  4. fundamental brackets $[q_j,q_k]=0$, $[p_j,p_k]=0$, $[q_j,p_k]=\delta_{jk}$; and $[q_j,f]=\dfrac{\partial f}{\partial p_j}$, $[p_j,f]=-\dfrac{\partial f}{\partial q_j}$.

Proof. (1), (2) and (4) follow directly from the definition and the product rule for partial derivatives. For (3), define for each $f$ the first-order differential operator $D_f=[f,\cdot\,]=\sum_j\big(\frac{\partial f}{\partial q_j}\frac{\partial}{\partial p_j}-\frac{\partial f}{\partial p_j}\frac{\partial}{\partial q_j}\big)$. Every term of the Jacobi sum is a product of one second derivative and two first derivatives. Collect the terms that contain second derivatives of $h$: they occur only in $[f,[g,h]]+[g,[h,f]]=D_fD_gh-D_gD_fh$. The commutator $D_fD_g-D_gD_f$ of two first-order differential operators is again a first-order operator — when it is expanded, the terms with second derivatives of $h$ appear twice with opposite signs, because mixed partial derivatives of $h$ commute. So the Jacobi sum contains no second derivatives of $h$; by the cyclic symmetry of the sum, it contains no second derivatives of $f$ or $g$ either. Since each of its terms contains exactly one second derivative, the sum is zero. ∎

📐 Theorem 8.21 — Time evolution and Poisson's theorem
(a) Along every solution of Hamilton's equations, a $C^1$ function $f(q,p,t)$ evolves by $$\frac{df}{dt}=[f,H]+\frac{\partial f}{\partial t}.$$ In particular $\dot q_j=[q_j,H]$ and $\dot p_j=[p_j,H]$, and a function $f(q,p)$ without explicit $t$ is a constant of the motion if and only if $[f,H]=0$. (b) Poisson's theorem. If $f$ and $g$ are $C^2$ constants of the motion, so is $[f,g]$.

Proof. (a) Chain rule and Hamilton's equations: $\dfrac{df}{dt}=\sum_j\big(\frac{\partial f}{\partial q_j}\frac{\partial H}{\partial p_j}-\frac{\partial f}{\partial p_j}\frac{\partial H}{\partial q_j}\big)+\frac{\partial f}{\partial t}$. "If and only if" uses that through every point of phase space passes a solution. (b) By (a) and the Jacobi identity, rewritten as $[[f,g],H]=[f,[g,H]]+[[f,H],g]$, $$\frac{d}{dt}[f,g]=[[f,g],H]+\Big[\frac{\partial f}{\partial t},g\Big]+\Big[f,\frac{\partial g}{\partial t}\Big]=\Big[f,[g,H]+\frac{\partial g}{\partial t}\Big]+\Big[[f,H]+\frac{\partial f}{\partial t},g\Big]=[f,\dot g]+[\dot f,g]=0 .$$ (We used $\frac{\partial}{\partial t}[f,g]=[\partial_tf,g]+[f,\partial_tg]$ and that $\dot f=\dot g=0$ as functions on phase space, since they vanish along every solution.) ∎

✏️ Example 5 — Angular momentum brackets
For a particle in space, with $J_x=yp_z-zp_y$, $J_y=zp_x-xp_z$, $J_z=xp_y-yp_x$: (a) compute $[J_z,x]$, $[J_z,p_x]$ and $[J_x,J_y]$; (b) show $[J^2,J_z]=0$ where $J^2=J_x^2+J_y^2+J_z^2$; (c) prove that if two components of $\mathbf J$ are constants of the motion, so is the third; (d) for $H=\dfrac{|\mathbf p|^2}{2m}+V(r)$ show that $[J_z,H]=0$.
(a) By Theorem 8.20(4), $[x,J_z]=\partial J_z/\partial p_x=-y$, so $[J_z,x]=y$; and $[p_x,J_z]=-\partial J_z/\partial x=-p_y$, so $[J_z,p_x]=p_y$. For $[J_x,J_y]$ use bilinearity and the fundamental brackets: $[yp_z-zp_y,\ zp_x-xp_z]=[yp_z,zp_x]+[zp_y,xp_z]$ (the other two brackets vanish: they involve no conjugate pair). $[yp_z,zp_x]=yp_x[p_z,z]=-yp_x$ and $[zp_y,xp_z]=p_yx[z,p_z]=xp_y$. So $[J_x,J_y]=xp_y-yp_x=J_z$; cyclically $[J_y,J_z]=J_x$, $[J_z,J_x]=J_y$.
(b) Leibniz: $[J_x^2,J_z]=2J_x[J_x,J_z]=-2J_xJ_y$, $[J_y^2,J_z]=2J_y[J_y,J_z]=2J_yJ_x$, $[J_z^2,J_z]=0$. The sum is $0$.
(c) If $J_x$ and $J_y$ are conserved, Poisson's theorem makes $[J_x,J_y]=J_z$ conserved. (Similarly for any two.)
(d) $$[J_z,p_x^2+p_y^2+p_z^2]=2p_x[J_z,p_x]+2p_y[J_z,p_y]=2p_xp_y+2p_y(-p_x)=0$$, and $$[J_z,V(r)]=-\big(x\frac{\partial V}{\partial y}-y\frac{\partial V}{\partial x}\big)=-V'(r)\big(\frac{xy}{r}-\frac{yx}{r}\big)=0$$. So $J_z$ is conserved, by Theorem 8.21(a).

A change of phase-space variables $(q,p)\mapsto(Q,P)$ is useful when it keeps Hamilton's equations in Hamiltonian form. For one degree of freedom this property is detected by a single bracket.

📘 Definition 8.11 — Canonical transformation (one degree of freedom)
A $C^2$ invertible map $(q,p)\mapsto\big(Q(q,p),P(q,p)\big)$ of an open set of the phase plane, not depending on $t$, is canonical if for every Hamiltonian $H(q,p,t)$ the transformed motions satisfy $\dot Q=\partial K/\partial P$, $\dot P=-\partial K/\partial Q$ with $K(Q,P,t)=H(q,p,t)$.
📐 Theorem 8.22 — The bracket test
The map of Definition 8.11 is canonical if and only if $[Q,P]_{q,p}=1$ identically. Moreover $[Q,P]_{q,p}=\dfrac{\partial(Q,P)}{\partial(q,p)}$, so a canonical map of the phase plane preserves area and orientation.

Proof. Along a motion, $\dot Q=[Q,H]$ by Theorem 8.21(a). Write $H$ as $K(Q,P,t)$ and use the chain rule $\frac{\partial H}{\partial q}=K_Q\frac{\partial Q}{\partial q}+K_P\frac{\partial P}{\partial q}$, $\frac{\partial H}{\partial p}=K_Q\frac{\partial Q}{\partial p}+K_P\frac{\partial P}{\partial p}$: $$[Q,H]=\frac{\partial Q}{\partial q}\Big(K_Q\frac{\partial Q}{\partial p}+K_P\frac{\partial P}{\partial p}\Big)-\frac{\partial Q}{\partial p}\Big(K_Q\frac{\partial Q}{\partial q}+K_P\frac{\partial P}{\partial q}\Big)=K_P\,[Q,P].$$ In the same way $\dot P=[P,H]=K_Q[P,Q]=-K_Q[Q,P]$. Hence the transformed equations are Hamiltonian with Hamiltonian $K$ for every $H$ if and only if $[Q,P]=1$ (take $K=P$, for example, to see necessity). Finally $[Q,P]=Q_qP_p-Q_pP_q$ is the Jacobian determinant. ∎

✏️ Example 6 — Canonical or not?
Decide which of the following maps are canonical: (a) the rotation $Q=q\cos\alpha-p\sin\alpha$, $P=q\sin\alpha+p\cos\alpha$; (b) $Q=\log q$, $P=qp$ ($q\gt0$); (c) $Q=q^2$, $P=p/q$ ($q\gt0$); (d) $Q=p$, $P=q$. Then use (a) or a suitable map to put $H=\tfrac12(p^2+q^2)$ into a form in which it is trivial to solve.
(a) Yes $[Q,P]=\cos\alpha\cdot\cos\alpha-(-\sin\alpha)\sin\alpha=1$. (Rotations of the phase plane are canonical; $\alpha=\pi/2$ gives $Q=-p$, $P=q$.)
(b) Yes $[Q,P]=\frac1q\cdot q-0\cdot p=1$.
(c) No $[Q,P]=2q\cdot\frac1q-0=2$. (It becomes canonical after rescaling: $P=p/(2q)$.)
(d) No $[Q,P]=0\cdot0-1\cdot1=-1$: swapping $q$ and $p$ reverses orientation; $Q=p$, $P=-q$ is canonical.
Oscillator The map $q=\sqrt{2P}\sin Q$, $p=\sqrt{2P}\cos Q$ ($P\gt0$) has $$[q,p]_{Q,P}=\sqrt{2P}\cos Q\cdot\frac{\cos Q}{\sqrt{2P}}-\sqrt{2P}(-\sin Q)\cdot\frac{\sin Q}{\sqrt{2P}}=1$$, so its inverse is canonical (Exercise IV.5), and $K=\tfrac12(p^2+q^2)=P$. Then $\dot P=-\partial K/\partial Q=0$ and $\dot Q=\partial K/\partial P=1$: $P$ is constant and $Q=t+Q_0$, i.e. $q=\sqrt{2P}\sin(t+Q_0)$. $P$ is the action variable: $2\pi P$ is the phase area enclosed by the orbit.

The Principle of Least Action and the Routhian

Hamilton's principle fixes the end times and lets the energy be whatever it must be. The older principle of Maupertuis (1744), made precise by Euler and Lagrange and given its geometric form by Jacobi (1837), fixes the energy and lets the time of transit be free; it describes the shape of the trajectory rather than its timing.

📘 Definition 8.12 — Abbreviated action
For a path in configuration space with momenta $p$, the abbreviated action is $W=\displaystyle\int\sum_jp_j\,dq_j$. For a scleronomic system with $T=\tfrac12\sum a_{jk}(q)\dot q_j\dot q_k$, Euler's theorem gives $\sum_jp_j\dot q_j=2T$, so $W=\displaystyle\int2T\,dt$. With the kinetic metric $ds^2=\sum_{j,k}a_{jk}(q)\,dq_j\,dq_k$ we have $T=\tfrac12(ds/dt)^2$.
📐 Theorem 8.23 — Jacobi's form of the principle of least action
Let $L=\tfrac12\sum a_{jk}(q)\dot q_j\dot q_k-V(q)$ with $(a_{jk})$ positive definite and $C^2$ data, and fix an energy $E$. In the region $\{V\lt E\}$, a curve in configuration space is the orbit of a motion of energy $E$ if and only if it is an extremal (in any regular parametrisation) of $$J[\gamma]=\int_\gamma\sqrt{2\big(E-V(q)\big)}\;ds,\qquad ds=\sqrt{\textstyle\sum a_{jk}\,dq_jdq_k}.$$ Along a motion of energy $E$, $J$ equals the abbreviated action $W=\int2T\,dt$ (Maupertuis' principle: $\delta\!\int2T\,dt=0$ among paths of fixed energy and fixed end points). Equivalently, the orbits are the geodesics of the metric $2(E-V)\,ds^2$.

Proof. Parametrise $\gamma$ by any parameter $\lambda$ and write $q'=dq/d\lambda$, $|q'|_a=\sqrt{\sum a_{jk}q_j'q_k'}$. Then $J=\int G\,d\lambda$ with $G=\sqrt{2(E-V)}\,|q'|_a$. Because $G$ is positively homogeneous of degree $1$ in $q'$, $J$ does not depend on the parametrisation, and the Euler–Lagrange equations of $G$ in any regular parameter describe the same curves (they are reparametrisations of each other). So we may compute them in a particular parameter: choose $\lambda=t$ such that $|\dot q|_a^2=2(E-V)$ along the curve (possible because $E-V\gt0$; this fixes the speed). With this choice $$\frac{\partial G}{\partial\dot q_j}=\sqrt{2(E-V)}\,\frac{\sum_ka_{jk}\dot q_k}{|\dot q|_a}=\sum_ka_{jk}\dot q_k,\qquad \frac{\partial G}{\partial q_j}=-\frac{|\dot q|_a}{\sqrt{2(E-V)}}\frac{\partial V}{\partial q_j}+\sqrt{2(E-V)}\,\frac{\sum_{k,l}\partial_ja_{kl}\,\dot q_k\dot q_l}{2|\dot q|_a},$$ that is, $\dfrac{\partial G}{\partial q_j}=-\dfrac{\partial V}{\partial q_j}+\tfrac12\sum_{k,l}\partial_ja_{kl}\,\dot q_k\dot q_l$. The Euler–Lagrange equation $\frac{d}{dt}\frac{\partial G}{\partial\dot q_j}=\frac{\partial G}{\partial q_j}$ is therefore $$\frac{d}{dt}\sum_ka_{jk}\dot q_k-\tfrac12\sum_{k,l}\partial_ja_{kl}\,\dot q_k\dot q_l+\frac{\partial V}{\partial q_j}=0,$$ which is exactly Lagrange's equation for $L$. Conversely, a motion of energy $E$ satisfies $\tfrac12|\dot q|_a^2=T=E-V$, i.e. it is parametrised in the special way, and satisfies Lagrange's equations, hence the Euler–Lagrange equations of $G$. Finally, along such a motion $\sqrt{2(E-V)}\,ds=\sqrt{2T}\cdot\sqrt{2T}\,dt=2T\,dt$. ∎

✏️ Example 7 — Projectiles from Jacobi's principle
A particle of mass $m$ moves in a vertical plane in the potential $V=mgy$ with energy $E$. Using Jacobi's principle (not Newton's or Lagrange's equations), show that its orbits are parabolas, and identify the constant of integration.
Functional $T=\tfrac12m(\dot x^2+\dot y^2)$, so $ds=\sqrt m\,\sqrt{dx^2+dy^2}$. Describing the orbit as $y=y(x)$, $J=\sqrt{2m}\displaystyle\int\sqrt{E-mgy}\,\sqrt{1+y'^2}\,dx$ — the same functional as for light in a medium of refractive index $\propto\sqrt{E-mgy}$.
Beltrami The integrand $F=\sqrt{E-mgy}\sqrt{1+y'^2}$ does not contain $x$, so the Beltrami identity of §6.1, $F-y'F_{y'}=c$, gives $\dfrac{\sqrt{E-mgy}}{\sqrt{1+y'^2}}=c$, i.e. $E-mgy=c^2(1+y'^2)$.
Parabola Differentiate in $x$: $-mgy'=2c^2y'y''$, so (away from vertical motion, where $y'\ne0$ somewhere) $y''=-\dfrac{mg}{2c^2}$: a parabola opening downward.
Meaning of $c$ At the top of the arc $y'=0$, so $c^2=E-mgy_{\text{top}}=\tfrac12mv_x^2$ (all kinetic energy there is horizontal). Then $y''=-g/v_x^2$, the familiar projectile curvature — obtained without ever mentioning time.

When some coordinates are cyclic, their momenta are constants and one would like to discard them. Doing so naively in $L$ gives wrong equations; the correct procedure, due to Routh (1877), performs a Legendre transform in the cyclic velocities only.

📘 Definition 8.13 — Routhian
Split the coordinates into non-cyclic $q_1,\dots,q_s$ and cyclic $q_{s+1},\dots,q_n$, with conserved momenta $p_c=\beta_c$ ($c\gt s$), and suppose the equations $\beta_c=\partial L/\partial\dot q_c$ can be solved for the cyclic velocities. The Routhian is $$R(q_1,\dots,q_s,\dot q_1,\dots,\dot q_s,\beta,t)=L-\sum_{c\gt s}\beta_c\,\dot q_c\Big|_{\dot q_c=\dot q_c(q,\dot q_a,\beta,t)} .$$ (Many books, e.g. in the Hamiltonian-minded tradition, define the Routhian with the opposite sign, $\sum\beta_c\dot q_c-L$; then it acts as a Hamiltonian for the cyclic and as minus a Lagrangian for the non-cyclic coordinates.)
📐 Theorem 8.24 — Routh's procedure
With the notation of Definition 8.13, the non-cyclic coordinates satisfy Lagrange's equations with $R$ as Lagrangian, $$\frac{d}{dt}\frac{\partial R}{\partial\dot q_a}-\frac{\partial R}{\partial q_a}=0\qquad(a=1,\dots,s),$$ and once they are found the cyclic coordinates follow by quadrature from $\dot q_c=-\partial R/\partial\beta_c$.

Proof. Compute the differential of $R$, regarding $\dot q_c$ as functions of $(q_a,\dot q_a,\beta,t)$: $$dR=\sum_a\Big(\frac{\partial L}{\partial q_a}dq_a+\frac{\partial L}{\partial\dot q_a}d\dot q_a\Big)+\sum_c\frac{\partial L}{\partial\dot q_c}d\dot q_c+\frac{\partial L}{\partial t}dt-\sum_c\beta_c\,d\dot q_c-\sum_c\dot q_c\,d\beta_c .$$ Since $\partial L/\partial\dot q_c=\beta_c$, the two sums containing $d\dot q_c$ cancel — this is the point of the Legendre transform. Reading off coefficients: $\partial R/\partial q_a=\partial L/\partial q_a$, $\partial R/\partial\dot q_a=\partial L/\partial\dot q_a$ and $\partial R/\partial\beta_c=-\dot q_c$ (cyclic coordinates do not appear because they do not appear in $L$). Lagrange's equations for $q_a$ in terms of $L$ therefore become the stated equations for $R$. ∎

For a central force, $L=\tfrac12m(\dot r^2+r^2\dot\theta^2)-V(r)$, $\beta=p_\theta=mr^2\dot\theta$, $\dot\theta=\beta/(mr^2)$, and $$R=\tfrac12m\dot r^2+\frac{\beta^2}{2mr^2}-V(r)-\frac{\beta^2}{mr^2}=\tfrac12m\dot r^2-\Big(V(r)+\frac{\beta^2}{2mr^2}\Big),$$ a one-dimensional Lagrangian with exactly the effective potential of §8.1. Substituting $\dot\theta=\beta/(mr^2)$ directly into $L$ would instead give $\tfrac12m\dot r^2+\frac{\beta^2}{2mr^2}-V$, whose equation has the centrifugal force with the wrong sign.

⚠️ Counterexamples and pitfalls
  1. Stationary, not least. For the oscillator with $\omega T\gt\pi$ the true path is a saddle point of the action (Theorem 8.13); at $\omega T=\pi$ with $x(0)=x(T)=0$ there are infinitely many true paths, all with $S=0$, and with $x(0)=0\ne x(T)$ there is none.
  2. $H$ conserved $\not\Rightarrow$ $H=T+V$, and conversely. The four cases of Theorem 8.17: rotating hoop (conserved, not energy), spring with $k(t)$ (energy, not conserved).
  3. $H$ depends on the coordinates. The same free particle has $H=T$ in inertial coordinates and $H=T-\omega J_z$ in rotating ones.
  4. Canonical momentum is not mechanical momentum. In a magnetic field $\mathbf p=m\dot{\mathbf r}+e\mathbf A$, and $\dot{\mathbf r}=(\mathbf p-e\mathbf A)/m\ne\mathbf p/m$.
  5. Not every Hamiltonian has a Lagrangian. $H=qp$ (and any $H$ affine in $p$) is singular: $\partial^2H/\partial p^2=0$ and the Legendre transform fails, although Hamilton's equations are fine.
  6. Sign conventions for brackets. With $[f,g]=f_qg_p-f_pg_q$ we have $[q,p]=1$ and $\dot f=[f,H]$; with the opposite convention both signs flip. Check before computing.
  7. Poisson's theorem needs both functions conserved. For $H=\tfrac12(p_x^2+p_y^2)+\tfrac12(x^2+4y^2)$, $f=x^2+p_x^2$ is conserved but $J_z$ is not, and $[f,J_z]=-2(xy+p_xp_y)$ is not conserved.
  8. Swapping $q$ and $p$ is not canonical. $Q=p$, $P=q$ has $[Q,P]=-1$; $Q=p$, $P=-q$ is canonical. $Q=q+p$, $P=q-p$ has bracket $-2$.
  9. Liouville is about volume, not shape. A phase-space blob may be stretched into a long filament (near a separatrix) while its area stays exactly constant; friction breaks it.
  10. Do not substitute conserved momenta into $L$. Use the Routhian $R=L-\sum\beta_c\dot q_c$; naive substitution reverses the sign of the centrifugal term.
  11. Maupertuis fixes energy, Hamilton fixes time. In Jacobi's principle the varied paths all have energy $E$ and take whatever time they need; in Hamilton's principle all paths take the same time and the energy is not fixed.

Exercises

I
Hamiltonians and canonical equations.
  • 1 Find $H$ and Hamilton's equations for a particle in plane polar coordinates in the potential $V(r)$, and for a spherical pendulum $L=\tfrac12m\ell^2(\dot\theta^2+\sin^2\theta\,\dot\varphi^2)+mg\ell\cos\theta$.
  • 2 Find $H$ for $L=\tfrac12\dot q^2+q\dot q-\tfrac12q^2$, and verify that Hamilton's equations give $\ddot q+q=0$.
  • 3 Find the Lagrangian corresponding to $H=\dfrac{p^2}{2m}+apq+\tfrac12kq^2$ ($a,k$ constants) and the equation of motion for $q$.
  • 4 For a charge in a static magnetic field, $H=\dfrac{|\mathbf p-e\mathbf A(\mathbf r)|^2}{2m}$. Show that $m\dot{\mathbf r}=\mathbf p-e\mathbf A$ and that $H$ is the kinetic energy.
  • 5 A pendulum hangs from a support that moves vertically as $y_s=A\cos\Omega t$ (§8.1, Exercise II.2). Find $H$ and decide whether it is conserved.
  • 6 A free particle in the plane is described in coordinates $(X,Y)$ rotating with constant angular velocity $\omega$ (§8.1, Exercise I.5). Show that $H=\dfrac{p_X^2+p_Y^2}{2m}-\omega(Xp_Y-Yp_X)$.
  • 7 Solve Hamilton's equations for $H=\dfrac{p^2}{2m}+\tfrac12m\omega^2q^2$ and describe the orbits in the phase plane. What is the area enclosed by the orbit of energy $E$?
  • 8 Solve Hamilton's equations for $H=qp$ and sketch the phase portrait. Is the origin stable?
  • 9 For $L=\tfrac12m\dot x^2-\tfrac12k(t)x^2$, find $H$ and $dH/dt$.
1 Polar: $H=\dfrac{p_r^2}{2m}+\dfrac{p_\theta^2}{2mr^2}+V(r)$; $\dot r=p_r/m$, $\dot\theta=p_\theta/(mr^2)$, $\dot p_r=\dfrac{p_\theta^2}{mr^3}-V'(r)$, $\dot p_\theta=0$. Spherical pendulum: $H=\dfrac{p_\theta^2}{2m\ell^2}+\dfrac{p_\varphi^2}{2m\ell^2\sin^2\theta}-mg\ell\cos\theta$; $\dot p_\varphi=0$, $\dot p_\theta=\dfrac{p_\varphi^2\cos\theta}{m\ell^2\sin^3\theta}-mg\ell\sin\theta$.
2 $p=\dot q+q$, $$H=p\dot q-L=\tfrac12(p-q)^2+\tfrac12q^2=\tfrac12p^2-pq+q^2$$. Then $\dot q=p-q$, $\dot p=p-2q$, and $\ddot q=\dot p-\dot q=-q$.
3 $\dot q=p/m+aq$, so $p=m(\dot q-aq)$ and $L=p\dot q-H=\tfrac12m\dot q^2-maq\dot q+\tfrac12(ma^2-k)q^2$. The middle term is a total derivative, so $m\ddot q=(ma^2-k)q$: oscillation with frequency $\sqrt{k/m-a^2}$ if $k\gt ma^2$, exponential growth if $k\lt ma^2$.
4 $\dot{\mathbf r}=\partial H/\partial\mathbf p=(\mathbf p-e\mathbf A)/m$, so $H=\tfrac12m|\dot{\mathbf r}|^2$. It is conserved (no explicit $t$): the magnetic force does no work.
5 $$L=\tfrac12m\big(\ell^2\dot\theta^2-2\ell A\Omega\sin\Omega t\sin\theta\,\dot\theta+A^2\Omega^2\sin^2\Omega t\big)+mg\ell\cos\theta-mgA\cos\Omega t$$. With $b=-m\ell A\Omega\sin\Omega t\sin\theta$, $p_\theta=m\ell^2\dot\theta+b$, and by Theorem 8.16 $$H=\dfrac{(p_\theta-b)^2}{2m\ell^2}-\tfrac12mA^2\Omega^2\sin^2\Omega t-mg\ell\cos\theta+mgA\cos\Omega t$$. It depends explicitly on $t$, so it is not conserved: the driven support pumps energy in and out.
6 $L=\tfrac12m\big[(\dot X-\omega Y)^2+(\dot Y+\omega X)^2\big]$, $p_X=m(\dot X-\omega Y)$, $p_Y=m(\dot Y+\omega X)$. Then $\dot X=p_X/m+\omega Y$, $\dot Y=p_Y/m-\omega X$ and $$H=p_X\dot X+p_Y\dot Y-L=\dfrac{p_X^2+p_Y^2}{2m}+\omega(Yp_X-Xp_Y)$$, as claimed. It is conserved but equals $T-\omega J_z$, not $T$.
7 $\dot q=p/m$, $\dot p=-m\omega^2q$: $q=A\cos(\omega t+\phi)$, $p=-m\omega A\sin(\omega t+\phi)$. Orbits are the ellipses $\dfrac{p^2}{2mE}+\dfrac{q^2}{2E/(m\omega^2)}=1$, traversed clockwise, with area $\pi\sqrt{2mE}\sqrt{2E/(m\omega^2)}=\dfrac{2\pi E}{\omega}$.
8 $\dot q=q$, $\dot p=-p$: $q=q_0e^t$, $p=p_0e^{-t}$. Orbits are the hyperbolas $qp=\text{const}$ and the axes: a saddle, unstable. (Areas are preserved: the square $[0,1]^2$ becomes $[0,e^t]\times[0,e^{-t}]$.)
9 $H=\dfrac{p^2}{2m}+\tfrac12k(t)x^2$ (equal to $T+V$), and $\dfrac{dH}{dt}=\dfrac{\partial H}{\partial t}=\tfrac12\dot k(t)x^2$.
II
Hamilton's principle and least action.
  • 1 For a free particle, $L=\tfrac12m\dot x^2$, show that the straight-line motion between $x(0)=0$ and $x(T)=X$ minimises the action among all admissible paths, and compute the minimum value.
  • 2 For $L=\tfrac12(\dot x^2-x^2)$, $x(0)=x(T)=0$, $T=3\pi/2$: compute $\Delta S=S[\varepsilon\eta]-S[0]$ for $\eta=\sin(\pi t/T)$ and for $\eta=\sin(2\pi t/T)$. What kind of stationary point is $x\equiv0$?
  • 3 For the same Lagrangian with $x(0)=0$, $x(T)=1$ and $T\ne k\pi$, find the true path and show that its action is $S_0=\tfrac12\cot T$. What happens as $T\to\pi$?
  • 4 Derive Lagrange's equations for the spherical pendulum directly from Hamilton's principle and the Euler–Lagrange equations for two unknown functions (§6.1).
  • 5 Derive Hamilton's equations for $H=\dfrac{p^2}{2m}+V(q)$ by making $\int(p\dot q-H)\,dt$ stationary (Theorem 8.18).
  • 6 Compute the abbreviated action $\oint p\,dq$ over one period of the oscillator of energy $E$ and frequency $\omega$, and check that it equals $\int_0^{2\pi/\omega}2T\,dt$.
  • 7 A particle crosses a plane interface from a region where $V=0$ to one where $V=V_0\lt E$, with speeds $v_1$ and $v_2$ and angles $\alpha_1$, $\alpha_2$ to the normal. Use Maupertuis' principle to show $v_1\sin\alpha_1=v_2\sin\alpha_2$, and compare with Snell's law for light.
  • 8 Use Jacobi's principle to show that a particle moving freely ($V=0$) on a smooth circular cylinder travels along helices (or circles, or generators).
1 $x_0=Xt/T$. For admissible $\eta$, $$S[x_0+\eta]-S[x_0]=m\int\dot x_0\dot\eta+\tfrac12m\int\dot\eta^2=\tfrac12m\int_0^T\dot\eta^2\ge0$$ (the middle term is $m\frac XT[\eta]_0^T=0$), with equality only for $\eta\equiv0$. Minimum $S_0=\tfrac12m\dfrac{X^2}{T}$.
2 $\Delta S=\tfrac12\varepsilon^2\int_0^T(\dot\eta^2-\eta^2)=\varepsilon^2\dfrac T4\Big(\dfrac{k^2\pi^2}{T^2}-1\Big)$. For $k=1$: $\dfrac{3\pi}{8}\big(\tfrac49-1\big)\varepsilon^2=-\dfrac{5\pi}{24}\varepsilon^2\approx-0.654\,\varepsilon^2$. For $k=2$: $\dfrac{3\pi}{8}\big(\tfrac{16}9-1\big)\varepsilon^2=\dfrac{7\pi}{24}\varepsilon^2\approx0.916\,\varepsilon^2$. A saddle point.
3 $x_0=\dfrac{\sin t}{\sin T}$. Integrating by parts, $$\int_0^T(\dot x_0^2-x_0^2)=[x_0\dot x_0]_0^T-\int x_0(\ddot x_0+x_0)=x_0(T)\dot x_0(T)=\cot T$$, so $S_0=\tfrac12\cot T$. As $T\to\pi$ the path amplitude $1/\sin T\to\infty$ and $S_0\to\pm\infty$; at $T=\pi$ no solution exists (conjugate point).
4 $S=\int\big[\tfrac12m\ell^2(\dot\theta^2+\sin^2\theta\,\dot\varphi^2)+mg\ell\cos\theta\big]dt$; the Euler–Lagrange equations for $\theta$ and $\varphi$: $m\ell^2\ddot\theta-m\ell^2\sin\theta\cos\theta\,\dot\varphi^2+mg\ell\sin\theta=0$ and $\frac{d}{dt}(m\ell^2\sin^2\theta\,\dot\varphi)=0$.
5 $$\delta\int(p\dot q-H)\,dt=\int\big[(\dot q-p/m)\pi-(\dot p+V'(q))\xi\big]dt$$ after integration by parts; stationarity for all $\pi,\xi$ gives $\dot q=p/m$ and $\dot p=-V'(q)$.
6 $\oint p\,dq$ is the area of the phase ellipse, $2\pi E/\omega$ (Exercise I.7). Also $2T=m\dot q^2=m\omega^2A^2\sin^2(\omega t+\phi)$ with $E=\tfrac12m\omega^2A^2$, and $\int_0^{2\pi/\omega}2T\,dt=m\omega^2A^2\cdot\dfrac{\pi}{\omega}=\dfrac{2\pi E}{\omega}$ ✓.
7 In each region the speed is constant ($v_i=\sqrt{2(E-V_i)/m}$) and Jacobi's integrand is constant, so orbits are straight lines and $J\propto v_1\ell_1+v_2\ell_2$ with $\ell_i$ the path lengths. Minimising over the crossing point (as in the derivation of Snell's law, §6.1) gives $v_1\sin\alpha_1=v_2\sin\alpha_2$ — equivalently, the momentum component parallel to the interface is conserved. For light (Fermat: minimise $\ell_1/v_1+\ell_2/v_2$) one gets $\sin\alpha_1/v_1=\sin\alpha_2/v_2$: the speed appears inversely. This was a famous puzzle of the corpuscular theory of light.
8 With $V=0$, $J=\sqrt{2E}\int ds$: the orbits are the geodesics of the surface metric. Unrolling the cylinder onto a plane is an isometry, under which geodesics become straight lines; a straight line in the unrolled plane, $z=a\varphi\tan\beta+c$, rolls back into a helix (circles for $\beta=0$, generators for $\beta=\pi/2$).
III
Poisson brackets and canonical transformations.
  • 1 Compute $[q^2,p^2]$, $[q,f(p)]$ and $[p,g(q)]$.
  • 2 Compute $[J_z,y]$, $[J_z,p_y]$ and $[J_z,x^2+y^2]$.
  • 3 Verify $[J_y,J_z]=J_x$ directly from the definition.
  • 4 Show that $[\mathbf a\cdot\mathbf J,\ |\mathbf p|^2]=0$ for every constant vector $\mathbf a$.
  • 5 For $H=\tfrac12(p_x^2+p_y^2)+\tfrac12\omega^2(x^2+y^2)$ show that $J_z$, $p_x^2+\omega^2x^2$ and $p_xp_y+\omega^2xy$ are constants of motion. Is their bracket $[J_z,p_x^2+\omega^2x^2]$ a constant of motion too?
  • 6 Which are canonical? (a) $Q=p$, $P=-q$; (b) $Q=q^2$, $P=p/(2q)$; (c) $Q=\sqrt{2q}\cos p$, $P=\sqrt{2q}\sin p$; (d) $Q=q+p$, $P=q-p$.
  • 7 For which constants $\alpha,\beta$ is $Q=q^\alpha\cosh(\beta p)$, $P=q^\alpha\sinh(\beta p)$ ($q\gt0$) canonical?
  • 8 Show that $Q=q$, $P=p+\phi'(q)$ is canonical for every $C^2$ function $\phi$, and relate it to adding a total derivative to the Lagrangian.
1 $[q^2,p^2]=2q\cdot2p=4qp$; $[q,f(p)]=f'(p)$; $[p,g(q)]=-g'(q)$.
2 $[J_z,y]=-\partial J_z/\partial p_y=-x$; $[J_z,p_y]=\partial J_z/\partial y=-p_x$; $$[J_z,x^2+y^2]=2x[J_z,x]+2y[J_z,y]=2xy-2yx=0$$.
3 $$[zp_x-xp_z,\ xp_y-yp_x]=[zp_x,xp_y]+[xp_z,yp_x]$$ $$=zp_y[p_x,x]+yp_z[x,p_x]=-zp_y+yp_z=J_x$$ (the remaining brackets contain no conjugate pairs).
4 By linearity it suffices to take $\mathbf a=\mathbf k$: $[J_z,p_x^2+p_y^2+p_z^2]=2p_xp_y-2p_yp_x=0$ (Example 5(d)).
5 Each bracket with $H$ vanishes: e.g. $$[p_xp_y+\omega^2xy,H]=p_y[p_x,H]+p_x[p_y,H]+\omega^2y[x,H]+\omega^2x[y,H]$$ $$=-\omega^2xp_y-\omega^2yp_x+\omega^2yp_x+\omega^2xp_y=0$$, using $[x,H]=p_x$, $[p_x,H]=-\omega^2x$. Then by Poisson's theorem $$[J_z,p_x^2+\omega^2x^2]=2p_x[J_z,p_x]+2\omega^2x[J_z,x]=2p_xp_y+2\omega^2xy$$ is conserved — it is twice the third quantity.
6 $[Q,P]$: (a) $0\cdot0-1\cdot(-1)=1$ ✓; (b) $2q\cdot\frac1{2q}=1$ ✓; (c) $\frac{\cos p}{\sqrt{2q}}\sqrt{2q}\cos p+\sqrt{2q}\sin p\cdot\frac{\sin p}{\sqrt{2q}}=1$ ✓; (d) $1\cdot(-1)-1\cdot1=-2$ ✗.
7 $$Q_qP_p-Q_pP_q=\alpha\beta q^{2\alpha-1}\big(\cosh^2(\beta p)-\sinh^2(\beta p)\big)$$ $$=\alpha\beta q^{2\alpha-1}$$. This is identically $1$ iff $2\alpha-1=0$ and $\alpha\beta=1$: $\alpha=\tfrac12$, $\beta=2$.
8 $[Q,P]=1\cdot1-0=1$. If $L'=L+\frac{d}{dt}\phi(q)=L+\phi'(q)\dot q$, then $p'=\partial L'/\partial\dot q=p+\phi'(q)$: adding a total derivative to $L$ shifts the momentum by a gradient, which is a canonical transformation, and $H'(q,p')=H(q,p'-\phi'(q))$.
IV
Proofs and challenges.
  • 1 Prove that $H(q,p)=\tfrac12p^{\mathsf T}A(q)^{-1}p+V(q)$ is a strictly convex function of $p$ for each fixed $q$ when $A(q)$ is positive definite.
  • 2 For the damped oscillator $\dot q=p$, $\dot p=-q-\gamma p$, prove that phase areas are multiplied by $e^{-\gamma t}$ in time $t$, and deduce that the system has no Hamiltonian $H(q,p)$ for $\gamma\ne0$.
  • 3 Use the Routhian to eliminate $\varphi$ from the spherical pendulum, and find the condition for a conical motion at constant $\theta=\theta_0$.
  • 4 Show that the Legendre transform of $f(v)=|v|^a/a$ on $\mathbb R$ ($a\gt1$) is $g(p)=|p|^b/b$ with $\frac1a+\frac1b=1$, and deduce Young's inequality $pv\le\frac{|v|^a}{a}+\frac{|p|^b}{b}$.
  • 5 Prove that $[Q,P]_{q,p}\,[q,p]_{Q,P}=1$ for an invertible $C^1$ map with non-vanishing Jacobian, and deduce that the inverse of a canonical map is canonical.
  • 6 Show that a Hamiltonian system $\dot q=\partial H/\partial p$, $\dot p=-\partial H/\partial q$ ($n=1$, $H\in C^2$) cannot have an asymptotically stable equilibrium.
1 The Hessian in $p$ is $A(q)^{-1}$, and the inverse of a symmetric positive definite matrix is symmetric positive definite (its eigenvalues are reciprocals of positive numbers). A $C^2$ function with positive definite Hessian on a convex set is strictly convex.
2 The vector field $(p,\,-q-\gamma p)$ has divergence $0+(-\gamma)=-\gamma$. As in the proof of Theorem 8.19, $\det D\Phi_t=\exp\int_0^t(-\gamma)\,ds=e^{-\gamma t}$, so areas scale by $e^{-\gamma t}$. A Hamiltonian flow preserves area (Theorem 8.19), so for $\gamma\ne0$ no $H$ exists. (The time-dependent Lagrangian $e^{\gamma t}(\tfrac12\dot q^2-\tfrac12q^2)$ of §8.1 does give a Hamiltonian, but in different variables and with explicit time.)
3 $\beta=p_\varphi=m\ell^2\sin^2\theta\,\dot\varphi$, $\dot\varphi=\beta/(m\ell^2\sin^2\theta)$, and $R=\tfrac12m\ell^2\dot\theta^2-\dfrac{\beta^2}{2m\ell^2\sin^2\theta}+mg\ell\cos\theta$. Its Lagrange equation: $m\ell^2\ddot\theta=\dfrac{\beta^2\cos\theta}{m\ell^2\sin^3\theta}-mg\ell\sin\theta$. Constant $\theta=\theta_0$ requires the right side to vanish: $\beta^2=m^2g\ell^3\dfrac{\sin^4\theta_0}{\cos\theta_0}$, i.e. $\dot\varphi^2=\dfrac{g}{\ell\cos\theta_0}$ (possible for $0\lt\theta_0\lt\pi/2$) — the conical pendulum.
4 $f'(v)=|v|^{a-1}\operatorname{sgn}v=p$ gives $|v|=|p|^{1/(a-1)}=|p|^{b-1}$ since $\frac1{a-1}=b-1$. Then $$g=pv-f=|p|^b-\frac{|p|^{(b-1)a}}{a}=|p|^b\big(1-\tfrac1a\big)=\frac{|p|^b}{b}$$, using $(b-1)a=b$. Theorem 8.14(c) says $g(p)\ge pv-f(v)$ for every $v$, which is Young's inequality.
5 $[Q,P]_{q,p}$ is the Jacobian determinant of $(q,p)\mapsto(Q,P)$ and $[q,p]_{Q,P}$ that of the inverse map; the chain rule makes their product $\det I=1$. If $[Q,P]_{q,p}=1$ then $[q,p]_{Q,P}=1$, so the inverse is canonical by Theorem 8.22.
6 If an equilibrium $z_0$ were asymptotically stable, a small disc $D$ around it would be carried into ever smaller neighbourhoods of $z_0$ (by compactness of $\bar D$ and uniform attraction on a smaller disc), so $\mathrm{area}\,\Phi_t(D)\to0$, contradicting Liouville's theorem. (Equivalently: $H$ is constant on orbits, so orbits starting near $z_0$ with $H\ne H(z_0)$ cannot approach $z_0$, by continuity of $H$.)
🎯 Exam corner CSIR Part BCSIR Part CGATE MA

E1. CSIR Part B GATE MA The Hamiltonian corresponding to the Lagrangian $L=\tfrac12m(\dot x^2+\dot y^2)+\alpha(x\dot y-y\dot x)-V(x,y)$ is (A) $\dfrac{(p_x-\alpha y)^2+(p_y+\alpha x)^2}{2m}+V$; (B) $\dfrac{(p_x+\alpha y)^2+(p_y-\alpha x)^2}{2m}+V$; (C) $\dfrac{p_x^2+p_y^2}{2m}+\alpha(xp_y-yp_x)+V$; (D) $\dfrac{(p_x+\alpha y)^2+(p_y-\alpha x)^2}{2m}-V$.

Momenta $p_x=m\dot x-\alpha y$, $p_y=m\dot y+\alpha x$, so $b=(-\alpha y,\alpha x)$ in Theorem 8.16.
Hamiltonian $$H=\tfrac1{2m}|p-b|^2+V=\dfrac{(p_x+\alpha y)^2+(p_y-\alpha x)^2}{2m}+V$$. (C) is what one gets by forgetting the $\alpha^2$ terms and the sign; (A) has the signs of $b$ reversed; (D) has the wrong sign of $V$.
Answer (B).

E2. CSIR Part B With $[f,g]=\sum(f_{q}g_{p}-f_{p}g_{q})$ and $J_z=xp_y-yp_x$, the Poisson bracket $[J_z,\ xp_x]$ equals (A) $0$; (B) $xp_y-yp_x$; (C) $xp_y+yp_x$; (D) $xp_x-yp_y$.

Leibniz $$[J_z,xp_x]=[J_z,x]\,p_x+x\,[J_z,p_x]=y\,p_x+x\,p_y$$, using $[J_z,x]=y$ and $[J_z,p_x]=p_y$ (Example 5).
Answer (C).

E3. CSIR Part B The transformation $Q=\tfrac12(q^2+p^2)$, $P=\lambda\tan^{-1}(q/p)$ (on $p\gt0$) is canonical for (A) $\lambda=1$; (B) $\lambda=-1$; (C) $\lambda=2$; (D) $\lambda=\tfrac12$.

Bracket With $\psi=\tan^{-1}(q/p)$: $\psi_q=\dfrac{p}{q^2+p^2}$, $\psi_p=-\dfrac{q}{q^2+p^2}$. So $[Q,\psi]=q\psi_p-p\psi_q=\dfrac{-q^2-p^2}{q^2+p^2}=-1$, and $[Q,P]=-\lambda$.
Answer (B): $\lambda=-1$ (Theorem 8.22).

E4. CSIR Part C Let $L=\tfrac12(\dot x^2-x^2)$ and consider $C^2$ paths on $[0,T]$ with $x(0)=0$, $x(T)=b$. Which of the following are true? (A) If $T=2$, the solution of Lagrange's equation is a strict minimum of the action. (B) If $T=4$, the solution of Lagrange's equation is a minimum of the action. (C) If $T=\pi$ and $b\ne0$, no path satisfies Lagrange's equation and the boundary conditions. (D) If $T=\pi$ and $b=0$, infinitely many paths satisfy them, all with the same action.

(A) True $\omega T=2\lt\pi$: Theorem 8.13.
(B) False $\omega T=4\gt\pi$: $\eta=\sin(\pi t/4)$ gives $\Delta S=\varepsilon^2\cdot1\cdot\big(\tfrac{\pi^2}{16}-1\big)\approx-0.383\,\varepsilon^2\lt0$.
(C) True Solutions with $x(0)=0$ are $x=c\sin t$, and $x(\pi)=0\ne b$.
(D) True Every $x=c\sin t$ works, and $S=\tfrac12[x\dot x]_0^\pi=0$ for all of them.
Answer (A), (C) and (D).

E5. CSIR Part C In which of the following systems is the Hamiltonian a constant of the motion but not equal to the total mechanical energy $T+V$? (A) A bead on a smooth circular hoop rotating with constant angular velocity about a vertical diameter, with the angle on the hoop as coordinate. (B) A simple pendulum whose string is being shortened at a constant rate. (C) A particle in a central field, in plane polar coordinates. (D) A bead on a smooth straight horizontal wire rotating uniformly about a vertical axis through a point of the wire.

(A) Yes $H=T_2-T_0+V$ with no explicit $t$ (Example 4).
(B) No With $\ell=\ell_0-vt$, $L=\tfrac12m(v^2+\ell^2\dot\theta^2)+mg\ell\cos\theta$ depends explicitly on $t$ through $\ell$, so $H=\dfrac{p_\theta^2}{2m\ell(t)^2}-\tfrac12mv^2-mg\ell(t)\cos\theta$ is not conserved.
(C) No $H$ is conserved but equals $T+V$ (scleronomic coordinates).
(D) Yes $H=\dfrac{p_r^2}{2m}-\tfrac12m\omega^2r^2$, conserved, while $T=\tfrac12m(\dot r^2+\omega^2r^2)$ grows.
Answer (A) and (D).

E6. CSIR Part C For $H=\tfrac12(p_x^2+p_y^2)+\tfrac12(x^2+4y^2)$, which of the following are constants of the motion? (A) $p_x^2+x^2$; (B) $xp_y-yp_x$; (C) $p_y^2+4y^2$; (D) $xy+p_xp_y$.

(A) True $H$ is a sum of independent oscillators; $[p_x^2+x^2,H]=2p_x(-x)+2x(p_x)=0$.
(B) False Along a motion, $$\dot J_z=\dot xp_y+x\dot p_y-\dot yp_x-y\dot p_x=p_xp_y-4xy-p_yp_x+xy=-3xy\ne0$$. The potential is not rotationally symmetric.
(C) True $[p_y^2+4y^2,H]=2p_y(-4y)+8y\,p_y=0$.
(D) False $$\dfrac{d}{dt}(xy+p_xp_y)=p_xy+xp_y+(-x)p_y+p_x(-4y)=-3yp_x\ne0$$. This is $-\tfrac12[x^2+p_x^2,J_z]$; Poisson's theorem does not apply because $J_z$ is not conserved (compare Exercise III.5, where the frequencies are equal and it is).
Answer (A) and (C).
🧑‍🏫 For the teacher

Suggested plan — 3 lectures × 60 min.

  1. Hamilton's principle. Recall the Euler–Lagrange equation of §6.1 and prove Theorem 8.12 in ten minutes. Example 1 on the board, then Theorem 8.13 with Wirtinger's inequality. Project Interactive 1: let the class predict what happens to the parabola for $k=1$ as $T$ crosses $\pi$, and why $k=2$ behaves differently.
  2. Hamilton's equations. Legendre transform (Theorem 8.14, with the picture of the tangent line of slope $p$), Definition 8.9, Theorems 8.15–8.17, the four-case table. Examples 2–4. Liouville (Theorem 8.19) with Interactive 2 — switch on friction at the end.
  3. Brackets and principles. Poisson brackets, the Jacobi identity proof via commutators, Poisson's theorem, Example 5; canonical transformations and Example 6. Jacobi's principle with Example 7 (projectile as "optics"), Routhian with the central-force warning. Exam corner E1, E3, E5 live.

Discussion questions. (1) Hamilton's principle "knows" the end point in advance. Is the principle teleological? How does the proof of Theorem 8.12 dispel the paradox? (2) Why does a bead on a rotating hoop have a conserved $H$ that is not its energy, and which external agent is responsible for the difference? (3) Liouville's theorem says phase areas are conserved, yet a pendulum blob near the separatrix becomes a long thin filament. Is information lost?

Misconceptions to watch for. "The action is always minimised"; "$H$ is always $T+V$"; computing $\partial H/\partial q$ with $\dot q$ (instead of $p$) held fixed; confusing canonical and mechanical momentum; using the opposite Poisson-bracket sign halfway through a problem; substituting $p_\theta=\beta$ into $L$ instead of forming the Routhian; believing that "canonical" means "area-preserving up to sign".

Suggested homework. I(1, 2, 3, 6, 8), II(1, 2, 3, 7), III(1, 2, 5, 6, 7), IV(2, 3, 4); Exam corner E2, E4, E6.

🔬 Research–Teaching NexusResearch-tutored · optional, about 60 minutes

Research question. When we simulate a Hamiltonian system for a very long time, does a "more accurate" method (classical RK4) keep the energy better than a "cruder" one that respects the Hamiltonian structure (the leapfrog or Störmer–Verlet method)?

Why it matters. Long-time simulations of the solar system (used by observatories and space agencies to compute planetary ephemerides and to study the stability of orbits over billions of years), molecular-dynamics simulations of proteins in drug design, and particle tracking in accelerators such as those at CERN all integrate Hamiltonian systems over millions of steps. Methods that preserve phase-space area — symplectic integrators — are now standard there for a reason this project uncovers.

What to do.

  1. Take the pendulum $H=\tfrac12p^2-\cos q$ with $q(0)=1$, $p(0)=0$, step $h=0.1$. Implement explicit Euler ($q\mathrel{+}=hp$, $p\mathrel{-}=h\sin q$ with the old values), symplectic Euler (update $p$ first, then $q$ with the new $p$), leapfrog (half-step in $p$, full step in $q$, half-step in $p$) and classical RK4 (§5.5).
  2. Run each to $t=1000$ and plot the energy error $H(q_n,p_n)-H(q_0,p_0)$ against time. Repeat RK4 and leapfrog to $t=10\,000$.
  3. Check numerically that one step of symplectic Euler and of leapfrog is an area-preserving map (compute its Jacobian determinant), while explicit Euler and RK4 are not.
  4. Formulate a conjecture about the long-time behaviour of the energy error for each method and test it by halving $h$.

Tools: Python with NumPy and Matplotlib, or a spreadsheet for the short runs; Interactive 2 for intuition about area preservation.

Hand in: The energy-error plots, the Jacobian determinants, and a half-page explanation of which method you would use for a billion-year orbit simulation and why.

Going further. Read about backward error analysis: a symplectic method exactly solves a slightly modified Hamiltonian system, which is why its energy error stays bounded. Look up the Wisdom–Holman integrator used in planetary dynamics.

Instructor note: with these data, explicit Euler's energy error grows to about $+48.6$ by $t=1000$ (the pendulum is spun up into rotation); symplectic Euler stays within about $0.023$ and leapfrog within about $0.0011$, both oscillating without trend; RK4 is far more accurate at first but drifts steadily downwards — about $-4.6\times10^{-5}$ at $t=1000$ and $-4.6\times10^{-4}$ at $t=10\,000$, a linear secular drift, while the leapfrog error is still bounded by about $0.0011$. Over long enough times the cheap symplectic method wins. The Jacobian determinant of one leapfrog or symplectic-Euler step is exactly $1$; for explicit Euler it is $1+h^2\cos q$.

🧪 Self-check quiz

0/5 correct

Q1. Hamilton's canonical equations are

Q2. With $[f,g]=\sum(f_qg_p-f_pg_q)$, the bracket $[q^2,p]$ equals

Q3. The Hamiltonian of a system equals $T+V$ provided

Q4. Hamilton's principle asserts that, among paths with the same end configurations at the same times, the actual motion

Q5. For $L=\tfrac12m(\dot r^2+r^2\dot\theta^2)-V(r)$ with $p_\theta=\beta$, the Routhian $R=L-\beta\dot\theta$ is