Menu Close

Lagrangian and Hamiltonian mechanics: UPSC Maths Optional PYQ Solutions (2010–2026)

All 22 questions UPSC has asked on Lagrangian and Hamiltonian mechanics in the Mathematics Optional (Paper II, Mechanics and Fluid Dynamics) from 2010 to 2026, solved step by step – latest first.

Try them yourself first: the same questions, without solutions, are on our Mechanics and Fluid Dynamics topic-wise PYQs page.

How we check these solutions

These are our own solutions, prepared with AI help. UPSC does not publish official answers. Every solution is checked a second way before it goes up, and says how:

  • ✓ Checked by computer the answer was worked out again independently with computer algebra (SymPy): Lagrangians, Hamiltonians, potentials and integrals were derived or evaluated again, and where useful the motion was integrated numerically.
  • ✓ Proof checked step by step for “prove that” questions, every step was checked against the definitions.

Spotted a mistake or a neater method? Tell us in the comments below or through Report an error.

Jump to a question (year · question number):

2026 · 7c 2025 · 5d 2025 · 8c(i) 2025 · 8c(ii) 2023 · 5d 2023 · 6c 2022 · 5d 2021 · 5d 2021 · 6c 2020 · 6c 2019 · 7a 2018 · 6c 2018 · 7c 2017 · 6c 2016 · 5c 2016 · 8b 2015 · 6b 2015 · 7c 2014 · 5e 2013 · 8a 2012 · 5d 2010 · 8a

Cover of the UPSC Prelims Topic-wise PYQ book with detailed explanations

From the Optional Province team

Preparing for Prelims too?

Our UPSC Prelims Topic-wise PYQ Book covers every Prelims question with detailed explanations, so you can see exactly where UPSC asks from. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

A smooth uniform rod, say OA, of length 2a and mass m is pivoted at one end to a fixed point O. The rod is inclined at an angle θ with the downward vertical line OZ and the plane OAZ makes an angle ϕ with a fixed vertical plane. A bead of mass λm slides smoothly on the rod and is connected to O by a light elastic string of modulus nmg and natural length a. Show that the kinetic energy T of the system is given by 2T=43ma2(θ̇2+ϕ̇2sinθ)+λm(ẋ2+x2θ̇2+x2ϕ̇2sin2θ), where x is the stretched length of the string, and derive the equations of motion.

2026 · Paper II · Q7c · 20 marks

Solution

Coordinates. Take θ\theta, ϕ\phi and xx (the distance OPOP of the bead PP from OO, which is the stretched length of the string).

Kinetic energy of the rod. The rod turns about OO. Its angular velocity has components θ̇\dot\theta (in the plane OAZOAZ) and ϕ̇sinθ\dot\phi\sin\theta (perpendicular to that plane, about the rod’s own transverse axis). The moment of inertia of the rod about any line through OO perpendicular to it is I=13ma2+ma2=43ma2.I=\tfrac13 m a^2+ma^2=\tfrac43ma^2 . So Trod=12⋅43ma2(θ̇2+ϕ̇2sin2θ).T_{\text{rod}}=\tfrac12\cdot\tfrac43ma^2\left(\dot\theta^2+\dot\phi^2\sin^2\theta\right).

Kinetic energy of the bead. In spherical polar coordinates (x,θ,ϕ)(x,\theta,\phi) about OO the bead’s speed squared is ẋ2+x2θ̇2+x2sin2θϕ̇2\dot x^2+x^2\dot\theta^2+x^2\sin^2\theta\,\dot\phi^2. Adding, 2T=43ma2(θ̇2+ϕ̇2sin2θ)+λm(ẋ2+x2θ̇2+x2ϕ̇2sin2θ).\begin{aligned}2T&=\tfrac43ma^2\left(\dot\theta^2+\dot\phi^2\sin^2\theta\right)\\ &\quad+\lambda m\left(\dot x^2+x^2\dot\theta^2+x^2\dot\phi^2\sin^2\theta\right).\end{aligned} (This is the printed result, with sin2θ\sin^2\theta in the first bracket; the sinθ\sin\theta there is a misprint.)

Potential energy. The rod’s centre is a depth acosθa\cos\theta below OO and the bead a depth xcosθx\cos\theta. The string, of natural length aa and modulus nmgnmg, stores energy nmg(x−a)22a\dfrac{nmg(x-a)^2}{2a}. So V=−mgacosθ−λmgxcosθ+nmg(x−a)22a.\begin{aligned}&V=-mga\cos\theta-\lambda mgx\cos\theta\\ &\quad+\frac{nmg(x-a)^2}{2a}.\end{aligned}

Equations of motion (L=T−VL=T-V, and we divide by mm). Write K=43a2+λx2K=\tfrac43a^2+\lambda x^2.

For xx: λ(ẍ−xθ̇2−xsin2θϕ̇2)=λgcosθ−ng(x−a)a.\begin{aligned}&\lambda\left(\ddot x-x\dot\theta^2-x\sin^2\theta\,\dot\phi^2\right)\\ &\qquad=\lambda g\cos\theta-\frac{ng(x-a)}{a}.\end{aligned}

For θ\theta: ddt(Kθ̇)−Ksinθcosθϕ̇2=−g(a+λx)sinθ.\begin{aligned}&\frac{d}{dt}\left(K\dot\theta\right)-K\sin\theta\cos\theta\,\dot\phi^2\\ &\qquad=-g(a+\lambda x)\sin\theta .\end{aligned}

For ϕ\phi (ϕ\phi does not appear in LL, so its momentum is conserved): (43a2+λx2)sin2θϕ̇=constant.\left(\tfrac43a^2+\lambda x^2\right)\sin^2\theta\,\dot\phi=\text{constant}.

✓ Checked by computer We checked by computer: from this TT and VV, SymPy’s Euler–Lagrange equations reproduce the three equations of motion below. (The question prints ϕ̇2sinθ\dot\phi^2\sin\theta in the rod’s term; the correct factor, used here, is sin2θ\sin^2\theta.)

↑ Back to the question list

A bead of mass m slides on a frictionless wire in the shape of a cycloid given by x=a(θ−sinθ), y=a(1+cosθ), (0≤θ≤2π). Find the Lagrangian function. Hence show that the equation of motion can be written as d2udt2+g4au=0 where u=cos(θ2).

2025 · Paper II · Q5d · 10 marks

Solution

Take yy as the height. Then ẋ=a(1−cosθ)θ̇,ẏ=−asinθθ̇.\dot x=a(1-\cos\theta)\dot\theta,\qquad \dot y=-a\sin\theta\,\dot\theta . So ẋ2+ẏ2=a2θ̇2[(1−cosθ)2+sin2θ]=2a2(1−cosθ)θ̇2=4a2sin2θ2θ̇2.\begin{aligned}\dot x^2+\dot y^2&=a^2\dot\theta^2\big[(1-\cos\theta)^2\\ &\qquad+\sin^2\theta\big]\\ &=2a^2(1-\cos\theta)\dot\theta^2\\ &=4a^2\sin^2\tfrac\theta2\,\dot\theta^2 .\end{aligned} The potential energy is V=mgy=mga(1+cosθ)=2mgacos2θ2V=mgy=mga(1+\cos\theta)=2mga\cos^2\tfrac\theta2.

Lagrangian. L=2ma2sin2θ2θ̇2−2mgacos2θ2.L=2ma^2\sin^2\tfrac\theta2\,\dot\theta^2-2mga\cos^2\tfrac\theta2 .

