The math optional, made finite. Daily Practice

Lagrange’s equations

At a Glance

Why This Chapter Matters

Lagrange’s equations appear in 9 of the last 13 years, with an even split across 10-, 15-, and 20-mark questions. The method is systematic: once you write down TT and VV, the rest is calculus. UPSC favours four physical setups — rolling bodies, pulley systems, central-force orbits, and coupled oscillators — and one abstract setup (a given Lagrangian to differentiate). Mastering the procedure means these 9 appearances become largely mechanical.

Minimum Theory

Euler–Lagrange equations. For a system with generalised coordinates q1,,qnq_1,\ldots,q_n and Lagrangian L=TVL=T-V: ddtLq˙kLqk=Qk,k=1,,n,\frac{d}{dt}\frac{\partial L}{\partial\dot q_k}-\frac{\partial L}{\partial q_k}=Q_k,\qquad k=1,\ldots,n, where QkQ_k is the generalised force for qkq_k (zero if no non-conservative forces, or if VV is complete). For a force F\mathbf F applied at point r\mathbf r: Qk=Fr/qkQ_k=\mathbf F\cdot\partial\mathbf r/\partial q_k.

Steps to form the Lagrangian:

  1. Choose generalised coordinates; apply any holonomic constraints to reduce the number of DOFs.
  2. Write TT (kinetic energy) in terms of q˙k\dot q_k. For rigid bodies: T=12Ipivotθ˙2T=\frac12 I_\text{pivot}\dot\theta^2 (rotation about fixed axis) or T=12mvCM2+12ICMθ˙2T=\frac12 mv_{CM}^2+\frac12 I_{CM}\dot\theta^2 (König’s theorem).
  3. Write VV in terms of qkq_k.
  4. Form L=TVL=T-V and differentiate.

Normal modes. For a system near equilibrium, linearise TT and VV to get T=12q˙TMq˙T=\frac12\dot{\mathbf q}^TM\dot{\mathbf q} and V=12qTKqV=\frac12{\mathbf q}^TK\mathbf q. Normal-mode frequencies satisfy det(Kω2M)=0\det(K-\omega^2 M)=0.

Question Archetypes

Three patterns cover all Lagrange’s equations questions.

ArchetypeYou are seeing this when…
lagrange-eomset up LL, derive the equations of motion, find acceleration or velocity
normal-modescoupled oscillators; find normal-mode frequencies
gauge-lagrangianfind an equivalent time-independent Lagrangian by adding dF/dtdF/dt

lagrange-eom (6 question(s); 2016, 2017, 2018, 2021, 2022, 2025)

Recognition Cues

Solution Template

  1. Identify DOFs; apply holonomic constraints to reduce (e.g., rolling: s=rψs=r\psi).
  2. Write TT (use I=Mr2I=Mr^2 for hoop, I=12Mr2I=\frac12Mr^2 for disc, I=25Mr2I=\frac25Mr^2 for sphere).
  3. Write VV; form L=TVL=T-V.
  4. For each qkq_k: compute L/q˙k\partial L/\partial\dot q_k, differentiate w.r.t. tt, subtract L/qk\partial L/\partial q_k, set equal to QkQ_k.
  5. Solve the resulting ODE(s) for the asked quantity.

Worked Example(s)

2021 Paper 2, 2021-P2-Q6c (15 marks)

Derive Lagrangian equations for two masses m1,m2m_1,m_2 on a smooth pulley (Atwood machine).

One DOF. Let xx = downward displacement of m1m_1; m2m_2 rises by xx. Inextensibility gives one generalised coordinate.

T=12(m1+m2)x˙2,V=(m2m1)gx.T=\tfrac12(m_1+m_2)\dot x^2,\qquad V=(m_2-m_1)gx. L=12(m1+m2)x˙2+(m1m2)gx.L=\tfrac12(m_1+m_2)\dot x^2+(m_1-m_2)gx. EL: (m1+m2)x¨=(m1m2)g(m_1+m_2)\ddot x=(m_1-m_2)g.   x¨=(m1m2)gm1+m2.  \boxed{\;\ddot x=\frac{(m_1-m_2)g}{m_1+m_2}.\;}


2016 Paper 2, 2016-P2-Q8b (15 marks)

Hoop of radius rr rolls without slipping down incline of length ll, angle ϕ\phi. Write Lagrange’s equations and find velocity at bottom.

