Skip to content
ODE, PDE & Applied Mathematics

Classical Mechanics

See where the marks are across every paper →

1. Lagrangian formalism and generalised coordinates

Read this as a chapter →

Generalized Coordinates & Equations of Motion

Pretty Much Physics · Classical Mechanics

Degrees of freedom and generalised coordinates — count these first.

Derivation of Euler-Lagrange Equations

Pretty Much Physics · Classical Mechanics

Properties of the Lagrangian

Pretty Much Physics · Classical Mechanics

Cyclic coordinates and the conserved momenta they give.

Lagrangian mechanics free

In plain words

Write kinetic energy minus potential energy in coordinates that suit the constraints, and the equations follow mechanically. Constraint forces never appear, which is the entire reason for the method.

The recipe

  1. Choose generalised coordinates q1,…,qn(n=q_{1}, \dots, q_n (n = degrees of freedom = 3N − constraints).
  2. Write T (kinetic) and V (potential) in terms of q, q̇.
  3. L = T − V.
  4. Euler–Lagrange: d/dt(∂L/∂q(\partial{}L/\partial{}q̇i)=∂L/∂qi_{i}) = \partial{}L/\partial{}q_{i}.

Conservation laws (Noether)

Symmetry Conserved
L independent of qi(q_{i} (cyclic) pi=∂L/∂qp_{i} = \partial{}L/\partial{}q̇i_{i}
L independent of t energy h=∑qh = \sum q̇ipi−L_{i}p_{i} - L
translation invariance linear momentum
rotation invariance angular momentum

Standard systems

System L
Simple pendulum, length ℓ\ell ½mℓ2θm\ell^{2}\thetȧ2+^{2} + mgℓcos⁡θ\ell{}\cos \theta
Particle in a central field ½m(ṙ2+r2θ^{2} + r^{2}\thetȧ2)−V(r);θ^{2}) - V(r); \theta cyclic ⇒ angular momentum mr2θ^{2}\thetȧ conserved
Bead on a rotating wire (ω)(\omega) ½m(ṙ2+r2ω2)−V^{2} + r^{2}\omega^{2}) - V
Atwood machine ½(m1+m2)(m_{1}+m_{2})ẋ2−(m1−m2)^{2} - (m_{1}-m_{2})gx
Cycloid x=a(θ−sin⁡θ),y=a(1+cos⁡θ)x = a(\theta - \sin \theta), y = a(1 + \cos \theta) T = ma2(1−cos⁡θ)θ^{2}(1 - \cos \theta)\thetȧ2,V=^{2}, V = mga(1+cos⁡θ)(1 + \cos \theta)

For the cycloid: d/dt[2ma2(1−cos⁡θ)θ^{2}(1-\cos \theta)\thetȧ] = ma2sin⁡θθ^{2} \sin \theta \thetȧ2−^{2} - mga sin⁡θ\sin \theta gives 2a(1−cos⁡θ)θ2a(1 - \cos \theta)\thetä +asin⁡θθ+ a \sin \theta \thetȧ2−gsin⁡θ=0^{2} - g \sin \theta = 0 — note the mass cancels.

Constraints

  • Holonomic f(q, t) = 0: eliminate a coordinate, or use a multiplier λ(\lambda (which is the constraint force).
  • Non-holonomic constraints (e.g. rolling without slipping) need multipliers; they cannot be eliminated.

Key takeaways

  • Count degrees of freedom first; that is how many equations you will write.
  • Cyclic coordinate ⇒ conserved conjugate momentum, instantly.
  • Mass often cancels for constrained gravity problems — a useful sanity check.

Cyclic coordinates and the conservation laws they hand youinteractive

This visual is part of Trap Analysis

Central force in polar coordinates — angular momentum falls out of the Lagrangian in one line.

Unlock interactive visuals

Exam focus: Write T and V in the generalised coordinate, form L = T − V, and apply d/dt(∂L/∂q̇) = ∂L/∂q. Cyclic coordinates give conserved momenta immediately.

Practice

Part B2025 Juneshow ▾
Suppose a dynamical system has the Lagrangian L = (q̇1)2+(q_{1})^{2} + (q̇2)2+(q1)2+q_{2})^{2} + (q_{1})^{2} + q̇1q_{1}q̇2_{2}. If p1p_{1} and p2p_{2} are momenta conjugate to q1q_{1} and q2q_{2} respectively, then which of the following statements is true?
  1. A.ṗ1=2q1_{1} = 2q_{1}, ṗ2=0_{2} = 0✓ Correct
  2. B.ṗ1=−q1_{1} = -q_{1}, ṗ2=0_{2} = 0
  3. C.ṗ1=−q1/2,p2=q2_{1} = -q_{1}/2, p_{2} = q_{2}
  4. D.ṗ1=q1,p2=−q2_{1} = q_{1}, p_{2} = -q_{2}