Change of variable. Let u=cosθ2u=\cos\frac\theta2. Then u̇=−12sinθ2θ̇\dot u=-\tfrac12\sin\frac\theta2\,\dot\theta, so sin2θ2θ̇2=4u̇2\sin^2\frac\theta2\,\dot\theta^2=4\dot u^2, and L=8ma2u̇2−2mgau2.L=8ma^2\dot u^2-2mga\,u^2 .

Equation of motion. ddt∂L∂u̇=∂L∂u\dfrac{d}{dt}\dfrac{\partial L}{\partial\dot u}=\dfrac{\partial L}{\partial u} gives 16ma2ü=−4mgau16ma^2\ddot u=-4mga\,u, that is d2udt2+g4au=0.\frac{d^2u}{dt^2}+\frac{g}{4a}\,u=0 . So uu performs simple harmonic motion of period 4πa/g4\pi\sqrt{a/g}, whatever the amplitude: the cycloid is a tautochrone.

✓ Checked by computer We checked by computer: with u=cos(θ/2)u=\cos(\theta/2) the Lagrangian becomes 8ma2u̇2−2mgau28ma^2\dot u^2-2mga\,u^2, and its Euler–Lagrange equation is ü+g4au=0\ddot u+\frac{g}{4a}u=0.

↑ Back to the question list

A particle of mass m moves in a force field of potential V(r)=−kcosθr2,k is constant Find the Hamiltonian and the Hamilton’s equations in spherical polar coordinates (r,θ,ϕ).

2025 · Paper II · Q8c(i) · 10 marks

Solution

Lagrangian. In spherical polars, T=12m(ṙ2+r2θ̇2+r2sin2θϕ̇2),T=\tfrac12m\left(\dot r^2+r^2\dot\theta^2+r^2\sin^2\theta\,\dot\phi^2\right), and V=−kcosθr2V=-\dfrac{k\cos\theta}{r^2}.

Momenta. pr=mṙ,pθ=mr2θ̇,pϕ=mr2sin2θϕ̇.p_r=m\dot r,\quad p_\theta=mr^2\dot\theta,\quad p_\phi=mr^2\sin^2\theta\,\dot\phi .

Hamiltonian. VV does not depend on velocities, so H=T+VH=T+V: H=pr22m+pθ22mr2+pϕ22mr2sin2θ−kcosθr2.\begin{aligned}H&=\frac{p_r^2}{2m}+\frac{p_\theta^2}{2mr^2}+\frac{p_\phi^2}{2mr^2\sin^2\theta}\\ &\quad-\frac{k\cos\theta}{r^2}.\end{aligned}

Hamilton’s equations. q̇=∂H/∂p\dot q=\partial H/\partial p: ṙ=prm,θ̇=pθmr2,ϕ̇=pϕmr2sin2θ.\dot r=\frac{p_r}{m},\quad \dot\theta=\frac{p_\theta}{mr^2},\quad \dot\phi=\frac{p_\phi}{mr^2\sin^2\theta}. ṗ=−∂H/∂q\dot p=-\partial H/\partial q: ṗr=pθ2mr3+pϕ2mr3sin2θ−2kcosθr3,ṗθ=pϕ2cosθmr2sin3θ−ksinθr2,ṗϕ=0.\begin{aligned}\dot p_r&=\frac{p_\theta^2}{mr^3}+\frac{p_\phi^2}{mr^3\sin^2\theta}-\frac{2k\cos\theta}{r^3},\\ \dot p_\theta&=\frac{p_\phi^2\cos\theta}{mr^2\sin^3\theta}-\frac{k\sin\theta}{r^2},\\ \dot p_\phi&=0 .\end{aligned} So pϕp_\phi (the angular momentum about the polar axis) is constant, and since HH has no explicit tt, HH (the total energy) is constant too.

✓ Checked by computer We checked by computer: the Legendre transform of L=T−VL=T-V gives this HH, and SymPy’s derivatives of HH give the six Hamilton’s equations below.

↑ Back to the question list

Consider the Lagrangian L=mẋẏ−mω02xy where m and ω0 are constants. Find the Hamiltonian and Hamilton’s equations of motion. Identify the system.

2025 · Paper II · Q8c(ii) · 10 marks

Solution

Momenta. px=∂L∂ẋ=mẏ,py=∂L∂ẏ=mẋ.p_x=\frac{\partial L}{\partial\dot x}=m\dot y,\qquad p_y=\frac{\partial L}{\partial\dot y}=m\dot x . So ẋ=py/m\dot x=p_y/m and ẏ=px/m\dot y=p_x/m.

Hamiltonian. H=pxẋ+pyẏ−L=pxpym+pxpym−pxpym+mω02xy=pxpym+mω02xy.\begin{aligned}H&=p_x\dot x+p_y\dot y-L\\ &=\frac{p_xp_y}{m}+\frac{p_xp_y}{m}-\frac{p_xp_y}{m}+m\omega_0^2xy\\ &=\frac{p_xp_y}{m}+m\omega_0^2xy .\end{aligned}

Hamilton’s equations. ẋ=pym,ẏ=pxm,\dot x=\frac{p_y}{m},\quad \dot y=\frac{p_x}{m}, ṗx=−mω02y,ṗy=−mω02x.\dot p_x=-m\omega_0^2y,\quad \dot p_y=-m\omega_0^2x .

Identifying the system. From ẋ=py/m\dot x=p_y/m, mẍ=ṗy=−mω02xm\ddot x=\dot p_y=-m\omega_0^2x; similarly for yy: ẍ+ω02x=0,ÿ+ω02y=0.\ddot x+\omega_0^2x=0,\qquad \ddot y+\omega_0^2y=0 . These are the equations of a two-dimensional isotropic harmonic oscillator of angular frequency ω0\omega_0. The Lagrangian is not the usual 12m(ẋ2+ẏ2)−12mω02(x2+y2)\tfrac12m(\dot x^2+\dot y^2)-\tfrac12m\omega_0^2(x^2+y^2), but it gives the same equations of motion.

✓ Checked by computer We checked by computer: the Legendre transform gives H=pxpy/m+mω02xyH=p_xp_y/m+m\omega_0^2xy, and Hamilton’s equations reduce to ẍ+ω02x=0\ddot x+\omega_0^2x=0, ÿ+ω02y=0\ddot y+\omega_0^2y=0.

↑ Back to the question list

A planet of mass m is revolving around the sun of mass M. The kinetic energy T and the potential energy V of the planet are given by T=12m(ṙ2+r2θ̇2) and V=GMm(12a−1r), where (r,θ) are the polar coordinates of the planet at time t, G is the gravitational constant and 2a is the major axis of the ellipse (the path of the planet). Find the Hamiltonian and the Hamilton equations of the planet’s motion.

2023 · Paper II · Q5d · 10 marks

Solution

Momenta. pr=mṙp_r=m\dot r and pθ=mr2θ̇p_\theta=mr^2\dot\theta.

Hamiltonian. TT is quadratic in the velocities and VV does not depend on them, so H=T+VH=T+V: H=pr22m+pθ22mr2+GMm(12a−1r).H=\frac{p_r^2}{2m}+\frac{p_\theta^2}{2mr^2}+GMm\left(\frac1{2a}-\frac1r\right).

