Hamilton's Canonical Equations
CSIR NET classical mechanics: Legendre transform, Hamiltonian, canonical equations, conservation of H, Poisson brackets, canonical transformations, phase space.
- 21 min
On this page · 14 sections
- Prerequisites
- The Hook: Halving the Order, Doubling the Variables
- From \( L \) to \( H \): the Legendre Transform
- Standard Hamiltonians
- Cyclic Coordinates and Phase Space
- Poisson Brackets
- Canonical Transformations
- Memory Tricks
- Don’t Confuse
- Common Mistakes
- Practice
- Quick Revision Table
- Key Takeaways
- What’s Next
Prerequisites
- Generalized Coordinates and Lagrange’s Equations: generalized momenta \( p_j = \partial L/\partial\dot q_j \), cyclic coordinates and the energy function \( h \).
- Hamilton’s Principle and the Principle of Least Action: the phase-space form \( \delta\int(p\dot q - H)\,dt = 0 \).
- Eigenvalues and the Cayley–Hamilton Theorem: inverting the mass matrix and reading a Jacobian determinant.
The Hook: Halving the Order, Doubling the Variables
From \( L \) to \( H \): the Legendre Transform
Given \( L(q, \dot q, t) \) with \( n \) degrees of freedom:
- Define the momenta \( p_j = \dfrac{\partial L}{\partial \dot q_j} \).
- Solve these \( n \) equations for the velocities \( \dot q_j = \dot q_j(q, p, t) \). This is possible when the Hessian \( \det\left(\dfrac{\partial^2 L}{\partial \dot q_j\,\partial \dot q_k}\right) \ne 0 \).
- Form
with every \( \dot q_j \) expressed through \( (q, p, t) \).
\( H \) is the energy function \( h \) of the previous page, written in the variables \( (q, p) \). The answer must contain no \( \dot q \).
Deriving Hamilton’s equations
Take the differential of \( H = \sum p_j\dot q_j - L \). The \( d\dot q_j \) terms cancel because \( p_j = \partial L/\partial\dot q_j \):
$$dH = \sum_j\left(\dot q_j\,dp_j - \frac{\partial L}{\partial q_j}\,dq_j\right) - \frac{\partial L}{\partial t}\,dt.$$Compare with \( dH = \sum_j\left(\frac{\partial H}{\partial q_j}dq_j + \frac{\partial H}{\partial p_j}dp_j\right) + \frac{\partial H}{\partial t}dt \), and use Lagrange’s equation \( \frac{\partial L}{\partial q_j} = \dot p_j \):
When is \( H \) conserved, and when is it the energy?
Along a motion, Hamilton’s equations give
$$\frac{dH}{dt} = \sum_j\left(\frac{\partial H}{\partial q_j}\dot q_j + \frac{\partial H}{\partial p_j}\dot p_j\right) + \frac{\partial H}{\partial t} = \frac{\partial H}{\partial t}.$$| Question | Answer |
|---|---|
| Is \( H \) conserved? | iff \( H \) has no explicit \( t \) (equivalently \( L \) has none) |
| Is \( H = T + V \)? | if the transformation to \( q \) is time-independent (so \( T = T_2 \)) and \( V \) is velocity-independent |
| Conserved but not the energy | bead on a wire rotating at constant \( \omega \) |
| The energy but not conserved | particle in a potential \( V(q, t) \) that changes with time |
Quadratic kinetic energy
If \( L = \frac{1}{2}\dot q^{\mathsf T}M(q)\dot q - V(q) \) with \( M \) symmetric positive definite, then \( p = M\dot q \) and
$$\boxed{H = \tfrac{1}{2}\,p^{\mathsf T}M(q)^{-1}p + V(q).}$$Inverting \( M \) is the whole job; a common error is to write \( \frac{1}{2}p^{\mathsf T}Mp \).
Standard Hamiltonians
| System | Hamiltonian |
|---|---|
| particle in 1D | \( \frac{p^2}{2m} + V(x) \) |
| harmonic oscillator | \( \frac{p^2}{2m} + \frac{1}{2}m\omega^2x^2 \) |
| simple pendulum | \( \frac{p_\theta^2}{2m\ell^2} - mg\ell\cos\theta \) |
| plane polar, central \( V(r) \) | \( \frac{p_r^2}{2m} + \frac{p_\theta^2}{2mr^2} + V(r) \) |
| spherical polar | \( \frac{1}{2m}\left(p_r^2 + \frac{p_\theta^2}{r^2} + \frac{p_\varphi^2}{r^2\sin^2\theta}\right) + V \) |
| charge \( e \) in potentials \( \phi, \mathbf{A} \) | \( \frac{(\mathbf{p} - e\mathbf{A})^2}{2m} + e\phi \), with \( \mathbf{p} = m\mathbf{v} + e\mathbf{A} \) |
| bead on wire rotating at \( \omega \) (horizontal plane) | \( \frac{p^2}{2m} - \frac{1}{2}m\omega^2r^2 \) |
| bead on hoop rotating about vertical diameter | \( \frac{p_\theta^2}{2ma^2} - \frac{1}{2}ma^2\omega^2\sin^2\theta - mga\cos\theta \) |
Cyclic Coordinates and Phase Space
- If \( q_k \) is absent from \( H \), then \( \dot p_k = 0 \): \( p_k = \alpha \) is constant, and \( H \) becomes a function of the remaining \( 2n - 2 \) variables with \( \alpha \) as a parameter. In the Hamiltonian picture a cyclic coordinate removes two variables at once. (Routh’s procedure mixes the two pictures: a Hamiltonian in the cyclic variables, a Lagrangian in the rest.)
- Phase space is the \( 2n \)-dimensional space of \( (q, p) \). Through each point passes exactly one trajectory (uniqueness for first-order ODEs with smooth right-hand sides), so phase trajectories do not cross.
- For one degree of freedom with time-independent \( H \), trajectories are level curves \( H(q, p) = E \).
| Phase portrait | Shape |
|---|---|
| oscillator \( \frac{p^2}{2m} + \frac{1}{2}m\omega^2x^2 = E \) | ellipses with semi-axes \( \sqrt{2E/(m\omega^2)} \) and \( \sqrt{2mE} \); area \( \frac{2\pi E}{\omega} \) |
| free particle | horizontal lines \( p = \) constant |
| pendulum, \( E < mg\ell \) | closed curves around \( (0, 0) \): libration |
| pendulum, \( E = mg\ell \) | separatrix through the unstable points \( (\pm\pi, 0) \) |
| pendulum, \( E > mg\ell \) | open curves, \( p \) never zero: rotation |
| \( H = \frac{p^2}{2} - \frac{x^2}{2} \) | hyperbolas; the origin is a saddle |
Liouville’s theorem. The Hamiltonian vector field \( (\partial H/\partial p, -\partial H/\partial q) \) has zero divergence, \( \sum_j\left(\frac{\partial^2 H}{\partial q_j\partial p_j} - \frac{\partial^2 H}{\partial p_j\partial q_j}\right) = 0 \). Hence the flow preserves phase-space volume: a blob of initial conditions changes shape but not volume. In particular a Hamiltonian system has no asymptotically stable equilibrium (no attractors); damping cannot be produced by a time-independent Hamiltonian.
Poisson Brackets
For functions \( f(q, p, t) \), \( g(q, p, t) \):
$$\boxed{[f, g] = \sum_{j=1}^n\left(\frac{\partial f}{\partial q_j}\frac{\partial g}{\partial p_j} - \frac{\partial f}{\partial p_j}\frac{\partial g}{\partial q_j}\right).}$$(This is the convention of Goldstein. Some texts define the bracket with the opposite sign; check the definition given in the question.)
| Property | Statement |
|---|---|
| Fundamental brackets | \( [q_j, q_k] = 0 \), \( [p_j, p_k] = 0 \), \( [q_j, p_k] = \delta_{jk} \) |
| Antisymmetry | \( [f, g] = -[g, f] \); so \( [f, f] = 0 \) |
| Bilinearity | linear in each slot |
| Leibniz | \( [fg, h] = f[g, h] + [f, h]g \) |
| Jacobi identity | \( [f, [g, h]] + [g, [h, f]] + [h, [f, g]] = 0 \) |
| Shortcuts | \( [q_j, g] = \frac{\partial g}{\partial p_j} \), \( [p_j, g] = -\frac{\partial g}{\partial q_j} \) |
| Poisson’s theorem | if \( f \) and \( g \) are constants of the motion, so is \( [f, g] \) (from the Jacobi identity) |
Angular momentum \( \mathbf{L} = \mathbf{r}\times\mathbf{p} \):
$$[L_x, L_y] = L_z \ (\text{and cyclic}), \qquad [L_i, L^2] = 0, \qquad [x, L_z] = -y, \quad [y, L_z] = x, \qquad [p_x, L_z] = -p_y.$$By Poisson’s theorem, if \( L_x \) and \( L_y \) are conserved, so is \( L_z \).
Canonical Transformations
A change of phase-space variables \( Q_j = Q_j(q, p, t) \), \( P_j = P_j(q, p, t) \) is canonical if it carries every Hamiltonian system into a Hamiltonian system: there is a \( K(Q, P, t) \) with \( \dot Q_j = \partial K/\partial P_j \), \( \dot P_j = -\partial K/\partial Q_j \).
Tests (time-independent transformations).
- Bracket test: \( [Q_j, Q_k]_{q,p} = 0 \), \( [P_j, P_k]_{q,p} = 0 \), \( [Q_j, P_k]_{q,p} = \delta_{jk} \). Then \( K = H \) expressed in the new variables.
- One degree of freedom: canonical iff the Jacobian \( \dfrac{\partial(Q, P)}{\partial(q, p)} = [Q, P] = 1 \), i.e. the map preserves oriented area.
- Symplectic condition: \( J^{\mathsf T}\Omega J = \Omega \) for the Jacobian matrix \( J \), with \( \Omega = \begin{pmatrix}0 & I\\ -I & 0\end{pmatrix} \).
Generating functions. A canonical transformation can be generated by a function of one old and one new set of variables:
| Generator | Relations | Example |
|---|---|---|
| \( F_1(q, Q, t) \) | \( p = \frac{\partial F_1}{\partial q} \), \( P = -\frac{\partial F_1}{\partial Q} \) | \( F_1 = qQ \): \( Q = p \), \( P = -q \) (exchange) |
| \( F_2(q, P, t) \) | \( p = \frac{\partial F_2}{\partial q} \), \( Q = \frac{\partial F_2}{\partial P} \) | \( F_2 = qP \): identity |
| \( F_3(p, Q, t) \) | \( q = -\frac{\partial F_3}{\partial p} \), \( P = -\frac{\partial F_3}{\partial Q} \) | |
| \( F_4(p, P, t) \) | \( q = -\frac{\partial F_4}{\partial p} \), \( Q = \frac{\partial F_4}{\partial P} \) |
In each case \( K = H + \dfrac{\partial F}{\partial t} \). \( F_2 = \sum f_j(q)P_j \) gives a point transformation \( Q_j = f_j(q) \); every change of configuration coordinates extends to a canonical transformation.
| Transformation | \( [Q, P] \) | Canonical? |
|---|---|---|
| \( Q = p \), \( P = -q \) | 1 | yes: “coordinates” and “momenta” are interchangeable |
| \( Q = q^2 \), \( P = \frac{p}{2q} \) | 1 | yes (point transformation) |
| \( Q = q \), \( P = p + f(q) \) | 1 | yes (gauge shift of momentum) |
| \( Q = \lambda q \), \( P = \lambda p \) | \( \lambda^2 \) | only if \( \lambda = \pm 1 \) |
| \( Q = \ln\left(\frac{\sin p}{q}\right) \), \( P = q\cot p \) | \( \frac{1}{\sin^2 p} - \cot^2 p = 1 \) | yes |
| \( Q = q^\alpha\cos\beta p \), \( P = q^\alpha\sin\beta p \) | \( \alpha\beta q^{2\alpha - 1} \) | iff \( \alpha = \frac{1}{2} \), \( \beta = 2 \) |
Memory Tricks
Don’t Confuse
| This | vs | That |
|---|---|---|
| \( H \) conserved \( \iff \partial H/\partial t = 0 \) | \( H = T + V \iff \) time-independent constraints and ordinary potential | |
| canonical momentum \( p = \partial L/\partial\dot q \) | kinetic momentum \( m\dot q \) (\( \mathbf{p} - e\mathbf{A} \) in a magnetic field) | |
| Lagrangian: \( n \) second-order ODEs | Hamiltonian: \( 2n \) first-order ODEs | |
| cyclic \( q \) in \( L \): one variable removed | cyclic \( q \) in \( H \): \( q \) and \( p \) both removed | |
| \( [f, H] = 0 \): \( f \) conserved (if no explicit \( t \)) | \( [f, g] = 0 \): \( f \) and \( g \) “in involution” | |
| canonical: \( [Q, P] = 1 \) | \( [Q, P] = c \ne 1 \): canonical only up to a scale (rescale \( H \) by \( c \)) | |
| Liouville: phase volume preserved | energy conserved (needs \( \partial H/\partial t = 0 \)); volume is preserved even when \( H \) depends on \( t \) |
Common Mistakes
Practice
All questions below are original practice questions written for this page. They are not from any CSIR NET paper. In Level 3, as in Part C of the Mathematical Sciences paper, one or more options may be correct.
Level 1: Foundation
- Write the Hamiltonian for \( L = \frac{1}{2}m\dot x^2 - V(x) \).
- Compute \( [q^2, p] \).
- Is \( H = \frac{p^2}{2m} + \frac{1}{2}k(t)q^2 \) conserved?
Answers
- \( H = \frac{p^2}{2m} + V(x) \). \( p = m\dot x \), \( H = p\dot x - L \).
- \( 2q \). \( [f, p] = \partial f/\partial q \).
- No (unless \( k \) is constant). \( \frac{dH}{dt} = \frac{\partial H}{\partial t} = \frac{1}{2}k'(t)q^2 \). It is still the energy.
Level 2: Part B Style
Practice Q1. The Hamiltonian corresponding to \( L = \frac{1}{2}(\dot q_1^2 + \dot q_2^2) + q_1\dot q_2 \) is:
(a) \( \frac{1}{2}(p_1^2 + p_2^2) \) (b) \( \frac{1}{2}p_1^2 + \frac{1}{2}(p_2 - q_1)^2 \) (c) \( \frac{1}{2}p_1^2 + \frac{1}{2}(p_2 + q_1)^2 \) (d) \( \frac{1}{2}(p_1^2 + p_2^2) - q_1p_2 \)
Answer: (b)
\( p_2 = \dot q_2 + q_1 \), so \( \dot q_2 = p_2 - q_1 \). Then \( H = p_1\dot q_1 + p_2\dot q_2 - L = \frac{1}{2}p_1^2 + \frac{1}{2}(p_2 - q_1)^2 \). Option (d) misses the \( \frac{1}{2}q_1^2 \) term.
Practice Q2. With \( L_z = xp_y - yp_x \), the Poisson bracket \( [L_z, x] \) equals:
(a) \( -y \) (b) \( y \) (c) \( x \) (d) \( p_y \)
Answer: (b)
\( [x, L_z] = \frac{\partial L_z}{\partial p_x} = -y \), so \( [L_z, x] = y \) by antisymmetry. Option (a) is the answer to \( [x, L_z] \).
Practice Q3. Which of the following transformations of one degree of freedom is not canonical?
(a) \( Q = p \), \( P = -q \) (b) \( Q = q^2 \), \( P = \frac{p}{2q} \) (c) \( Q = q \), \( P = p + q^3 \) (d) \( Q = q^2 \), \( P = \frac{p}{q} \)
Answer: (d)
\( [Q, P] = \frac{\partial Q}{\partial q}\frac{\partial P}{\partial p} - \frac{\partial Q}{\partial p}\frac{\partial P}{\partial q} \). (a): \( 0 - (1)(-1) = 1 \). (b): \( 2q\cdot\frac{1}{2q} = 1 \). (c): \( 1\cdot 1 - 0 = 1 \). (d): \( 2q\cdot\frac{1}{q} = 2 \ne 1 \).
Practice Q4. For a particle of mass \( m \) in a plane under a central potential \( V(r) \), the Hamiltonian in polar coordinates is:
(a) \( \frac{p_r^2}{2m} + \frac{p_\theta^2}{2m} + V(r) \) (b) \( \frac{p_r^2}{2m} + \frac{p_\theta^2}{2mr^2} + V(r) \) (c) \( \frac{p_r^2}{2m} + \frac{r^2p_\theta^2}{2m} + V(r) \) (d) \( \frac{p_r^2}{2m} + \frac{p_\theta^2}{mr^2} + V(r) \)
Answer: (b)
\( M = \operatorname{diag}(m, mr^2) \), so \( M^{-1} = \operatorname{diag}\left(\frac{1}{m}, \frac{1}{mr^2}\right) \) and \( H = \frac{p_r^2}{2m} + \frac{p_\theta^2}{2mr^2} + V(r) \). \( \theta \) is cyclic, so \( p_\theta \) is constant and \( \frac{p_\theta^2}{2mr^2} \) acts as the centrifugal barrier.
Level 3: Part C Style
Practice Q5. Let \( Q = q^\alpha\cos(\beta p) \), \( P = q^\alpha\sin(\beta p) \) on \( q > 0 \), with real constants \( \alpha, \beta \). Which statements are true?
(a) \( [Q, P]_{q,p} = \alpha\beta q^{2\alpha - 1} \). (b) The transformation is canonical when \( \alpha = \frac{1}{2} \), \( \beta = 2 \). (c) The transformation is canonical when \( \alpha = 1 \), \( \beta = 1 \). (d) When \( \alpha = \frac{1}{2} \), \( \beta = 2 \), \( Q^2 + P^2 = q \).
Answer: (a), (b) and (d)
- (a) True. \( \frac{\partial Q}{\partial q}\frac{\partial P}{\partial p} - \frac{\partial Q}{\partial p}\frac{\partial P}{\partial q} = \alpha q^{\alpha - 1}\cos\beta p\cdot\beta q^\alpha\cos\beta p + \beta q^\alpha\sin\beta p\cdot\alpha q^{\alpha - 1}\sin\beta p = \alpha\beta q^{2\alpha - 1} \).
- (b) True. \( \alpha\beta = 1 \) and \( 2\alpha - 1 = 0 \) give \( [Q, P] = 1 \) identically.
- (c) False. \( [Q, P] = q \), not identically 1.
- (d) True. \( Q^2 + P^2 = q^{2\alpha} = q \).
Practice Q6. For \( H = \frac{1}{2}(p_1^2 + p_2^2) + \frac{1}{2}(q_1 - q_2)^2 \), which statements are true?
(a) \( p_1 + p_2 \) is a constant of the motion. (b) \( p_1 - p_2 \) is a constant of the motion. (c) \( q_1 - q_2 \) oscillates harmonically with angular frequency \( \sqrt 2 \). (d) \( [p_1 + p_2, H] = 0 \).
Answer: (a), (c) and (d)
\( \dot q_j = p_j \), \( \dot p_1 = -(q_1 - q_2) \), \( \dot p_2 = +(q_1 - q_2) \).
- (a) True and (d) True. \( \frac{d}{dt}(p_1 + p_2) = 0 \); equivalently \( [p_1 + p_2, H] = -\frac{\partial H}{\partial q_1} - \frac{\partial H}{\partial q_2} = -(q_1 - q_2) + (q_1 - q_2) = 0 \). (Translation invariance.)
- (b) False. \( \frac{d}{dt}(p_1 - p_2) = -2(q_1 - q_2) \), non-zero in general.
- (c) True. \( u = q_1 - q_2 \) satisfies \( \ddot u = \dot p_1 - \dot p_2 = -2u \).
Practice Q7. A bead of mass \( m \) slides on a smooth straight wire that rotates in a horizontal plane about a fixed vertical axis through one end, at constant angular speed \( \omega \). With \( r \) the distance along the wire, \( L = \frac{1}{2}m(\dot r^2 + \omega^2r^2) \). Which statements are true?
(a) \( H = \frac{p^2}{2m} - \frac{1}{2}m\omega^2r^2 \). (b) \( H \) is a constant of the motion. (c) \( H \) equals the kinetic energy of the bead. (d) Hamilton’s equations give \( \ddot r = \omega^2r \).
Answer: (a), (b) and (d)
- (a) True. \( p = m\dot r \), \( H = p\dot r - L = \frac{p^2}{2m} - \frac{1}{2}m\omega^2r^2 \).
- (b) True. No explicit \( t \).
- (c) False. The kinetic energy is \( \frac{1}{2}m(\dot r^2 + \omega^2r^2) \), which grows as the bead moves out. \( H = T_2 - T_0 \).
- (d) True. \( \dot r = p/m \), \( \dot p = m\omega^2r \).
Quick Revision Table
| Idea | Fact |
|---|---|
| Legendre | \( p = \partial L/\partial\dot q \); \( H = \sum p\dot q - L \) in \( (q, p, t) \); needs non-singular Hessian |
| Canonical equations | \( \dot q = \partial H/\partial p \), \( \dot p = -\partial H/\partial q \), \( \partial H/\partial t = -\partial L/\partial t \) |
| Quadratic \( T \) | \( H = \frac{1}{2}p^{\mathsf T}M^{-1}p + V \) |
| \( dH/dt \) | \( = \partial H/\partial t \) |
| Polar | \( \frac{p_r^2}{2m} + \frac{p_\theta^2}{2mr^2} + V \) |
| Magnetic | \( \frac{(\mathbf{p} - e\mathbf{A})^2}{2m} + e\phi \) |
| Bracket | \( [f, g] = \sum(f_qg_p - f_pg_q) \); \( [q, p] = 1 \); \( \dot f = [f, H] + \partial_tf \) |
| Angular momentum | \( [L_x, L_y] = L_z \); \( [x, L_z] = -y \) |
| Poisson’s theorem | constants \( f, g \Rightarrow [f, g] \) constant |
| Canonical (1 DOF) | \( [Q, P] = 1 \) (area-preserving) |
| Generating functions | \( F_1 \): \( p = \partial_qF_1 \), \( P = -\partial_QF_1 \); \( F_2 \): \( p = \partial_qF_2 \), \( Q = \partial_PF_2 \); \( K = H + \partial_tF \) |
| \( Q^\alpha \) test | \( Q = q^\alpha\cos\beta p \), \( P = q^\alpha\sin\beta p \): canonical iff \( \alpha = \frac{1}{2} \), \( \beta = 2 \) |
| Oscillator action-angle | \( K = \omega P \), ellipse area \( 2\pi E/\omega \) |
| Liouville | phase volume preserved; no attractors |
Key Takeaways
What’s Next
- Rigid-Body Motion and Euler’s Equations: Lagrangians and conserved momenta for extended bodies.
- Small Oscillations: quadratic Hamiltonians and normal modes.
- Quadratic Forms: the linear algebra behind \( \frac{1}{2}p^{\mathsf T}M^{-1}p \).
- Classical Mechanics chapter overview.