Rolling constraint: s˙=rψ˙\dot s=r\dot\psi (holonomic; reduces to one DOF ss). Hoop: I=Mr2I=Mr^2, so total T=12Ms˙2+12(Mr2)(s˙/r)2=Ms˙2T=\frac12M\dot s^2+\frac12(Mr^2)(\dot s/r)^2=M\dot s^2.

L=Ms˙2Mg(ls)sinϕ.L=M\dot s^2-Mg(l-s)\sin\phi. EL: 2Ms¨=Mgsinϕs¨=12gsinϕ2M\ddot s=Mg\sin\phi\Rightarrow\ddot s=\tfrac12 g\sin\phi.

Kinematics (v2=2alv^2=2al from rest): v2=212gsinϕl=glsinϕv^2=2\cdot\tfrac12 g\sin\phi\cdot l=gl\sin\phi.

  v=glsinϕ.  \boxed{\;v=\sqrt{gl\sin\phi}.\;} (Independent of MM and rr — good sanity check.)


2022 Paper 2, 2022-P2-Q5d (10 marks)

Particle under central force F=k/r2F=-k/r^2. Find Lagrangian and equations of motion.

In polar (r,θ)(r,\theta): T=12m(r˙2+r2θ˙2)T=\frac12m(\dot r^2+r^2\dot\theta^2), V=k/rV=-k/r.

L=12m(r˙2+r2θ˙2)+kr.L=\tfrac12m(\dot r^2+r^2\dot\theta^2)+\frac{k}{r}. EL for rr: mr¨=mrθ˙2k/r2m\ddot r=mr\dot\theta^2-k/r^2. EL for θ\theta: ddt(mr2θ˙)=0\frac{d}{dt}(mr^2\dot\theta)=0 (θ\theta cyclic — angular momentum conserved).

  mr¨=mrθ˙2kr2,mr2θ˙=const.  \boxed{\;m\ddot r=mr\dot\theta^2-\frac{k}{r^2},\quad mr^2\dot\theta=\text{const}.\;}


2025 Paper 2, 2025-P2-Q5d (10 marks)

Bead on frictionless cycloid x=a(θsinθ)x=a(\theta-\sin\theta), y=a(1+cosθ)y=a(1+\cos\theta). Find LL; show EOM is u¨+(g/4a)u=0\ddot u+(g/4a)u=0, u=cos(θ/2)u=\cos(\theta/2).

Speed. x˙2+y˙2=a2θ˙22(1cosθ)=4a2sin2(θ/2)θ˙2\dot x^2+\dot y^2=a^2\dot\theta^2\cdot2(1-\cos\theta)=4a^2\sin^2(\theta/2)\dot\theta^2. Using 1cosθ=2sin2(θ/2)1-\cos\theta=2\sin^2(\theta/2).

T=2ma2sin2 ⁣(θ2)θ˙2,V=mga(1+cosθ)=2mgacos2 ⁣(θ2).T=2ma^2\sin^2\!\left(\tfrac\theta2\right)\dot\theta^2,\qquad V=mga(1+\cos\theta)=2mga\cos^2\!\left(\tfrac\theta2\right).

  L=2ma2sin2 ⁣(θ2)θ˙22mgacos2 ⁣(θ2).  \boxed{\;L=2ma^2\sin^2\!\left(\tfrac\theta2\right)\dot\theta^2-2mga\cos^2\!\left(\tfrac\theta2\right).\;}

EL equation (after dividing by 2masin(θ/2)2ma\sin(\theta/2)): 2asinθ2θ¨+acosθ2θ˙2gcosθ2=0.2a\sin\tfrac\theta2\ddot\theta+a\cos\tfrac\theta2\dot\theta^2-g\cos\tfrac\theta2=0.

With u=cos(θ/2)u=\cos(\theta/2): u˙=12sin(θ/2)θ˙\dot u=-\frac12\sin(\theta/2)\dot\theta, u¨=12sin(θ/2)θ¨14cos(θ/2)θ˙2\ddot u=-\frac12\sin(\theta/2)\ddot\theta-\frac14\cos(\theta/2)\dot\theta^2. Multiplying the EL equation by 14-\frac14: au¨+g4u=0a\ddot u+\frac{g}{4}u=0.

  d2udt2+g4au=0(SHM, period 4πa/g).  \boxed{\;\frac{d^2u}{dt^2}+\frac{g}{4a}u=0\quad(\text{SHM, period }4\pi\sqrt{a/g}).\;}