The worked solution and the per-option analysis are in Trap Analysis.

Part B2024 Juneshow ▾
Consider a solid circular cylinder of radius 2 meters and height 3 meters of uniform density. If the density of the cylinder is ρ\rho kg/meter3^{3}, then the moment of inertia (in kg meter2)^{2}) of the cylinder about a diameter of its base is
  1. A.48πρ48\pi\rho✓ Correct
  2. B.43πρ43\pi\rho
  3. C.24πρ24\pi\rho
  4. D.4πρ4\pi\rho

The worked solution and the per-option analysis are in Trap Analysis.

Part C2024 Decembershow ▾
Consider the system of two particles with total kinetic energy T = (5/2)ẋ2+l2θ^{2} + l^{2}\thetȧ2+2l^{2} + 2lẋθ\thetȧcos⁡θ\cos \theta, and Lagrangian L = (5/2)ẋ2+l2θ^{2} + l^{2}\thetȧ2+2l^{2} + 2lẋθ\thetȧcos⁡θ+2\cos \theta + 2gl cos⁡θ\cos \theta, where x,θx, \theta are generalized coordinates, and g, l are positive constants. Then the non-zero frequency of the normal mode of the system with small oscillations (|θ\theta| ≪ 1) is
  1. A.(5/3)g/l(5/3)\sqrt{g/l}
  2. B.5g/(3l)\sqrt{5g/(3l)}✓ Correct
  3. C.(5/2)g/l(5/2)\sqrt{g/l}
  4. D.5g/(2l)\sqrt{5g/(2l)}

The worked solution and the per-option analysis are in Trap Analysis.

Part C2024 Juneshow ▾
Consider a solid torus of constant density ρ\rho, formed by revolving the disc (y−b)2+z2≤a2,x=0(y - b)^{2} + z^{2} \le a^{2}, x = 0 about the z-axis, where 0 < a < b. Then the moment of inertia of the solid torus about the z-axis is
  1. A.2π2a2b2(4b2+3a2)ρ2\pi^{2}a^{2}b^{2}(4b^{2} + 3a^{2})\rho
  2. B.(π2/2)a2b(4b2+3a2)ρ(\pi^{2}/2)a^{2}b(4b^{2} + 3a^{2})\rho✓ Correct
  3. C.(π2/2)a2b(4a2+3b2)ρ(\pi^{2}/2)a^{2}b(4a^{2} + 3b^{2})\rho
  4. D.2π2a2b2(4a2+3b2)ρ2\pi^{2}a^{2}b^{2}(4a^{2} + 3b^{2})\rho

The worked solution and the per-option analysis are in Trap Analysis.

Part C2024 Decembershow ▾
Consider a particle of mass m which is moving on a surface due to gravity. Suppose the Lagrangian of the particle in the cylindrical coordinates is given by L=(m/2)[(1+4α2r2)L = (m/2)[(1 + 4\alpha^{2}r^{2})ṙ2+r2θ^{2} + r^{2}\thetȧ2]−mα^{2}] - m\alphagr2^{2}, where α\alpha is a positive constant, and g is the acceleration due to gravity. If the particle is in circular motion, then
  1. A.|θ\thetȧ| =2/(gα)= \sqrt{2/(g\alpha)}
  2. B.|θ\thetȧ| =1/(gα)= \sqrt{1/(g\alpha)}
  3. C.|θ\thetȧ| =2gα= \sqrt{2g\alpha}✓ Correct
  4. D.|θ\thetȧ| =gα= \sqrt{g\alpha}

The worked solution and the per-option analysis are in Trap Analysis.

Part B2024 Decembershow ▾
Two blocks of equal mass m are connected by a flexible inelastic cord of mass M. One block is placed on a smooth horizontal table, the other block hangs over the edge. The total potential energy of the entire cord is given by (−Mg/2l)x2/2l)x^{2}, where x is the distance of the hanging block from the edge of the table, l is the length of the cord, and g is the gravitational acceleration. Then
  1. A.ẍ = (l/g)(ml + Mx)/(2m + M)
  2. B.ẍ = (l/g)(Ml + mx)/(m + M)
  3. C.ẍ = (g/l)(ml + Mx)/(m + M)
  4. D.ẍ = (g/l)(ml + Mx)/(2m + M)✓ Correct