Hamilton’s equations. ṙ=∂H∂pr=prm,θ̇=∂H∂pθ=pθmr2,\dot r=\frac{\partial H}{\partial p_r}=\frac{p_r}{m},\qquad \dot\theta=\frac{\partial H}{\partial p_\theta}=\frac{p_\theta}{mr^2}, ṗr=−∂H∂r=pθ2mr3−GMmr2,\dot p_r=-\frac{\partial H}{\partial r}=\frac{p_\theta^2}{mr^3}-\frac{GMm}{r^2}, ṗθ=−∂H∂θ=0.\dot p_\theta=-\frac{\partial H}{\partial\theta}=0 .

Consequences. pθ=mr2θ̇=constantp_\theta=mr^2\dot\theta=\text{constant} (conservation of angular momentum, Kepler’s second law), and since HH has no explicit tt, HH is constant (conservation of energy). Eliminating prp_r gives the radial equation m(r̈−rθ̇2)=−GMmr2.m\left(\ddot r-r\dot\theta^2\right)=-\frac{GMm}{r^2}.

✓ Checked by computer We checked by computer: the Legendre transform of T−VT-V gives this HH, and the derivatives of HH give the four Hamilton’s equations below.

↑ Back to the question list

A mechanical system with 2 degrees of freedom has the Lagrangian L=12m(ẋ2+ẏ2)−12m(w12x2+w22y2)+kxy where m, w1, w2, k are constants. Find the parameter θ so that under the transformation x=q1cosθ−q2sinθ,y=q1sinθ+q2cosθ the Lagrangian in terms of q1, q2 will not contain the product term q1q2. Find the Lagrange’s equations w.r.t. q1 and q2 independent of parameter θ.

2023 · Paper II · Q6c · 20 marks

Solution

Kinetic term. The transformation is a rotation, so ẋ2+ẏ2=q̇12+q̇22\dot x^2+\dot y^2=\dot q_1^2+\dot q_2^2.

Potential terms. Write c=cosθc=\cos\theta, s=sinθs=\sin\theta. Then x2=q12c2−2q1q2cs+q22s2,y2=q12s2+2q1q2cs+q22c2,xy=q12cs+q1q2(c2−s2)−q22cs.\begin{aligned}x^2&=q_1^2c^2-2q_1q_2cs+q_2^2s^2,\\ y^2&=q_1^2s^2+2q_1q_2cs+q_2^2c^2,\\ xy&=q_1^2cs+q_1q_2(c^2-s^2)-q_2^2cs .\end{aligned}

Removing the product term. The coefficient of q1q2q_1q_2 in LL is m(w12−w22)cs+k(c2−s2)=12m(w12−w22)sin2θ+kcos2θ.\begin{aligned}&m(w_1^2-w_2^2)cs+k(c^2-s^2)\\ &=\tfrac12m(w_1^2-w_2^2)\sin2\theta+k\cos2\theta .\end{aligned} It vanishes when tan2θ=2km(w22−w12).\tan2\theta=\frac{2k}{m(w_2^2-w_1^2)} .

The new Lagrangian. Collecting the q12q_1^2 and q22q_2^2 terms, L=12m(q̇12+q̇22)−12mΩ12q12−12mΩ22q22,L=\tfrac12m(\dot q_1^2+\dot q_2^2)-\tfrac12m\Omega_1^2q_1^2-\tfrac12m\Omega_2^2q_2^2, where Ω12=w12c2+w22s2−2kmcs,Ω22=w12s2+w22c2+2kmcs.\begin{aligned}\Omega_1^2&=w_1^2c^2+w_2^2s^2-\tfrac{2k}{m}cs,\\ \Omega_2^2&=w_1^2s^2+w_2^2c^2+\tfrac{2k}{m}cs .\end{aligned}

Removing θ\theta. Ω12+Ω22=w12+w22\Omega_1^2+\Omega_2^2=w_1^2+w_2^2, and choosing the root of tan2θ\tan2\theta with cos2θ\cos2\theta of the same sign as w12−w22w_1^2-w_2^2, Ω12−Ω22=R,R=(w12−w22)2+4k2m2.\Omega_1^2-\Omega_2^2=R,\quad R=\sqrt{(w_1^2-w_2^2)^2+\frac{4k^2}{m^2}} . So Ω1,22=12(w12+w22±R).\Omega_{1,2}^2=\tfrac12\left(w_1^2+w_2^2\pm R\right).

Lagrange’s equations. q̈1+12(w12+w22+R)q1=0,\ddot q_1+\tfrac12\left(w_1^2+w_2^2+R\right)q_1=0, q̈2+12(w12+w22−R)q2=0.\ddot q_2+\tfrac12\left(w_1^2+w_2^2-R\right)q_2=0 . These are the normal-mode equations: q1q_1 and q2q_2 oscillate independently (provided Ω22>0\Omega_2^2>0, i.e. m2w12w22>k2m^2w_1^2w_2^2>k^2).

✓ Checked by computer We checked by computer: substituting the rotation into LL, the q1q2q_1q_2 coefficient is 12m(w12−w22)sin2θ+kcos2θ\tfrac12m(w_1^2-w_2^2)\sin2\theta+k\cos2\theta, and with this θ\theta the coefficients of q12,q22q_1^2,q_2^2 equal −12mΩ1,22-\tfrac12m\Omega_{1,2}^2 with Ω1,22\Omega_{1,2}^2 as given.

↑ Back to the question list

A particle at a distance r from the centre of force moves under the influence of the central force F=−kr2, where k is a constant. Obtain the Lagrangian and derive the equations of motion.

2022 · Paper II · Q5d · 10 marks

Solution

Potential. For F=−k/r2F=-k/r^2 we need F=−dVdrF=-\dfrac{dV}{dr}, so V=−krV=-\dfrac kr.

Lagrangian (plane polar coordinates r,θr,\theta): L=12m(ṙ2+r2θ̇2)+kr.L=\tfrac12m\left(\dot r^2+r^2\dot\theta^2\right)+\frac kr .

Equation for rr. ddt(mṙ)−mrθ̇2+kr2=0\dfrac{d}{dt}(m\dot r)-mr\dot\theta^2+\dfrac{k}{r^2}=0, that is m(r̈−rθ̇2)=−kr2.m\left(\ddot r-r\dot\theta^2\right)=-\frac{k}{r^2}.

Equation for θ\theta. θ\theta does not appear in LL, so ddt(mr2θ̇)=0,\frac{d}{dt}\left(mr^2\dot\theta\right)=0, mr2θ̇=h(constant).mr^2\dot\theta=h\ (\text{constant}). This is conservation of angular momentum. With u=1/ru=1/r the two equations combine to d2udθ2+u=kmh2\dfrac{d^2u}{d\theta^2}+u=\dfrac{km}{h^2}, whose solutions are conics.

✓ Checked by computer We checked by computer: the Euler–Lagrange equations of L=12m(ṙ2+r2θ̇2)+k/rL=\tfrac12m(\dot r^2+r^2\dot\theta^2)+k/r are the two equations below.

↑ Back to the question list

A particle is constrained to move along a circle lying in the vertical xy-plane. With the help of the D’Alembert’s principle, show that its equation of motion is ẍy−ÿx−gx=0, where g is the acceleration due to gravity.

2021 · Paper II · Q5d · 10 marks

Solution

Let the circle be x2+y2=a2x^2+y^2=a^2 with centre OO and the yy-axis vertically upward. The particle, of mass mm, has weight (0,−mg)(0,-mg) and a reaction from the circle along the normal.