2018 Paper 2, 2018-P2-Q6c (20 marks)

L=12m(ax˙2+2bx˙y˙+cy˙2)12k(ax2+2bxy+cy2)L=\frac12m(a\dot x^2+2b\dot x\dot y+c\dot y^2)-\frac12k(ax^2+2bxy+cy^2), b2acb^2\ne ac. Write EL equations; identify system.

With M=(abbc)M=\begin{pmatrix}a&b\\b&c\end{pmatrix}, both TT and VV share the same matrix: mMr¨=kMrmM\ddot{\mathbf r}=-kM\mathbf r. Since detM=acb20\det M=ac-b^2\ne0, multiply by M1M^{-1}:

mx¨+kx=0,my¨+ky=0.m\ddot x+kx=0,\qquad m\ddot y+ky=0.

  Two independent SHMs with  ω=k/m.  \boxed{\;\text{Two independent SHMs with }\ \omega=\sqrt{k/m}.\;}


2017 Paper 2, 2017-P2-Q6c (20 marks)

Two uniform rods ABAB, ACAC (each mass mm, length 2a2a) hinged at AA, moving on a horizontal plane. Prove T=m[ξ˙2+η˙2+(13+sin2ϕ)a2θ˙2+(13+cos2ϕ)a2ϕ˙2]T=m[\dot\xi^2+\dot\eta^2+(\frac13+\sin^2\phi)a^2\dot\theta^2+(\frac13+\cos^2\phi)a^2\dot\phi^2]; derive Lagrange’s equations if force (X,Y)(X,Y) acts at AA.

König’s theorem for each rod (translation of GiG_i + rotation about GiG_i, IGi=ma2/3I_{G_i}=ma^2/3). Express the hinge AA through the system CM: ξ=xA+acosϕcosθ\xi=x_A+a\cos\phi\cos\theta, etc. After substituting and collecting trig identities (cos(θ±ϕ)\cos(\theta\pm\phi) sums), cross terms cancel giving the stated TT.

Generalised forces from (X,Y)(X,Y) at AA: Qξ=XQ_\xi=X, Qη=YQ_\eta=Y, Qθ=acosϕ(XsinθYcosθ)Q_\theta=a\cos\phi(X\sin\theta-Y\cos\theta), Qϕ=asinϕ(Xcosθ+Ysinθ)Q_\phi=a\sin\phi(X\cos\theta+Y\sin\theta).

EL equations: 2mξ¨=X,2mη¨=Y,2m\ddot\xi=X,\qquad 2m\ddot\eta=Y, 2ma23[(1+3sin2ϕ)θ¨+3sin2ϕθ˙ϕ˙]=Qθ,\tfrac{2ma^2}{3}[(1+3\sin^2\phi)\ddot\theta+3\sin2\phi\,\dot\theta\dot\phi]=Q_\theta, 2ma23[(1+3cos2ϕ)ϕ¨32sin2ϕ(θ˙2+ϕ˙2)]=Qϕ.\tfrac{2ma^2}{3}[(1+3\cos^2\phi)\ddot\phi-\tfrac32\sin2\phi(\dot\theta^2+\dot\phi^2)]=Q_\phi.

Common Traps


normal-modes (2 question(s); 2013, 2023)

Recognition Cues

Solution Template

  1. Choose generalised coordinates; write full (nonlinear) TT and VV.
  2. Linearise: cos(θ1θ2)1\cos(\theta_1-\theta_2)\approx1, cosθ1θ2/2\cos\theta\approx1-\theta^2/2; keep only quadratic terms.
  3. Read off mass matrix MM and stiffness matrix KK from T=12q˙TMq˙T=\frac12\dot{\mathbf q}^TM\dot{\mathbf q}, V=12qTKqV=\frac12\mathbf q^TK\mathbf q.
  4. Solve det(Kn2M)=0\det(K-n^2M)=0 for the normal frequencies. Use the quadratic formula; factor the discriminant.
  5. Check: all n2>0n^2>0 (stable equilibrium).

Worked Example(s)

2013 Paper 2, 2013-P2-Q8a (15 marks)