The worked solution and the per-option analysis are in Trap Analysis.

Part B2024 Decembershow ▾
Consider a particle of mass m1m_{1} moving along a horizontal line L that is perpendicular to a vertical wall. Let x denote the distance of the particle from the wall. Suppose a simple pendulum of length l having mass m2,m2≠m1m_{2}, m_{2} \ne m_{1}, is attached to the particle, hanging below L with θ\theta measured from the downward vertical. If the pendulum oscillates in a plane containing L, then the equations of motion in terms of the generalized coordinates x and θ\theta are (g denotes the acceleration due to gravity)
  1. A.(m1+m2)(m_{1} + m_{2})ẍ + lm2(d/_{2}(d/dt)(θ)(\thetȧcos⁡θ)=0\cos \theta) = 0 and lθl\thetä + (d/dt)(ẋcos⁡θ)+\cos \theta) + ẋθ\thetȧsin⁡θ+gsin⁡θ=0\sin \theta + g \sin \theta = 0✓ Correct
  2. B.(m1+m2)(m_{1} + m_{2})ẍ + lm2θ_{2}\thetäcos⁡θ=0\cos \theta = 0 and lθl\thetä + ẍcos⁡θ+\cos \theta + ẋθ\thetȧsin⁡θ+gsin⁡θ=0\sin \theta + g \sin \theta = 0
  3. C.(m1+m2)(m_{1} + m_{2})ẍ + lm1(d/_{1}(d/dt)(θ)(\thetȧcos⁡θ)=0\cos \theta) = 0 and lθl\thetä +m2(d/+ m_{2}(d/dt)(ẋcos⁡θ)+\cos \theta) + ẋθ\thetȧsin⁡θ+gsin⁡θ=0\sin \theta + g \sin \theta = 0
  4. D.(m1+m2)(m_{1} + m_{2})ẍ + l(d/dt)(θ)(\thetȧcos⁡θ)+\cos \theta) + ẋθ\thetȧsin⁡θ+gsin⁡θ=0\sin \theta + g \sin \theta = 0 and lθl\thetä + (d/dt)(ẋcos⁡θ)+θ\cos \theta) + \thetȧcos⁡θ=0\cos \theta = 0

The worked solution and the per-option analysis are in Trap Analysis.

Part B2023 Decembershow ▾
Let g denote the acceleration due to gravity and a > 0. A particle of mass m glides without friction on the cycloid x=a(θ−sin⁡θ),y=a(1+cos⁡θ),0≤θ≤2πx = a(\theta - \sin \theta), y = a(1 + \cos \theta), 0 \le \theta \le 2\pi. The equation of motion of the particle is
  1. A.(1−cos⁡θ)θ(1 - \cos \theta)\thetä + ½ sin⁡θ(θ\sin \theta (\thetȧ)2−(g/2a)sin⁡θ=0)^{2} - (g/2a) \sin \theta = 0✓ Correct
  2. B.(1−2cosθ)θ(1 - 2cos \theta)\thetä +sin⁡θ(θ+ \sin \theta (\thetȧ)2−(g/a)sin⁡θ=0)^{2} - (g/a) \sin \theta = 0
  3. C.m(1−2cosθ)θm(1 - 2cos \theta)\thetä +sin⁡θ(θ+ \sin \theta (\thetȧ)2+(g/a)sin⁡θ=0)^{2} + (g/a) \sin \theta = 0
  4. D.m(1−2cosθ)θm(1 - 2cos \theta)\thetä +(m/2)sin⁡θ(θ+ (m/2) \sin \theta (\thetȧ)2−(g/a)sin⁡θ=0)^{2} - (g/a) \sin \theta = 0

The worked solution and the per-option analysis are in Trap Analysis.