Virtual displacement. Varying the constraint, xδx+yδy=0x\,\delta x+y\,\delta y=0, so any virtual displacement is (δx,δy)=ε(−y,x)(\delta x,\delta y)=\varepsilon(-y,\ x) for small ε\varepsilon. It is tangent to the circle, so the normal reaction does no virtual work.

D’Alembert’s principle. ∑(𝐅−m𝐫̈)⋅δ𝐫=0\sum(\mathbf F-m\ddot{\mathbf r})\cdot\delta\mathbf r=0 with only the applied force 𝐅=(0,−mg)\mathbf F=(0,-mg): (0−mẍ)(−y)+(−mg−mÿ)x=0.\begin{aligned}&(0-m\ddot x)(-y)+(-mg\\ &\quad-m\ddot y)\,x=0 .\end{aligned} Dividing by mm, ẍy−ÿx−gx=0.\ddot x\,y-\ddot y\,x-gx=0 .

Check. With x=asinθx=a\sin\theta, y=−acosθy=-a\cos\theta (θ\theta from the downward vertical) this becomes a2θ̈+gasinθ=0a^2\ddot\theta+ga\sin\theta=0, the pendulum equation.

✓ Proof checked step by step Proof checked step by step (virtual displacement tangent to the circle; the normal reaction does no virtual work).

↑ Back to the question list

Obtain the Lagrangian equation for the motion of a system of two particles of unequal masses connected by an inextensible string passing over a small smooth pulley.

2021 · Paper II · Q6c · 15 marks

Solution

Let the masses be m1m_1 and m2m_2 (m1≠m2m_1\ne m_2), the string have length ll over the pulley, and xx be the depth of m1m_1 below the pulley, so m2m_2 is at depth l−xl-x. This is the Atwood machine, with one degree of freedom xx.

Energies. Both particles move with speed |ẋ||\dot x|: T=12(m1+m2)ẋ2,T=\tfrac12(m_1+m_2)\dot x^2, V=−m1gx−m2g(l−x).V=-m_1gx-m_2g(l-x).

Lagrangian. L=12(m1+m2)ẋ2+m1gx+m2g(l−x).\begin{aligned}&L=\tfrac12(m_1+m_2)\dot x^2\\ &\quad+m_1gx+m_2g(l-x).\end{aligned}

Lagrange’s equation. ddt∂L∂ẋ−∂L∂x=0\dfrac{d}{dt}\dfrac{\partial L}{\partial\dot x}-\dfrac{\partial L}{\partial x}=0 gives (m1+m2)ẍ=(m1−m2)g,(m_1+m_2)\ddot x=(m_1-m_2)g, ẍ=m1−m2m1+m2g.\ddot x=\frac{m_1-m_2}{m_1+m_2}\,g . The heavier mass descends with this constant acceleration. (Applying Newton’s law to m1m_1 alone then gives the tension 2m1m2gm1+m2\dfrac{2m_1m_2g}{m_1+m_2}.)

✓ Checked by computer We checked by computer: the Euler–Lagrange equation of L=12(m1+m2)ẋ2+m1gx+m2g(l−x)L=\tfrac12(m_1+m_2)\dot x^2+m_1gx+m_2g(l-x) gives ẍ=m1−m2m1+m2g\ddot x=\frac{m_1-m_2}{m_1+m_2}g.

↑ Back to the question list

By writing down the Hamiltonian, find the equations of motion of a particle of mass m constrained to move on the surface of a cylinder defined by x2+y2=R2, R is a constant. The particle is subject to a force directed towards the origin and proportional to the distance r of the particle from the origin given by F⃗=−kr⃗, k is a constant.

2020 · Paper II · Q6c · 20 marks

Solution

Coordinates. On the cylinder use (ϕ,z)(\phi,z): x=Rcosϕx=R\cos\phi, y=Rsinϕy=R\sin\phi, z=zz=z.

Energies. T=12m(R2ϕ̇2+ż2)T=\tfrac12m\left(R^2\dot\phi^2+\dot z^2\right). The force 𝐅=−k𝐫\mathbf F=-k\mathbf r has potential V=12kr2=12k(R2+z2)V=\tfrac12kr^2=\tfrac12k\left(R^2+z^2\right).

Hamiltonian. pϕ=mR2ϕ̇p_\phi=mR^2\dot\phi, pz=mżp_z=m\dot z, and H=pϕ22mR2+pz22m+12k(R2+z2).H=\frac{p_\phi^2}{2mR^2}+\frac{p_z^2}{2m}+\tfrac12k\left(R^2+z^2\right).

Hamilton’s equations. ϕ̇=pϕmR2,ṗϕ=0,\dot\phi=\frac{p_\phi}{mR^2},\qquad \dot p_\phi=0, ż=pzm,ṗz=−kz.\dot z=\frac{p_z}{m},\qquad \dot p_z=-kz .

Motion. pϕp_\phi is constant, so ϕ̇=ω\dot\phi=\omega is constant: the particle goes round the axis uniformly. Also z̈+kmz=0\ddot z+\dfrac km z=0, so z=Acos(k/mt+ε):z=A\cos\left(\sqrt{k/m}\,t+\varepsilon\right): simple harmonic motion along the generators, of period 2πm/k2\pi\sqrt{m/k}.

✓ Checked by computer We checked by computer: Hamilton’s equations from this HH give ṗϕ=0\dot p_\phi=0 and z̈+kmz=0\ddot z+\frac km z=0.

↑ Back to the question list

Using Hamilton’s equation, find the acceleration for a sphere rolling down a rough inclined plane, if x be the distance of the point of contact of the sphere from a fixed point on the plane.

2019 · Paper II · Q7a · 15 marks

Solution

Let the sphere have mass mm and radius aa, the plane be inclined at α\alpha, and xx be measured down the plane.

Rolling condition. No slipping means the angular velocity is ω=ẋ/a\omega=\dot x/a. Friction acts at the point of contact, which is momentarily at rest, so it does no work.

Energies. With I=25ma2I=\tfrac25ma^2 about a diameter, T=12mẋ2+12⋅25ma2⋅ẋ2a2=710mẋ2,T=\tfrac12m\dot x^2+\tfrac12\cdot\tfrac25ma^2\cdot\frac{\dot x^2}{a^2}=\tfrac7{10}m\dot x^2, V=−mgxsinα.V=-mgx\sin\alpha .

Hamiltonian. p=∂T∂ẋ=75mẋp=\dfrac{\partial T}{\partial\dot x}=\tfrac75m\dot x, so H=5p214m−mgxsinα.H=\frac{5p^2}{14m}-mgx\sin\alpha .

Hamilton’s equations. ẋ=∂H∂p=5p7m,ṗ=−∂H∂x=mgsinα.\dot x=\frac{\partial H}{\partial p}=\frac{5p}{7m},\qquad \dot p=-\frac{\partial H}{\partial x}=mg\sin\alpha . So ẍ=57mṗ=57gsinα.\ddot x=\frac{5}{7m}\,\dot p=\frac57\,g\sin\alpha .

✓ Checked by computer We checked by computer: with T=710mẋ2T=\tfrac7{10}m\dot x^2 and V=−mgxsinαV=-mgx\sin\alpha, Hamilton’s equations give ẍ=57gsinα\ddot x=\tfrac57g\sin\alpha; a numerical simulation of rolling with friction gives the same.