Two equal rods ABAB, BCBC (mass mm, length ll) jointed at BB, suspended from AA. Show n2=(3±6/7)g/ln^2=(3\pm6/\sqrt7)g/l.

Generalised coordinates: θ1\theta_1 (angle of ABAB), θ2\theta_2 (angle of BCBC).

Full TT (König for BCBC: translation of G2G_2 + spin θ˙2\dot\theta_2 about G2G_2): T=2ml23θ˙12+ml26θ˙22+ml22cos(θ1θ2)θ˙1θ˙2.T=\frac{2ml^2}{3}\dot\theta_1^2+\frac{ml^2}{6}\dot\theta_2^2+\frac{ml^2}{2}\cos(\theta_1-\theta_2)\dot\theta_1\dot\theta_2.

Linearised (cos(θ1θ2)1\cos(\theta_1-\theta_2)\approx1, V3mgl4θ12+mgl4θ22V\approx\frac{3mgl}{4}\theta_1^2+\frac{mgl}{4}\theta_2^2): M=ml2(4/31/21/21/3),K=mgl(3/2001/2).M=ml^2\begin{pmatrix}4/3&1/2\\ 1/2&1/3\end{pmatrix},\qquad K=mgl\begin{pmatrix}3/2&0\\ 0&1/2\end{pmatrix}.

det(Kn2M)=0\det(K-n^2M)=0 expands to 7l2n442gln2+27g2=07l^2n^4-42gln^2+27g^2=0. Discriminant =127gl=12\sqrt7\,gl: n2=42gl±127gl14l2=gl ⁣(3±67).n^2=\frac{42gl\pm12\sqrt7\,gl}{14l^2}=\frac{g}{l}\!\left(3\pm\frac6{\sqrt7}\right).

  n2=(3±67)gl;T=2πn.  \boxed{\;n^2=\left(3\pm\frac6{\sqrt7}\right)\frac gl;\quad T=\frac{2\pi}n.\;}


2023 Paper 2, 2023-P2-Q6c (20 marks)

L=12m(x˙2+y˙2)12m(ω12x2+ω22y2)+kxyL=\frac12m(\dot x^2+\dot y^2)-\frac12m(\omega_1^2x^2+\omega_2^2y^2)+kxy. Find θ\theta so that the (q1,q2)(q_1,q_2) Lagrangian has no q1q2q_1q_2 cross term. Find the Lagrange equations independent of θ\theta.

Rotation invariance of TT: x˙2+y˙2=q˙12+q˙22\dot x^2+\dot y^2=\dot q_1^2+\dot q_2^2 (orthogonal rotation).

Cross-term coefficient in LL after rotation: 12m(ω12ω22)sin2θ+kcos2θ=0    tan2θ=2km(ω22ω12).\tfrac12m(\omega_1^2-\omega_2^2)\sin2\theta+k\cos2\theta=0\;\Longrightarrow\;\tan2\theta=\frac{2k}{m(\omega_2^2-\omega_1^2)}.

  θ=12arctan ⁣2km(ω22ω12).  \boxed{\;\theta=\tfrac12\arctan\!\frac{2k}{m(\omega_2^2-\omega_1^2)}.\;}

Normal frequencies (eigenvalues of the potential matrix, independent of θ\theta): Ω1,22=ω12+ω222± ⁣(ω12ω222)2+k2m2.\Omega_{1,2}^2=\frac{\omega_1^2+\omega_2^2}{2}\pm\sqrt{\!\left(\frac{\omega_1^2-\omega_2^2}{2}\right)^2+\frac{k^2}{m^2}}.

EL equations: q¨1+Ω12q1=0\ddot q_1+\Omega_1^2q_1=0, q¨2+Ω22q2=0\ddot q_2+\Omega_2^2q_2=0.

Common Traps


gauge-lagrangian (1 question(s); 2015)

Recognition Cues

Solution Template

Add dFdt\dfrac{dF}{dt} for F(q,t)F(q,t) chosen to absorb the time-dependent terms. The key identity: ddt(αbq2eαt/2)=αbqq˙eαt+α2bq2eαt/2\dfrac{d}{dt}(-\alpha b q^2 e^{-\alpha t}/2)=-\alpha bq\dot q e^{-\alpha t}+\alpha^2 bq^2 e^{-\alpha t}/2, which cancels both offending terms in LL.

Worked Example(s)