Part Cshow ▾
Let L(q, q̇, t) be a Lagrangian for a system with generalized coordinate q. Which of the following are true?
  1. A.The Euler–Lagrange equation is d/dt(∂L/∂q(\partial{}L/\partial{}q̇)−∂L/∂q=0) - \partial{}L/\partial{}q = 0.✓ Correct
  2. B.If L does not depend explicitly on q, then the generalized momentum p=∂L/∂qp = \partial{}L/\partial{}q̇ is conserved.✓ Correct
  3. C.If L does not depend explicitly on t, then the Hamiltonian H = q̇(∂L/∂q(\partial{}L/\partial{}q̇) − L is conserved.✓ Correct
  4. D.L = T − V is always numerically equal to the total mechanical energy T + V.

Solution

(1) is the Euler–Lagrange equation. (2) a cyclic coordinate has a conserved conjugate momentum. (3) time-translation invariance conserves the Hamiltonian, by Noether's theorem. (4) is false: T − V and T + V are different quantities unless V = 0 — the Lagrangian generates the equations of motion via the action principle, while T + V is the (often separately conserved) mechanical energy; conflating the two is a common mix-up.

Save for spaced revision (free account)
Part Cshow ▾
A particle of mass m moves under a central potential V(r) in the plane, with Lagrangian L = (m/2)(ṙ2+r2θ^{2} + r^{2}\thetȧ2)−V(r)^{2}) - V(r). Which of the following are true?
  1. A.θ\theta is cyclic, so the angular momentum pθ=p_\theta = mr2θ^{2}\thetȧ is conserved.✓ Correct
  2. B.The Euler–Lagrange equation for r gives m(r̈ −rθ- r\thetȧ2)=−V′(r)^{2}) = -V'(r).✓ Correct
  3. C.Using conservation of pθ=ℓp_\theta = \ell, the radial motion can be rewritten via an effective potential V_eff(r)=V(r)+ℓ2/(2(r) = V(r) + \ell^{2}/(2mr2)^{2}).✓ Correct
  4. D.The total energy E = (m/2)(ṙ2+r2θ^{2} + r^{2}\thetȧ2)+V(r)^{2}) + V(r) is not conserved in general, since V depends on r.

Solution

(1)–(3) are the standard central-force reduction. (4) is false: L has no explicit time dependence — V depends only on r, not on t — so by Noether's theorem the Hamiltonian, which here is exactly the total energy, is conserved regardless of V's dependence on r.

Save for spaced revision (free account)
Part Cshow ▾
A particle of mass m moves in a plane under a central potential V(r). In polar coordinates (r,θ)(r, \theta), which of the following are true?
  1. A.The Lagrangian is L = ½m(ṙ2+r2θ^{2} + r^{2}\thetȧ2)−V(r)^{2}) - V(r).✓ Correct
  2. B.θ\theta is cyclic, so pθ=p_\theta = mr2θ^{2}\thetȧ is conserved.✓ Correct
  3. C.The conservation of pθp_\theta expresses conservation of angular momentum.✓ Correct
  4. D.Energy is not conserved, because the motion depends on θ\theta.

The worked solution and the per-option analysis are in Trap Analysis.

2. Hamiltonian formalism and conservation laws

Read this as a chapter →

Derivation of Hamilton's Equations of Motion

Pretty Much Physics · Classical Mechanics

The Legendre transform from L to H, then Hamilton's equations.

Hamiltonian mechanics, Poisson brackets and canonical transformations free

In plain words

Swap velocities for momenta and get twice as many first-order equations, symmetric in position and momentum. The flow preserves phase-space volume, which is why there can be no attractor.

From L to H

p=∂L/∂qp = \partial{}L/\partial{}q̇, and H(q,p,t)=∑pqH(q, p, t) = \sum p q̇ − L with q̇ eliminated.

Hamilton's equations: q̇ =∂H/∂p= \partial{}H/\partial{}p, ṗ =−∂H/∂q= -\partial{}H/\partial{}q.

  • H = T + V (total energy) when the constraints are time-independent and T is quadratic in q̇.
  • dH/dt =∂H/∂t= \partial{}H/\partial{}t, so H is conserved when it has no explicit time dependence.

Poisson brackets

{f, g} =∑(∂f/∂q∂g/∂p−∂f/∂p∂g/∂q)= \sum (\partial{}f/\partial{}q \partial{}g/\partial{}p - \partial{}f/\partial{}p \partial{}g/\partial{}q).

  • df/dt = {f, H} +∂f/∂t;f+ \partial{}f/\partial{}t; f is a constant of motion ⇔ {f, H} = 0 (for time-independent f).
  • Fundamental brackets: {qi,pjq_{i}, p_{j}} =δij= \delta_{ij}, {qi,qjq_{i}, q_{j}} = {pi,pjp_{i}, p_{j}} = 0.
  • Properties: antisymmetric, bilinear, Leibniz, Jacobi identity.

Canonical transformations

(q, p) → (Q, P) is canonical ⇔ the fundamental brackets are preserved:

{Qi,PjQ_{i}, P_{j}} =δij= \delta_{ij}, {Qi,QjQ_{i}, Q_{j}} = {Pi,PjP_{i}, P_{j}} = 0.

Equivalently the Jacobian is symplectic (MᵀJM = J), which for one degree of freedom reduces to det⁡=1:∂(Q,P)/∂(q,p)=1\det = 1: \partial(Q,P)/\partial(q,p) = 1.