↑ Back to the question list

Cover of the UPSC Mains Topic-wise and Year-wise PYQs book (2013–2026)

From the Optional Province team

Strengthen your GS papers

Our UPSC Mains Topic-wise & Year-wise PYQ Book (2013–2026) maps every GS question to the syllabus, so you know what UPSC asks and how often. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

Suppose the Lagrangian of a mechanical system is given by L=12m(aẋ2+2bẋẏ+cẏ2)−12k(ax2+2bxy+cy2), where a, b, c, m(>0), k(>0) are constants and b2≠ac. Write down the Lagrangian equations of motion and identify the system.

2018 · Paper II · Q6c · 20 marks

Solution

Lagrange’s equations. ∂L∂ẋ=m(aẋ+bẏ),\frac{\partial L}{\partial\dot x}=m(a\dot x+b\dot y), ∂L∂x=−k(ax+by),\frac{\partial L}{\partial x}=-k(ax+by), ∂L∂ẏ=m(bẋ+cẏ),\frac{\partial L}{\partial\dot y}=m(b\dot x+c\dot y), ∂L∂y=−k(bx+cy).\frac{\partial L}{\partial y}=-k(bx+cy). So m(aẍ+bÿ)+k(ax+by)=0,m(bẍ+cÿ)+k(bx+cy)=0.\begin{aligned}m(a\ddot x+b\ddot y)+k(ax+by)&=0,\\ m(b\ddot x+c\ddot y)+k(bx+cy)&=0 .\end{aligned}

Uncoupling. In matrix form, with A=(abbc)A=\begin{pmatrix}a&b\\b&c\end{pmatrix} and 𝐪=(x,y)T\mathbf q=(x,y)^T, A(m𝐪̈+k𝐪)=𝟎.A\left(m\ddot{\mathbf q}+k\mathbf q\right)=\mathbf 0 . Since detA=ac−b2≠0\det A=ac-b^2\ne0, AA is invertible, so m𝐪̈+k𝐪=𝟎m\ddot{\mathbf q}+k\mathbf q=\mathbf 0: ẍ+kmx=0,ÿ+kmy=0.\ddot x+\frac km\,x=0,\qquad \ddot y+\frac km\,y=0 .

Identification. The system is a two-dimensional isotropic harmonic oscillator of angular frequency k/m\sqrt{k/m}. When AA is positive definite, aẋ2+2bẋẏ+cẏ2a\dot x^2+2b\dot x\dot y+c\dot y^2 is the squared speed in oblique coordinates, so this is the same oscillator described in non-orthogonal axes.

✓ Checked by computer We checked by computer: the Euler–Lagrange equations are as below, and multiplying by the inverse of (abbc)\begin{pmatrix}a&b\\b&c\end{pmatrix} gives ẍ+kmx=0\ddot x+\frac km x=0, ÿ+kmy=0\ddot y+\frac km y=0.

↑ Back to the question list

The Hamiltonian of a mechanical system is given by, H=p1q1−aq12+bq22−p2q2, where a, b are the constants. Solve the Hamiltonian equations and show that p2−bq2q1= constant.

2018 · Paper II · Q7c · 20 marks

Solution

Hamilton’s equations. q̇1=∂H∂p1=q1,q̇2=∂H∂p2=−q2,\dot q_1=\frac{\partial H}{\partial p_1}=q_1,\qquad \dot q_2=\frac{\partial H}{\partial p_2}=-q_2, ṗ1=−∂H∂q1=−p1+2aq1,\dot p_1=-\frac{\partial H}{\partial q_1}=-p_1+2aq_1, ṗ2=−∂H∂q2=p2−2bq2.\dot p_2=-\frac{\partial H}{\partial q_2}=p_2-2bq_2 .

Solving. The first two give q1=Aet,q2=Be−t.q_1=Ae^{t},\qquad q_2=Be^{-t}. Then ṗ1+p1=2aAet\dot p_1+p_1=2aAe^{t}. A particular solution is aAetaAe^t, so p1=aAet+Ce−t.p_1=aAe^{t}+Ce^{-t}. Next ṗ2−p2=−2bBe−t\dot p_2-p_2=-2bBe^{-t}. Trying Ke−tKe^{-t}: −2K=−2bB-2K=-2bB, so K=bBK=bB and p2=bBe−t+Det.p_2=bBe^{-t}+De^{t}. Here A,B,C,DA,B,C,D are constants.

The required quantity. p2−bq2=Det,p_2-bq_2=De^{t}, so p2−bq2q1=DetAet=DA=constant.\frac{p_2-bq_2}{q_1}=\frac{De^t}{Ae^t}=\frac DA=\text{constant}.

✓ Checked by computer We checked by computer: the solution below satisfies all four Hamilton’s equations, and (p2−bq2)/q1=D/A(p_2-bq_2)/q_1=D/A is constant.

↑ Back to the question list

Two uniform rods AB, AC, each of mass m and length 2a, are smoothly hinged together at A and move on a horizontal plane. At time t, the mass centre of the rods is at the point (ξ,η) referred to fixed perpendicular axes Ox, Oy in the plane, and the rods make angles θ±ϕ with Ox. Prove that the kinetic energy of the system is m[ξ̇2+η̇2+(13+sin2ϕ)a2θ̇2+(13+cos2ϕ)a2ϕ̇2]. Also derive Lagrange’s equations of motion for the system if an external force with components [X,Y] along the axes acts at A.

2017 · Paper II · Q6c · 20 marks

Solution

Let ABAB make angle θ+ϕ\theta+\phi and ACAC angle θ−ϕ\theta-\phi with OxOx, and let G=(ξ,η)G=(\xi,\eta) be the centre of mass of the pair.

Positions. The centres G1G_1, G2G_2 of ABAB, ACAC are at distance aa from AA along each rod, and GG is their midpoint. This gives A=G−acosϕ(cosθ,sinθ),A=G-a\cos\phi\,(\cos\theta,\ \sin\theta), G1,2=G±asinϕ(−sinθ,cosθ).G_{1,2}=G\pm a\sin\phi\,(-\sin\theta,\ \cos\theta).

Kinetic energy. Speed of G1G_1 (and of G2G_2) relative to GG squared is a2(cos2ϕϕ̇2+sin2ϕθ̇2).a^2\left(\cos^2\phi\,\dot\phi^2+\sin^2\phi\,\dot\theta^2\right). The rods spin with angular velocities θ̇±ϕ̇\dot\theta\pm\dot\phi, each with moment of inertia 13ma2\tfrac13ma^2 about its centre. So T=12(2m)(ξ̇2+η̇2)+ma2(sin2ϕθ̇2+cos2ϕϕ̇2)+16ma2[(θ̇+ϕ̇)2+(θ̇−ϕ̇)2]=m[ξ̇2+η̇2+(13+sin2ϕ)a2θ̇2+(13+cos2ϕ)a2ϕ̇2].\begin{aligned}T&=\tfrac12(2m)(\dot\xi^2+\dot\eta^2)\\ &\quad+ma^2\left(\sin^2\phi\,\dot\theta^2+\cos^2\phi\,\dot\phi^2\right)\\ &\quad+\tfrac16ma^2\left[(\dot\theta+\dot\phi)^2+(\dot\theta-\dot\phi)^2\right]\\ &=m\Big[\dot\xi^2+\dot\eta^2+\left(\tfrac13+\sin^2\phi\right)a^2\dot\theta^2\\ &\qquad+\left(\tfrac13+\cos^2\phi\right)a^2\dot\phi^2\Big].\end{aligned}