2015 Paper 2, 2015-P2-Q7c-ii (10 marks)

Starting from L=α2q˙2+αbqq˙eαtbα2q2eαt2kq22L=\frac\alpha2\dot q^2+\alpha bq\dot q e^{-\alpha t}-\frac{b\alpha^2 q^2 e^{-\alpha t}}{2}-\frac{kq^2}{2}, find an equivalent time-independent Lagrangian.

Add dFdt\dfrac{dF}{dt} with F=αbq2eαt2F=-\dfrac{\alpha bq^2 e^{-\alpha t}}{2}: dFdt=αbqq˙eαt+α2bq2eαt2.\frac{dF}{dt}=-\alpha bq\dot q e^{-\alpha t}+\frac{\alpha^2 bq^2 e^{-\alpha t}}{2}. Both eαte^{-\alpha t} terms in LL cancel: L=L+dFdt=α2q˙2kq22.L'=L+\frac{dF}{dt}=\frac\alpha2\dot q^2-\frac{kq^2}{2}.

  L=α2q˙2kq22(SHM with mass α, spring constant k).  \boxed{\;L'=\frac\alpha2\dot q^2-\frac{kq^2}{2}\quad(\text{SHM with mass }\alpha,\text{ spring constant }k).\;}

Common Traps


Marks-Aware Writing

10-mark questions (2021, 2022, 2025-Q5d): Write TT and VV (two lines), form LL, write EL for the single coordinate, state the result. For the given-LL variant (2022): just differentiate and identify.

15-mark questions (2013, 2016, 2021): State the constraint (holonomic); write TT with moment of inertia used explicitly; form LL; EL equation in one line; solve by kinematics or energy. For normal modes (2013): show both linearised TT and VV matrices before writing the characteristic equation.

20-mark questions (2017, 2018, 2023): Full derivation expected. For 2017: prove the TT formula step by step (König’s theorem, write each rod’s KE, collect terms), state all four generalised forces, write all four EL equations. For 2023: show the rotation, compute the cross-term coefficient, set to zero, state Ω1,2\Omega_{1,2}.

Practice Set

YearPaper/QMarksArchetypeOne-line hint
2025P2-Q5d10lagrange-eomT=2ma2sin2(θ/2)θ˙2T=2ma^2\sin^2(\theta/2)\dot\theta^2; u=cos(θ/2)u=\cos(\theta/2) reduces EL to u¨+(g/4a)u=0\ddot u+(g/4a)u=0
2023P2-Q6c20normal-modesRotation makes potential diagonal; tan2θ=2k/[m(ω22ω12)]\tan2\theta=2k/[m(\omega_2^2-\omega_1^2)]; Ω1,22\Omega_{1,2}^2 are eigenvalues
2022P2-Q5d10lagrange-eomPolar coords; θ\theta cyclic; mr2θ˙=mr^2\dot\theta= const; mr¨=mrθ˙2k/r2m\ddot r=mr\dot\theta^2-k/r^2
2021P2-Q6c15lagrange-eomSingle coord xx; x¨=(m1m2)g/(m1+m2)\ddot x=(m_1-m_2)g/(m_1+m_2)
2018P2-Q6c20lagrange-eomTT and VV share matrix MM; b2acb^2\ne ac makes MM invertible; two independent SHMs
2017P2-Q6c20lagrange-eomKönig for each rod; express hinge AA via CM; Qk=FrA/qkQ_k=F\cdot\partial r_A/\partial q_k
2016P2-Q8b15lagrange-eomHoop: I=Mr2I=Mr^2; T=Ms˙2T=M\dot s^2; s¨=gsinϕ/2\ddot s=g\sin\phi/2; v=glsinϕv=\sqrt{gl\sin\phi}
2015P2-Q7c-ii10gauge-lagrangianF=αbq2eαt/2F=-\alpha bq^2e^{-\alpha t}/2; both eαte^{-\alpha t} terms cancel; L=αq˙2/2kq2/2L'=\alpha\dot q^2/2-kq^2/2
2013P2-Q8a15normal-modesMM and KK from small-angle T,VT,V; discriminant 1008=127\sqrt{1008}=12\sqrt7; roots n2=(3±6/7)g/ln^2=(3\pm6/\sqrt7)g/l

We've mapped all 13 years of this exam. Get new chapters, tools, and solutions as we release them — free.