Generating functions F1(q,Q),F2(q,P),F3(p,Q),F4(p,P)F_{1}(q,Q), F_{2}(q,P), F_{3}(p,Q), F_{4}(p,P) produce canonical transformations automatically; e.g.F2=e.g. F_{2} = qP gives the identity, F1=F_{1} = qQ swaps q and p (with a sign).

Liouville's theorem: phase-space volume is preserved by the Hamiltonian flow.

Key takeaways

  • H = T + V only under the standard conditions; otherwise compute ∑\sumpq̇ − L.
  • {f, H} = 0 ⇔ f is a constant of motion.
  • Test canonicity with the fundamental Poisson brackets, not by guessing.

From Lagrangian to Hamiltonian, and what the flow preservesinteractive

This visual is part of Trap Analysis

The Legendre transform done once, plus the reason a Hamiltonian system can never have an attractor.

Unlock interactive visuals

Exam focus: H = Σpq̇ − L expressed in (q, p). Poisson brackets test canonicity: {Qᵢ, Pⱼ} = δᵢⱼ, {Qᵢ, Qⱼ} = {Pᵢ, Pⱼ} = 0.

Practice

Part C2025 Decembershow ▾
A mechanical system is described using generalized position q and generalized momentum p. Let Q and P denote new generalized position and generalized momentum variables respectively, generated by the generating function F(q,P)=q2ePF(q,P)=q^{2}e^P, and Q,P are canonical coordinates. Let G(p,Q) be a function such that G(2,e)=0, and it generates the same canonical coordinates Q,P. Then which of the following statements are true?
  1. A.G(p,Q)=−Q[1+loge(p2/(4Q))]G(p,Q) = -Q[1 + log_{e}(p^{2}/(4Q))]✓ Correct
  2. B.G(p,Q) = −pQ[1+loge(Q2/(4p))][1 + log_{e}(Q^{2}/(4p))]
  3. C.p = 2qeP,Q=q2eP^P, Q = q^{2}e^P✓ Correct
  4. D.p = −2qeP,Q=−q2eP^P, Q = -q^{2}e^P

The worked solution and the per-option analysis are in Trap Analysis.

Part C2025 Juneshow ▾
Suppose f, g are smooth functions of generalized coordinates q1,q2,…,qnq_{1}, q_{2}, \dots, q_{n}, the associated conjugate momenta p1,p2,…,pnp_{1}, p_{2}, \dots, p_{n}, and time t. Let [f, g] denote the Poisson bracket of f and g. Suppose H is a Hamiltonian of the system. Then which of the following statements are true?
  1. A.∂/∂t[f,g]=[∂f/∂t,g]+[f,∂g/∂t]\partial/\partial{}t [f, g] = [\partial{}f/\partial{}t, g] + [f, \partial{}g/\partial{}t]✓ Correct
  2. B.If f is a constant of motion, and f is independent of t, then [H, f] is a constant of motion✓ Correct
  3. C.[[H, f], g] + [[g, H], f] + [[f, g], H] = 0✓ Correct
  4. D.If f and g are constants of motion, then [f, g] is a constant of motion✓ Correct

The worked solution and the per-option analysis are in Trap Analysis.

Part C2023 Decembershow ▾
Let q1,q2q_{1}, q_{2} be generalized coordinates and p1,p2p_{1}, p_{2} their conjugate momenta. Let a and b be such that Q1=q1,P1=ap1+16p2,Q2=p2,P2=2q1+bq2Q_{1} = q_{1}, P_{1} = a p_{1} + 16 p_{2}, Q_{2} = p_{2}, P_{2} = 2q_{1} + b q_{2} is a canonical transformation. Which of the following statements are true?
  1. A.a2+b2=2a^{2} + b^{2} = 2✓ Correct
  2. B.a − b = 2✓ Correct
  3. C.a + b = 2
  4. D.a = 1, b = 1

The worked solution and the per-option analysis are in Trap Analysis.

Part Cshow ▾
Let H(q, p) be a time-independent Hamiltonian. Which of the following are true?
  1. A.Along solutions of Hamilton's equations, dH/dt = 0.✓ Correct
  2. B.Hamilton's equations are q̇ =∂H/∂p= \partial{}H/\partial{}p, ṗ =−∂H/∂q= -\partial{}H/\partial{}q.✓ Correct
  3. C.The Hamiltonian flow preserves phase-space volume (Liouville).✓ Correct
  4. D.Every trajectory tends to an equilibrium point as t→∞t \to \infty.

The worked solution and the per-option analysis are in Trap Analysis.