Generalized forces. The work of (X,Y)(X,Y) at AA in a virtual displacement is XδxA+YδyAX\,\delta x_A+Y\,\delta y_A. From the position of AA, Qξ=X,Qη=Y,Qθ=acosϕ(Xsinθ−Ycosθ),Qϕ=asinϕ(Xcosθ+Ysinθ).\begin{aligned}Q_\xi&=X,\qquad Q_\eta=Y,\\ Q_\theta&=a\cos\phi\,(X\sin\theta-Y\cos\theta),\\ Q_\phi&=a\sin\phi\,(X\cos\theta+Y\sin\theta).\end{aligned}

Lagrange’s equations ddt∂T∂q̇−∂T∂q=Qq\dfrac{d}{dt}\dfrac{\partial T}{\partial\dot q}-\dfrac{\partial T}{\partial q}=Q_q (the plane is horizontal, so there is no potential): 2mξ̈=X,2mη̈=Y,2m\ddot\xi=X,\qquad 2m\ddot\eta=Y, 2ma2ddt[(13+sin2ϕ)θ̇]=acosϕ(Xsinθ−Ycosθ),\begin{aligned}&2ma^2\frac{d}{dt}\left[\left(\tfrac13+\sin^2\phi\right)\dot\theta\right]\\ &\qquad=a\cos\phi\,(X\sin\theta-Y\cos\theta),\end{aligned} 2ma2(13+cos2ϕ)ϕ̈−ma2sin2ϕ(θ̇2+ϕ̇2)=asinϕ(Xcosθ+Ysinθ).\begin{aligned}&2ma^2\left(\tfrac13+\cos^2\phi\right)\ddot\phi\\ &\quad-ma^2\sin2\phi\left(\dot\theta^2+\dot\phi^2\right)\\ &\qquad=a\sin\phi\,(X\cos\theta+Y\sin\theta).\end{aligned}

✓ Checked by computer We checked by computer: building TT from the two rods’ centres and spins reproduces the printed kinetic energy, and the virtual work of (X,Y)(X,Y) at AA gives the generalized forces below.

↑ Back to the question list

Consider a single free particle of mass m, moving in space under no forces. If the particle starts from the origin at t=0 and reaches the position (x,y,z) at time τ, find the Hamilton’s characteristic function S as a function of x,y,z,τ.

2016 · Paper II · Q5c · 10 marks

Solution

A free particle has L=12m(ẋ2+ẏ2+ż2)L=\tfrac12m\left(\dot x^2+\dot y^2+\dot z^2\right), so it moves in a straight line with constant velocity. To go from the origin at t=0t=0 to (x,y,z)(x,y,z) at t=τt=\tau the velocity must be 𝐯=(xτ,yτ,zτ).\mathbf v=\left(\frac x\tau,\ \frac y\tau,\ \frac z\tau\right).

Hamilton’s function. SS is the action along the actual path: S=∫0τLdt=12mx2+y2+z2τ2⋅τ,S=\int_0^\tau L\,dt=\tfrac12m\,\frac{x^2+y^2+z^2}{\tau^2}\cdot\tau, S(x,y,z,τ)=m(x2+y2+z2)2τ.S(x,y,z,\tau)=\frac{m\left(x^2+y^2+z^2\right)}{2\tau}.

Checks. ∂S/∂x=mx/τ=px\partial S/\partial x=mx/\tau=p_x (and similarly for y,zy,z), and ∂S∂τ=−m(x2+y2+z2)2τ2=−E,\frac{\partial S}{\partial\tau}=-\frac{m(x^2+y^2+z^2)}{2\tau^2}=-E, so SS satisfies the Hamilton–Jacobi equation ∂S∂τ+|∇S|22m=0\dfrac{\partial S}{\partial\tau}+\dfrac{|\nabla S|^2}{2m}=0.

(Strictly, a function of x,y,zx,y,z and the time τ\tau is Hamilton’s principal function. The characteristic function, in terms of the energy EE, is W=2mEx2+y2+z2W=\sqrt{2mE}\,\sqrt{x^2+y^2+z^2}.)

✓ Checked by computer We checked by computer: S=m(x2+y2+z2)2τS=\frac{m(x^2+y^2+z^2)}{2\tau} equals ∫0τLdt\int_0^\tau L\,dt along the straight-line path and satisfies the Hamilton–Jacobi equation ∂S/∂τ+|∇S|2/2m=0\partial S/\partial\tau+|\nabla S|^2/2m=0.

↑ Back to the question list

A hoop with radius r is rolling, without slipping, down an inclined plane of length l and with angle of inclination ϕ. Assign appropriate generalized coordinates to the system. Determine the constraints, if any. Write down the Lagrangian equations for the system. Hence or otherwise determine the velocity of the hoop at the bottom of the inclined plane.

2016 · Paper II · Q8b · 15 marks

Solution

Generalized coordinates. Let xx be the distance moved down the plane by the centre and θ\theta the angle turned by the hoop (mass mm, radius rr).

Constraint. Rolling without slipping: x=rθx=r\theta (that is, ẋ−rθ̇=0\dot x-r\dot\theta=0). It is holonomic, so the system has one degree of freedom.

Lagrangian. The hoop’s moment of inertia about its axis is mr2mr^2, so T=12mẋ2+12mr2θ̇2,V=−mgxsinϕ,T=\tfrac12m\dot x^2+\tfrac12mr^2\dot\theta^2,\qquad V=-mgx\sin\phi, L=12mẋ2+12mr2θ̇2+mgxsinϕ.L=\tfrac12m\dot x^2+\tfrac12mr^2\dot\theta^2+mgx\sin\phi .

Lagrange’s equations with multiplier λ\lambda for x−rθ=0x-r\theta=0: mẍ−mgsinϕ=λ,mr2θ̈=−λr.m\ddot x-mg\sin\phi=\lambda,\qquad mr^2\ddot\theta=-\lambda r . With θ̈=ẍ/r\ddot\theta=\ddot x/r, the second gives λ=−mẍ\lambda=-m\ddot x. Then 2mẍ=mgsinϕ,ẍ=12gsinϕ.2m\ddot x=mg\sin\phi,\qquad \ddot x=\tfrac12g\sin\phi . (−λ=12mgsinϕ-\lambda=\tfrac12mg\sin\phi is the friction force up the plane.)

Speed at the bottom. Starting from rest and rolling a distance ll, v2=2⋅12gsinϕ⋅l,v=glsinϕ.v^2=2\cdot\tfrac12g\sin\phi\cdot l,\qquad v=\sqrt{gl\sin\phi}.

✓ Checked by computer We checked by computer: eliminating the multiplier gives ẍ=12gsinϕ\ddot x=\tfrac12g\sin\phi, so v2=glsinϕv^2=gl\sin\phi at the bottom; a simulation of the rolling hoop gives the same speed.

↑ Back to the question list

Solve the plane pendulum problem using the Hamiltonian approach and show that H is a constant of motion.

2015 · Paper II · Q6b · 15 marks

Solution

Let the bob have mass mm on a light rod of length ll, with θ\theta measured from the downward vertical.

Lagrangian. L=12ml2θ̇2+mglcosθ.L=\tfrac12ml^2\dot\theta^2+mgl\cos\theta .

