Lagrangian and Hamiltonian Mechanics, Conservation Laws
CSIR NET classical mechanics: Hamilton's principle, Euler–Lagrange equations, cyclic coordinates, Noether, Hamilton's equations and Poisson brackets.
- 19 min
On this page · 14 sections
- Prerequisites
- The Hook: A Bead That Gains Energy
- Constraints and Generalised Coordinates
- Hamilton’s Principle and the Euler–Lagrange Equations
- Conservation Laws and Cyclic Coordinates
- The Hamiltonian Formalism
- Poisson Brackets
- Memory Tricks
- Don’t Confuse
- Common Mistakes
- Practice
- Quick Revision Table
- Key Takeaways
- What’s Next
Prerequisites
- Functionals and the Euler–Lagrange Equation: the mathematics behind Hamilton’s principle, done rigorously.
- Newton’s Laws, Phase Space and Stability: phase space and Liouville’s theorem, which Hamilton’s equations make precise.
- Rigid Bodies and Non-Inertial Frames: the bead on a hoop, redone here without pseudoforces.
The Hook: A Bead That Gains Energy
Constraints and Generalised Coordinates
A system of \( N \) particles in 3D has \( 3N \) coordinates. A holonomic constraint is an equation \( f(\mathbf{r}_1, \ldots, \mathbf{r}_N, t) = 0 \) among them; each one removes a degree of freedom, so with \( k \) holonomic constraints there are
$$n = 3N - k$$independent generalised coordinates \( q_1, \ldots, q_n \).
| Constraint type | Meaning | Example |
|---|---|---|
| Holonomic | expressible as \( f(q, t) = 0 \) | pendulum: \( x^2 + y^2 = l^2 \) |
| Non-holonomic | only as an inequality or non-integrable velocity relation | particle outside a sphere (\( r \geq a \)); a disc rolling on a plane |
| Scleronomic | no explicit time dependence | fixed hoop |
| Rheonomic | explicit time dependence | bead on a rotating wire |
A rigid body has 6 degrees of freedom; a double pendulum in a plane has 2; a particle on the surface of a sphere has 2. Constraint forces that do no work in virtual displacements (smooth surfaces, rigid rods) drop out of the Lagrangian formulation entirely: this is d’Alembert’s principle, and it is the main practical advantage over Newton.
Hamilton’s Principle and the Euler–Lagrange Equations
Define the Lagrangian \( L(q, \dot q, t) = T - V \) and the action
$$S[q] = \int_{t_1}^{t_2}L(q, \dot q, t)\,dt$$Hamilton’s principle: the actual path makes \( S \) stationary, \( \delta S = 0 \), among all paths with the same end points \( q(t_1) \), \( q(t_2) \). The standard variational argument gives, for each \( i \),
$$\boxed{\frac{d}{dt}\frac{\partial L}{\partial\dot q_i} - \frac{\partial L}{\partial q_i} = 0}$$Stationary, not necessarily minimum: for long enough time intervals the true path can be a saddle point of the action.
The same variational machinery solves geometric problems: the shortest path on a plane is a straight line, the curve of fastest descent under gravity (the brachistochrone) is a cycloid, and Fermat’s principle of least time for light gives Snell’s law.
Freedom in choosing L
- \( L \to cL \) (constant \( c \neq 0 \)) gives the same equations.
- \( L \to L + \frac{d}{dt}F(q, t) \) gives the same equations, because the added action depends only on the end points. A term like \( q\dot q = \frac{d}{dt}(q^2/2) \) is therefore dynamically empty.
- \( L = T - V \) is not the only choice that works, but it is the standard one for conservative forces.
Standard Lagrangians
| System | Coordinates | \( L \) |
|---|---|---|
| Simple pendulum | \( \theta \) | \( \tfrac{1}{2}ml^2\dot\theta^2 + mgl\cos\theta \) |
| Particle in a plane, central \( V \) | \( r, \theta \) | \( \tfrac{1}{2}m(\dot r^2 + r^2\dot\theta^2) - V(r) \) |
| Spherical pendulum | \( \theta, \phi \) | \( \tfrac{1}{2}ml^2(\dot\theta^2 + \sin^2\theta\,\dot\phi^2) + mgl\cos\theta \) |
| Particle on a cylinder of radius \( R \) | \( \phi, z \) | \( \tfrac{1}{2}m(R^2\dot\phi^2 + \dot z^2) - V \) |
| Charged particle in fields | \( \mathbf{r} \) | \( \tfrac{1}{2}mv^2 - q\phi + q\mathbf{v}\cdot\mathbf{A} \) |
| Relativistic free particle | \( \mathbf{r} \) | \( -mc^2\sqrt{1 - v^2/c^2} \) |
The charged-particle Lagrangian uses a velocity-dependent potential; its Euler–Lagrange equation is exactly the Lorentz force law \( m\dot{\mathbf{v}} = q(\mathbf{E} + \mathbf{v}\times\mathbf{B}) \).
Conservation Laws and Cyclic Coordinates
The generalised (canonical) momentum conjugate to \( q_i \) is
$$p_i = \frac{\partial L}{\partial\dot q_i}$$If \( L \) does not contain \( q_i \) (only \( \dot q_i \)), then \( q_i \) is cyclic (ignorable) and the Euler–Lagrange equation gives \( \dot p_i = 0 \):
$$\boxed{q_i\ \text{cyclic} \implies p_i = \frac{\partial L}{\partial\dot q_i}\ \text{conserved}}$$- In polar coordinates with a central potential, \( \theta \) is cyclic: \( p_\theta = mr^2\dot\theta \), the angular momentum.
- For the spherical pendulum, \( \phi \) is cyclic: \( p_\phi = ml^2\sin^2\theta\,\dot\phi \), the vertical component of angular momentum.
- For a charged particle, \( p_i = m\dot x_i + qA_i \): the canonical momentum is not the mechanical momentum. Which component is conserved depends on the gauge chosen for \( \mathbf{A} \).
The energy function (Jacobi integral)
Define
$$h = \sum_i\dot q_i\frac{\partial L}{\partial\dot q_i} - L, \qquad \frac{dh}{dt} = -\frac{\partial L}{\partial t}$$So \( h \) is conserved whenever \( L \) has no explicit time dependence. It equals the total energy \( T + V \) only if, in addition, \( T \) is a homogeneous quadratic function of the \( \dot q_i \) (which is true when the constraints and the coordinate transformation are time-independent) and \( V \) does not depend on velocities.
| Situation | \( h \) conserved? | \( h = T + V \)? |
|---|---|---|
| Pendulum, fixed hoop | yes | yes |
| Bead on a wire rotating at constant \( \omega \) | yes | no |
| Pendulum with a support driven up and down | no | no |
| Charged particle in static \( \mathbf{E} \), \( \mathbf{B} \) | yes | yes (magnetic term drops out of \( h \)) |
Noether’s theorem (the core statement)
Every continuous symmetry of the Lagrangian gives a conserved quantity:
| Symmetry | Conserved quantity |
|---|---|
| Translation in time (\( \partial L/\partial t = 0 \)) | energy function \( h \) |
| Translation in space along \( \hat{\mathbf{n}} \) | \( \hat{\mathbf{n}}\cdot\mathbf{P} \), linear momentum along \( \hat{\mathbf{n}} \) |
| Rotation about \( \hat{\mathbf{n}} \) | \( \hat{\mathbf{n}}\cdot\mathbf{L} \), angular momentum about \( \hat{\mathbf{n}} \) |
A symmetry need not be visible as a cyclic coordinate in the coordinates you happened to choose. \( L = \tfrac{1}{2}m(\dot x^2 + \dot y^2) - V(x - y) \) has no cyclic coordinate, but it is unchanged by \( x \to x + a \), \( y \to y + a \), so \( p_x + p_y \) is conserved. Rewriting in \( X = (x + y)/2 \), \( u = x - y \) makes \( X \) cyclic.
The Hamiltonian Formalism
Trade velocities for momenta by a Legendre transformation:
$$\boxed{H(q, p, t) = \sum_ip_i\dot q_i - L}$$with every \( \dot q_i \) expressed in terms of \( (q, p) \). Then \( 2n \) first-order Hamilton’s equations replace \( n \) second-order Lagrange equations:
$$\boxed{\dot q_i = \frac{\partial H}{\partial p_i}, \qquad \dot p_i = -\frac{\partial H}{\partial q_i}}, \qquad \frac{\partial H}{\partial t} = -\frac{\partial L}{\partial t}, \qquad \frac{dH}{dt} = \frac{\partial H}{\partial t}$$Numerically \( H = h \), so the conditions under which \( H \) is conserved and under which \( H = T + V \) are those in the table above. A coordinate cyclic in \( L \) is cyclic in \( H \), and its momentum is a constant you can substitute straight in, reducing the problem by one degree of freedom.
Recipe
- Write \( L(q, \dot q, t) \).
- Compute each \( p_i = \partial L/\partial\dot q_i \) and invert to get \( \dot q_i(q, p, t) \).
- Form \( H = \sum p_i\dot q_i - L \) and substitute; \( H \) must contain no \( \dot q \).
- If \( T = \tfrac{1}{2}\sum M_{ij}(q)\dot q_i\dot q_j \) and \( V = V(q) \), skip steps 2–3: \( H = \tfrac{1}{2}\mathbf{p}^TM^{-1}\mathbf{p} + V \).
| System | \( H \) |
|---|---|
| Particle in a plane, central \( V \) | \( \dfrac{p_r^2}{2m} + \dfrac{p_\theta^2}{2mr^2} + V(r) \) |
| Spherical pendulum | \( \dfrac{p_\theta^2}{2ml^2} + \dfrac{p_\phi^2}{2ml^2\sin^2\theta} - mgl\cos\theta \) |
| Charged particle | \( \dfrac{(\mathbf{p} - q\mathbf{A})^2}{2m} + q\phi \) |
| Relativistic free particle | \( \sqrt{p^2c^2 + m^2c^4} \) |
Poisson Brackets
For functions \( f(q, p, t) \), \( g(q, p, t) \),
$$\boxed{\{f, g\} = \sum_i\left(\frac{\partial f}{\partial q_i}\frac{\partial g}{\partial p_i} - \frac{\partial f}{\partial p_i}\frac{\partial g}{\partial q_i}\right)}$$Every time derivative is a bracket with \( H \):
$$\frac{df}{dt} = \{f, H\} + \frac{\partial f}{\partial t}$$so a quantity with no explicit \( t \) is conserved if and only if \( \{f, H\} = 0 \). Hamilton’s equations are \( \dot q_i = \{q_i, H\} \), \( \dot p_i = \{p_i, H\} \).
Properties: antisymmetric, linear, Leibniz rule \( \{fg, h\} = f\{g, h\} + \{f, h\}g \), and the Jacobi identity. The fundamental brackets and the angular-momentum algebra:
$$\{q_i, q_j\} = 0, \quad \{p_i, p_j\} = 0, \quad \{q_i, p_j\} = \delta_{ij}; \qquad \{L_i, L_j\} = \varepsilon_{ijk}L_k, \quad \{L^2, L_i\} = 0$$Also \( \{x_i, L_j\} = \varepsilon_{ijk}x_k \) and \( \{p_i, L_j\} = \varepsilon_{ijk}p_k \). Poisson’s theorem: if \( f \) and \( g \) are conserved, so is \( \{f, g\} \). Hence if \( L_x \) and \( L_y \) are conserved, \( L_z \) is too.
The quantum commutator follows the same algebra with \( \{\ ,\ \} \to [\ ,\ ]/i\hbar \), which is why \( [\hat x, \hat p] = i\hbar \) and \( [\hat L_x, \hat L_y] = i\hbar\hat L_z \) in Operators, Commutators, Dirac Notation and Uncertainty. Canonical transformations, the full Noether theorem and Hamilton–Jacobi theory belong to the advanced classical mechanics unit of the syllabus.
Memory Tricks
Don’t Confuse
| This | vs | That |
|---|---|---|
| Canonical momentum \( \partial L/\partial\dot q \) | Mechanical momentum \( m\dot q \) (differ in a magnetic field, or for angles) | |
| \( h \) (or \( H \)) conserved: \( \partial L/\partial t = 0 \) | \( H = T + V \): also needs time-independent constraints | |
| Stationary action (\( \delta S = 0 \)) | Minimum action (not always) | |
| Cyclic coordinate in one set of coordinates | Symmetry (may need new coordinates to show it as cyclic) | |
| Poisson bracket \( \{q, p\} = 1 \) | Commutator \( [\hat x, \hat p] = i\hbar \) | |
| Holonomic: \( f(q, t) = 0 \) | Non-holonomic: inequalities, rolling on a plane |
Common Mistakes
Practice
All questions below are original practice questions written for this page. They are not from any CSIR NET paper.
Level 1: Foundation
- How many degrees of freedom does a double pendulum moving in a vertical plane have?
- For \( L = \tfrac{1}{2}m(\dot r^2 + r^2\dot\theta^2) - V(r) \), what is conserved because \( \theta \) is cyclic?
- Evaluate \( \{x, p_x^2\} \).
Answers
- 2 (two angles).
- \( p_\theta = mr^2\dot\theta \), the angular momentum.
- \( 2p_x \). \( \{x, p_x^2\} = \frac{\partial x}{\partial x}\frac{\partial p_x^2}{\partial p_x} = 2p_x \).
Level 2: Part B Style
Practice Q1. For \( L = \tfrac{1}{2}m(\dot x^2 + \dot y^2) - V(x - y) \), with \( V \) an arbitrary function, which quantity is necessarily conserved?
(a) \( p_x \) (b) \( p_y \) (c) \( p_x + p_y \) (d) \( p_x - p_y \)
Answer: (c)
\( \dot p_x = -V'(x - y) \) and \( \dot p_y = +V'(x - y) \), so \( \frac{d}{dt}(p_x + p_y) = 0 \). The Lagrangian is invariant under the simultaneous shift \( x \to x + a \), \( y \to y + a \). Neither coordinate alone is cyclic.
Practice Q2. The Hamiltonian corresponding to \( L = \tfrac{1}{2}m\dot q^2 + \lambda q\dot q - \tfrac{1}{2}kq^2 \) (\( \lambda \) constant) is:
(a) \( \dfrac{(p - \lambda q)^2}{2m} + \dfrac{1}{2}kq^2 \) (b) \( \dfrac{p^2}{2m} + \dfrac{1}{2}kq^2 \) (c) \( \dfrac{(p + \lambda q)^2}{2m} + \dfrac{1}{2}kq^2 \) (d) \( \dfrac{(p - \lambda q)^2}{2m} - \dfrac{1}{2}kq^2 \)
Answer: (a)
\( p = m\dot q + \lambda q \), so \( \dot q = (p - \lambda q)/m \). \( H = p\dot q - L = \frac{(p - \lambda q)^2}{2m} + \frac{1}{2}kq^2 \). The equation of motion is still \( m\ddot q + kq = 0 \): the term \( \lambda q\dot q = \frac{d}{dt}(\lambda q^2/2) \) is a total derivative. It changes \( p \) and the form of \( H \), not the motion. Option (b) would be right only if you used the mechanical momentum.
Practice Q3. With \( L_z = xp_y - yp_x \), the Poisson bracket \( \{x, L_z\} \) equals:
(a) \( y \) (b) \( -y \) (c) \( p_y \) (d) 0
Answer: (b) −y
Only the \( (x, p_x) \) pair contributes: \( \{x, L_z\} = \frac{\partial x}{\partial x}\frac{\partial L_z}{\partial p_x} = -y \). This matches \( \{x_i, L_j\} = \varepsilon_{ijk}x_k \) with \( i = x \), \( j = z \): \( \varepsilon_{xzy} = -1 \).
Practice Q4. The Lagrangian \( L = e^{\gamma t}\left(\tfrac{1}{2}m\dot q^2 - \tfrac{1}{2}kq^2\right) \) (\( \gamma > 0 \)) gives the equation of motion:
(a) \( m\ddot q + kq = 0 \) (b) \( m\ddot q + m\gamma\dot q + kq = 0 \) (c) \( m\ddot q - m\gamma\dot q + kq = 0 \) (d) \( m\ddot q + \gamma kq = 0 \)
Answer: (b)
\( \partial L/\partial\dot q = e^{\gamma t}m\dot q \); its time derivative is \( e^{\gamma t}(m\ddot q + m\gamma\dot q) \). \( \partial L/\partial q = -e^{\gamma t}kq \). Cancel \( e^{\gamma t} \): \( m\ddot q + m\gamma\dot q + kq = 0 \), the damped oscillator. Because \( L \) depends explicitly on \( t \), \( H \) is not conserved, as a damped system requires.
Level 3: Part C Style
Practice Q5. A particle of mass \( m \) and charge \( q > 0 \) moves in a uniform magnetic field \( \mathbf{B} = B\hat{\mathbf{z}} \), described with the vector potential \( \mathbf{A} = (0, Bx, 0) \). Consider:
- \( p_y = m\dot y + qBx \) is conserved.
- \( H = \dfrac{p_x^2 + (p_y - qBx)^2 + p_z^2}{2m} \).
- The \( x \) coordinate oscillates harmonically with angular frequency \( qB/m \) about \( x_0 = p_y/qB \).
- The mechanical momentum \( m\dot y \) is conserved.
Which are correct?
(a) 1 and 2 only (b) 1, 2 and 3 only (c) 2 and 4 only (d) 1, 2, 3 and 4
Answer: (b) 1, 2 and 3 only
\( L = \tfrac{1}{2}m(\dot x^2 + \dot y^2 + \dot z^2) + qBx\dot y \). \( y \) and \( z \) are cyclic: \( p_y = m\dot y + qBx \) and \( p_z = m\dot z \) are conserved. Statement 1 true.
\( H = (\mathbf{p} - q\mathbf{A})^2/2m \) with \( \mathbf{A} = (0, Bx, 0) \). Statement 2 true.
\( \dot p_x = -\partial H/\partial x = \frac{qB}{m}(p_y - qBx) \), and \( p_x = m\dot x \), so \( \ddot x = -\left(\frac{qB}{m}\right)^2\left(x - \frac{p_y}{qB}\right) \). Statement 3 true: this is cyclotron motion at \( \omega_c = qB/m \).
\( m\dot y = p_y - qBx \) changes as \( x \) oscillates. Statement 4 false.
Practice Q6. A bead slides on a frictionless straight wire that rotates in a horizontal plane at a constant 2 rad/s about a vertical axis through one end. The bead is released at rest relative to the wire, 0.1 m from the axis. Consider:
- \( \tfrac{1}{2}m(\dot r^2 - \omega^2r^2) \) is conserved.
- The total kinetic energy of the bead is conserved.
- After 1 s the bead is about 0.38 m from the axis.
- The force exerted by the wire on the bead does no work.
Which are correct?
(a) 1 and 3 only (b) 1, 2 and 3 only (c) 2 and 4 only (d) 1, 3 and 4 only
Answer: (a) 1 and 3 only
\( L = \tfrac{1}{2}m(\dot r^2 + \omega^2r^2) \) has no explicit \( t \), so \( h = \tfrac{1}{2}m(\dot r^2 - \omega^2r^2) \) is conserved. Statement 1 true.
\( \ddot r = \omega^2r \) gives \( r = 0.1\cosh2t \); \( r(1) = 0.1\cosh2 \approx 0.376 \) m. Statement 3 true.
The kinetic energy \( \tfrac{1}{2}m(\dot r^2 + \omega^2r^2) = h + m\omega^2r^2 \) grows with \( r \). Statement 2 false. The energy comes from the wire’s normal force, which has a component along the bead’s (spiralling) velocity, so it does work. Statement 4 false.
Practice Q7. For the 2D isotropic oscillator \( H = \tfrac{1}{2}(p_1^2 + p_2^2) + \tfrac{1}{2}(q_1^2 + q_2^2) \), consider:
- \( q_1p_2 - q_2p_1 \) is conserved.
- \( q_1q_2 + p_1p_2 \) is conserved.
- \( q_1p_1 + q_2p_2 \) is conserved.
- \( p_1^2 + q_1^2 \) is conserved.
Which are correct?
(a) 1 only (b) 1 and 4 only (c) 1, 2 and 4 only (d) 1, 2, 3 and 4
Answer: (c) 1, 2 and 4 only
Use \( \dot q_i = p_i \), \( \dot p_i = -q_i \). 1: \( \frac{d}{dt}(q_1p_2 - q_2p_1) = p_1p_2 - q_1q_2 - p_2p_1 + q_2q_1 = 0 \). True (angular momentum, from rotational symmetry). 2: \( \frac{d}{dt}(q_1q_2 + p_1p_2) = p_1q_2 + q_1p_2 - q_1p_2 - p_1q_2 = 0 \). True (a hidden symmetry of the isotropic oscillator). 3: \( \frac{d}{dt}(q_1p_1 + q_2p_2) = p_1^2 - q_1^2 + p_2^2 - q_2^2 \neq 0 \) in general. False. 4: The two oscillators are uncoupled, so each energy \( \tfrac{1}{2}(p_1^2 + q_1^2) \) is conserved separately. True.
Quick Revision Table
| Idea | Result |
|---|---|
| Degrees of freedom | \( 3N - k \) (holonomic constraints) |
| Hamilton’s principle | \( \delta\int L\,dt = 0 \), end points fixed |
| Euler–Lagrange | \( \frac{d}{dt}\partial L/\partial\dot q - \partial L/\partial q = 0 \) |
| Gauge freedom | \( L + dF(q, t)/dt \): same motion |
| Cyclic coordinate | \( p = \partial L/\partial\dot q \) conserved |
| Energy function | \( h = \sum p\dot q - L \); \( dh/dt = -\partial L/\partial t \) |
| Hamiltonian | \( H = \sum p\dot q - L \); \( \dot q = \partial H/\partial p \), \( \dot p = -\partial H/\partial q \) |
| Charged particle | \( L = \tfrac{1}{2}mv^2 - q\phi + q\mathbf{v}\cdot\mathbf{A} \); \( H = (\mathbf{p} - q\mathbf{A})^2/2m + q\phi \) |
| Poisson bracket | \( \{f, g\} = \sum(\partial_qf\partial_pg - \partial_pf\partial_qg) \) |
| Time evolution | \( df/dt = \{f, H\} + \partial f/\partial t \) |
| Fundamental | \( \{q_i, p_j\} = \delta_{ij} \); \( \{L_i, L_j\} = \varepsilon_{ijk}L_k \) |
| Noether | time → energy; translation → momentum; rotation → angular momentum |
Key Takeaways
What’s Next
- Small Oscillations and Normal Modes: expand \( L \) to second order about equilibrium.
- Special Relativity: the relativistic Lagrangian and Hamiltonian in the table above, and the energy–momentum relation.
- Variational Methods for Boundary Value Problems: the same variational ideas applied to differential equations.
- Classical Mechanics: Quick Revision.