Hamiltonian. pθ=ml2θ̇p_\theta=ml^2\dot\theta, so H=pθθ̇−L=pθ22ml2−mglcosθ.H=p_\theta\dot\theta-L=\frac{p_\theta^2}{2ml^2}-mgl\cos\theta .

Hamilton’s equations. θ̇=∂H∂pθ=pθml2,\dot\theta=\frac{\partial H}{\partial p_\theta}=\frac{p_\theta}{ml^2}, ṗθ=−∂H∂θ=−mglsinθ.\dot p_\theta=-\frac{\partial H}{\partial\theta}=-mgl\sin\theta . Eliminating pθp_\theta: θ̈+glsinθ=0,\ddot\theta+\frac gl\sin\theta=0, which is θ̈+glθ=0\ddot\theta+\dfrac gl\theta=0 (period 2πl/g2\pi\sqrt{l/g}) for small swings.

HH is a constant of motion. Along a solution, dHdt=∂H∂θθ̇+∂H∂pθṗθ+∂H∂t.\frac{dH}{dt}=\frac{\partial H}{\partial\theta}\dot\theta+\frac{\partial H}{\partial p_\theta}\dot p_\theta+\frac{\partial H}{\partial t}. By Hamilton’s equations the first two terms are ∂H∂θ∂H∂pθ−∂H∂pθ∂H∂θ=0\dfrac{\partial H}{\partial\theta}\dfrac{\partial H}{\partial p_\theta}-\dfrac{\partial H}{\partial p_\theta}\dfrac{\partial H}{\partial\theta}=0, and ∂H/∂t=0\partial H/\partial t=0. So H=12ml2θ̇2−mglcosθH=\tfrac12ml^2\dot\theta^2-mgl\cos\theta, the total energy, is constant.

✓ Checked by computer We checked by computer: Hamilton’s equations from this HH give θ̈+glsinθ=0\ddot\theta+\frac gl\sin\theta=0, and dH/dtdH/dt vanishes along every solution.

↑ Back to the question list

A Hamiltonian of a system with one degree of freedom has the form H=p22α−bqpe−αt+bα2q2e−αt(α+be−αt)+k2q2 where α, b, k are constants, q is the generalized coordinate and p is the corresponding generalized momentum. (i) Find a Lagrangian corresponding to this Hamiltonian. (ii) Find an equivalent Lagrangian that is not explicitly dependent on time.

2015 · Paper II · Q7c · 20 marks

Solution

Write E=e−αtE=e^{-\alpha t}.

(i) A Lagrangian. From q̇=∂H∂p=pα−bqE\dot q=\dfrac{\partial H}{\partial p}=\dfrac p\alpha-bqE, p=α(q̇+bqE).p=\alpha\left(\dot q+bqE\right). Substituting into HH, the terms in qq̇Eq\dot qE and q2E2q^2E^2 cancel and H=12αq̇2+12α2bq2E+12kq2.H=\tfrac12\alpha\dot q^2+\tfrac12\alpha^2bq^2E+\tfrac12kq^2 . Then L=pq̇−HL=p\dot q-H with pq̇=αq̇2+αbqq̇Ep\dot q=\alpha\dot q^2+\alpha bq\dot qE: L=12αq̇2+αbqq̇e−αt−12α2bq2e−αt−12kq2.\begin{aligned}L&=\tfrac12\alpha\dot q^2+\alpha bq\dot q\,e^{-\alpha t}\\ &\quad-\tfrac12\alpha^2bq^2e^{-\alpha t}-\tfrac12kq^2 .\end{aligned}

(ii) A time-independent equivalent. The two middle terms form a total derivative: ddt(12αbq2e−αt)=αbqq̇e−αt−12α2bq2e−αt.\frac{d}{dt}\left(\tfrac12\alpha b\,q^2e^{-\alpha t}\right)=\alpha bq\dot q\,e^{-\alpha t}-\tfrac12\alpha^2bq^2e^{-\alpha t}. Adding a total time derivative to LL does not change Lagrange’s equations, so an equivalent Lagrangian is L′=12αq̇2−12kq2.L'=\tfrac12\alpha\dot q^2-\tfrac12kq^2 . It has no explicit tt: the system is a harmonic oscillator, αq̈+kq=0\alpha\ddot q+kq=0.

✓ Checked by computer We checked by computer: the Legendre transform of this LL gives back the given HH, and the difference between the two Lagrangians is exactly ddt(12αbq2e−αt)\frac{d}{dt}\left(\tfrac12\alpha b\,q^2e^{-\alpha t}\right).

↑ Back to the question list

Find the equation of motion of a compound pendulum using Hamilton’s equations.

2014 · Paper II · Q5e · 10 marks

Solution

Let the body have mass MM, swing about a fixed horizontal axis, have its centre of gravity GG at distance hh from the axis, and moment of inertia I=M(k2+h2)I=M(k^2+h^2) about the axis (kk is the radius of gyration about the parallel axis through GG). Let θ\theta be the angle between the line from the axis to GG and the downward vertical.

Lagrangian and Hamiltonian. L=12Iθ̇2+Mghcosθ.L=\tfrac12I\dot\theta^2+Mgh\cos\theta . pθ=Iθ̇p_\theta=I\dot\theta, so H=pθ22I−Mghcosθ.H=\frac{p_\theta^2}{2I}-Mgh\cos\theta .

Hamilton’s equations. θ̇=pθI,ṗθ=−Mghsinθ.\dot\theta=\frac{p_\theta}{I},\qquad \dot p_\theta=-Mgh\sin\theta . So θ̈+MghIsinθ=0,\ddot\theta+\frac{Mgh}{I}\sin\theta=0, i.e.\text{i.e.} θ̈+ghk2+h2sinθ=0.\ddot\theta+\frac{gh}{k^2+h^2}\sin\theta=0 . For small oscillations the period is 2πk2+h2gh,2\pi\sqrt{\frac{k^2+h^2}{gh}}, the same as a simple pendulum of length k2+h2h\dfrac{k^2+h^2}{h}.

✓ Checked by computer We checked by computer: Hamilton’s equations from this HH give Iθ̈+Mghsinθ=0I\ddot\theta+Mgh\sin\theta=0.

↑ Back to the question list

Two equal rods AB and BC, each of length l, smoothly jointed at B, are suspended from A and oscillate in a vertical plane through A. Show that the periods of normal oscillations are 2πn where n2=(3±67)gl.

2013 · Paper II · Q8a · 15 marks

Solution

Let each rod have mass mm, and let ABAB and BCBC make small angles θ\theta and ϕ\phi with the downward vertical.

Kinetic energy. ABAB turns about AA: T1=12⋅13ml2θ̇2T_1=\tfrac12\cdot\tfrac13ml^2\dot\theta^2. For BCBC, BB moves with speed lθ̇l\dot\theta and the centre of BCBC moves relative to BB with speed 12lϕ̇\tfrac12l\dot\phi. For small angles, T2=12m(l2θ̇2+14l2ϕ̇2+l2θ̇ϕ̇)+12⋅112ml2ϕ̇2.\begin{aligned}&T_2=\tfrac12m\left(l^2\dot\theta^2+\tfrac14l^2\dot\phi^2+l^2\dot\theta\dot\phi\right)\\ &\quad+\tfrac12\cdot\tfrac1{12}ml^2\dot\phi^2 .\end{aligned} Adding, T=12ml2(43θ̇2+θ̇ϕ̇+13ϕ̇2).T=\tfrac12ml^2\left(\tfrac43\dot\theta^2+\dot\theta\dot\phi+\tfrac13\dot\phi^2\right).

Potential energy. The centres are at depths 12lcosθ\tfrac12l\cos\theta and lcosθ+12lcosϕl\cos\theta+\tfrac12l\cos\phi. So, up to a constant and to second order, V=12mgl(32θ2+12ϕ2).V=\tfrac12mgl\left(\tfrac32\theta^2+\tfrac12\phi^2\right).

Lagrange’s equations (divide by ml2ml^2): 43θ̈+12ϕ̈+3g2lθ=0,\tfrac43\ddot\theta+\tfrac12\ddot\phi+\frac{3g}{2l}\theta=0, 12θ̈+13ϕ̈+g2lϕ=0.\tfrac12\ddot\theta+\tfrac13\ddot\phi+\frac{g}{2l}\phi=0 .

Normal modes. Put θ,ϕ∝cosnt\theta,\phi\propto\cos nt and s=n2l/gs=n^2l/g: ∣32−43s−12s−12s12−13s∣=0.\begin{vmatrix}\tfrac32-\tfrac43s&-\tfrac12s\\ -\tfrac12s&\tfrac12-\tfrac13s\end{vmatrix}=0 . Expanding and multiplying by 3636: 7s2−42s+27=0.7s^2-42s+27=0 . So s=42±1764−75614=3±12714=3±67.\begin{aligned}s&=\frac{42\pm\sqrt{1764-756}}{14}\\ &=3\pm\frac{12\sqrt7}{14}\\ &=3\pm\frac{6}{\sqrt7}.\end{aligned} Hence n2=(3±67)gl,n^2=\left(3\pm\frac{6}{\sqrt7}\right)\frac gl, and the periods of the normal oscillations are 2πn\dfrac{2\pi}{n}.

✓ Checked by computer We checked by computer: the frequency determinant gives 7s2−42s+27=07s^2-42s+27=0 with s=n2l/gs=n^2l/g, whose roots are s=3±6/7s=3\pm6/\sqrt7; a simulation of the linearised equations confirms both periods.

↑ Back to the question list

Obtain the equations governing the motion of a spherical pendulum.

2012 · Paper II · Q5d · 12 marks

Solution

A spherical pendulum is a particle of mass mm on a light rod (or taut string) of length ll, free to move on the sphere of radius ll about the fixed point OO. Use spherical polars: θ\theta from the downward vertical and azimuth ϕ\phi.

Lagrangian. T=12ml2(θ̇2+sin2θϕ̇2),T=\tfrac12ml^2\left(\dot\theta^2+\sin^2\theta\,\dot\phi^2\right), V=−mglcosθ,V=-mgl\cos\theta, L=12ml2(θ̇2+sin2θϕ̇2)+mglcosθ.L=\tfrac12ml^2\left(\dot\theta^2+\sin^2\theta\,\dot\phi^2\right)+mgl\cos\theta .

Equation for θ\theta. θ̈−sinθcosθϕ̇2+glsinθ=0.\ddot\theta-\sin\theta\cos\theta\,\dot\phi^2+\frac gl\sin\theta=0 .

Equation for ϕ\phi. ϕ\phi does not appear in LL, so sin2θϕ̇=h(constant),\sin^2\theta\,\dot\phi=h\ (\text{constant}), the conservation of angular momentum about the vertical.

Energy integral. LL has no explicit tt, so 12l2(θ̇2+sin2θϕ̇2)−glcosθ=constant.\tfrac12l^2\left(\dot\theta^2+\sin^2\theta\,\dot\phi^2\right)-gl\cos\theta=\text{constant}. Using ϕ̇=h/sin2θ\dot\phi=h/\sin^2\theta, this gives a first-order equation for θ\theta alone: θ̇2+h2sin2θ−2glcosθ=constant.\dot\theta^2+\frac{h^2}{\sin^2\theta}-\frac{2g}{l}\cos\theta=\text{constant}.

✓ Checked by computer We checked by computer: the Euler–Lagrange equations of this LL are the two equations below, and the energy expression is constant along them.

↑ Back to the question list

A sphere of radius a and mass m rolls down a rough plane inclined at an angle α to the horizontal. If x be the distance of the point of contact of the sphere from a fixed point on the plane, find the acceleration by using Hamilton’s equations.

2010 · Paper II · Q8a · 30 marks

Solution

Set-up. Let the sphere have mass mm and radius aa, xx be the distance of the point of contact from a fixed point OO of the plane, measured down the line of greatest slope, and θ\theta the angle the sphere has turned through.

Constraint. Rolling (no slipping) means the point of contact has zero velocity: ẋ=aθ̇\dot x=a\dot\theta. The friction and the normal reaction act at that point, so they do no work and the system is conservative with one degree of freedom xx.

Energies. The centre moves with speed ẋ\dot x, and I=25ma2I=\tfrac25ma^2: T=12mẋ2+12⋅25ma2⋅ẋ2a2=710mẋ2.T=\tfrac12m\dot x^2+\tfrac12\cdot\tfrac25ma^2\cdot\frac{\dot x^2}{a^2}=\tfrac7{10}m\dot x^2 . The centre descends xsinαx\sin\alpha as the contact point moves xx, so V=−mgxsinαV=-mgx\sin\alpha (plus a constant).

Hamiltonian. L=710mẋ2+mgxsinαL=\tfrac7{10}m\dot x^2+mgx\sin\alpha, so p=∂L∂ẋ=75mẋ,p=\frac{\partial L}{\partial\dot x}=\tfrac75m\dot x, H=pẋ−L=5p214m−mgxsinα.H=p\dot x-L=\frac{5p^2}{14m}-mgx\sin\alpha .

Hamilton’s equations. ẋ=∂H∂p=5p7m,ṗ=−∂H∂x=mgsinα.\dot x=\frac{\partial H}{\partial p}=\frac{5p}{7m},\qquad \dot p=-\frac{\partial H}{\partial x}=mg\sin\alpha . Differentiating the first and using the second, ẍ=57mṗ=57gsinα.\ddot x=\frac{5}{7m}\dot p=\frac57\,g\sin\alpha .

Result. The acceleration is constant, 57gsinα\tfrac57g\sin\alpha, which is 57\tfrac57 of the value for a smooth plane. Starting from rest at OO, x=514gsinαt2x=\tfrac5{14}g\sin\alpha\,t^2. The energy integral H=constantH=\text{constant} gives the same result: 710mẋ2=mgxsinα\tfrac7{10}m\dot x^2=mgx\sin\alpha.

✓ Checked by computer We checked by computer: with T=710mẋ2T=\tfrac7{10}m\dot x^2 and V=−mgxsinαV=-mgx\sin\alpha, Hamilton’s equations give ẍ=57gsinα\ddot x=\tfrac57g\sin\alpha; a numerical simulation of rolling with friction gives the same.

↑ Back to the question list

More on Mechanics and Fluid Dynamics

Questions: UPSC Civil Services (Main) Examination, Mathematics Paper II, 2010–2026. Solutions: Optional Province. Found an error? Tell us.

Spotted an error? Tell us.

We classify every PYQ with care, but mistakes can slip in. If a question is in the wrong topic, has a typo, the wrong year, or is missing, let us know. We review every report and update the page.

Report an Error
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted