Advanced Physics‹›⌂ 0:00 studied

Module 1 · 8 min read · Free chapter

Constraints, generalised coordinates, Lagrange's equations, Hamilton's principle and Hamilton's equations

What are you preparing for? We show the practice and previous year questions of your exam.

Start from zero: why another way to do mechanics?

Newton's laws work, but try them on a bead sliding on a spinning wire hoop. You must find the normal force from the wire, which you do not know and do not care about, at every instant. For a double pendulum or a spinning top, the force diagrams become a mess.

In 1788 Lagrange found a way around this. Describe the system by as few numbers as it really needs, write down one scalar, the kinetic minus the potential energy, and turn a handle. Constraint forces never appear.

Hamilton later recast the same mechanics as a principle about whole paths and as pairs of first-order equations. These forms are the direct ancestors of quantum mechanics and field theory.

Constraints and generalised coordinates

A constraint restricts the motion. A simple pendulum's bob must stay at distance l from the pivot: x2+y2=l2x^2 + y^2 = l^2. Constraints that can be written as equations among the coordinates and time, f(r⃗1,…,t)=0f(\vec r_1,\dots,t) = 0, are holonomic. Each one removes one coordinate.

N free particles need 3N coordinates; with k holonomic constraints only n=3N−kn = 3N - k are independent. These are the degrees of freedom, and any n independent quantities that fix the configuration are generalised coordinates q1,…,qnq_1,\dots,q_n. For the pendulum one angle θ is enough.

Non-holonomic constraints cannot be written this way. Gas molecules inside a box obey an inequality, r≤ar \le a. A coin rolling without slipping on a table obeys a relation among velocities that cannot be integrated into one among positions. Constraints are also scleronomic if they do not involve time and rheonomic if they do, like a bead on a hoop that is forced to rotate.

Ideal constraint forces do no work in any allowed (virtual) displacement: a frictionless wire pushes perpendicular to the bead's motion. This is the key assumption that lets them drop out.

Lagrange's equations

Define the Lagrangian as kinetic energy minus potential energy, written in generalised coordinates and velocities:

L(q,q˙,t)=T−VL(q,\dot q,t) = T - V

Starting from D'Alembert's principle (virtual work of constraint forces is zero), one obtains for each coordinate

ddt(∂L∂q˙j)−∂L∂qj=0,j=1,…,n\frac{d}{dt}\left(\frac{\partial L}{\partial\dot q_j}\right) - \frac{\partial L}{\partial q_j} = 0, \qquad j = 1,\dots,n

Worked example 1: simple pendulum. With θ as the coordinate, T=12ml2θ˙2T = \dfrac{1}{2}ml^2\dot\theta^2 and V=−mglcos⁡θV = -mgl\cos\theta. Then ∂L∂θ˙=ml2θ˙\dfrac{\partial L}{\partial\dot\theta} = ml^2\dot\theta and ∂L∂θ=−mglsin⁡θ\dfrac{\partial L}{\partial\theta} = -mgl\sin\theta, giving θ¨+glsin⁡θ=0\ddot\theta + \dfrac{g}{l}\sin\theta = 0 in two lines, with no tension in sight.

Conjugate momentum and cyclic coordinates. The quantity pj=∂L∂q˙jp_j = \dfrac{\partial L}{\partial\dot q_j} is the generalised momentum conjugate to qjq_j. If L does not contain qjq_j at all, the coordinate is cyclic and Lagrange's equation says p˙j=0\dot p_j = 0: that momentum is conserved. For a planet, L=12m(r˙2+r2ϕ˙2)+GMmrL = \dfrac{1}{2}m(\dot r^2 + r^2\dot\phi^2) + \dfrac{GMm}{r} has no φ, so pϕ=mr2ϕ˙p_\phi = mr^2\dot\phi, the angular momentum, is constant. That is Kepler's second law, read straight off the Lagrangian.

This is a deep pattern (Noether's theorem): invariance under time shifts gives energy conservation, under translations momentum conservation, and under rotations angular-momentum conservation.

Hamilton's principle

Instead of following the motion instant by instant, look at the whole path between a start at t1t_1 and an end at t2t_2. For every imaginable path q(t) with those fixed end points, compute the action

S=∫t1t2L(q,q˙,t) dtS = \int_{t_1}^{t_2}L(q,\dot q,t)\,dt

Hamilton's principle says the path nature actually takes is the one for which S is stationary: δS=0\delta S = 0 for every small variation δq(t) that vanishes at the ends.

Derivation of Lagrange's equations. Vary the path, q→q+δqq \to q + \delta q:

δS=∫t1t2(∂L∂qδq+∂L∂q˙δq˙)dt\delta S = \int_{t_1}^{t_2}\left(\frac{\partial L}{\partial q}\delta q + \frac{\partial L}{\partial\dot q}\delta\dot q\right)dt

Integrate the second term by parts, using δq˙=ddtδq\delta\dot q = \dfrac{d}{dt}\delta q. The boundary term [∂L∂q˙δq]t1t2\left[\dfrac{\partial L}{\partial\dot q}\delta q\right]_{t_1}^{t_2} vanishes because δq = 0 at the ends, leaving

δS=∫t1t2(∂L∂q−ddt∂L∂q˙)δq dt=0\delta S = \int_{t_1}^{t_2}\left(\frac{\partial L}{\partial q} - \frac{d}{dt}\frac{\partial L}{\partial\dot q}\right)\delta q\,dt = 0

Since δq(t) is arbitrary, the bracket must vanish at every instant: these are the Euler-Lagrange equations. The derivation needs independent variations δq, so it holds directly for holonomic systems; non-holonomic constraints need Lagrange multipliers.

Why it matters. The same idea runs through physics. Light takes the path of stationary time (Fermat's principle). In quantum mechanics, Feynman showed every path contributes, weighted by eiSℏe^{\frac{iS}{\hbar}}, and the classical path is where they add up constructively.

Worked examples: Atwood machine and a bead on a rotating hoop

Worked example 2: Atwood machine. Masses m1m_1 and m2m_2 hang over a light pulley by a string of fixed length. One coordinate x (the drop of m1m_1) is enough. T=12(m1+m2)x˙2T = \dfrac{1}{2}(m_1 + m_2)\dot x^2 and V=−m1gx−m2g(l−x)V = -m_1gx - m_2g(l - x). Lagrange's equation gives

x¨=m1−m2m1+m2 g\ddot x = \frac{m_1 - m_2}{m_1 + m_2}\,g

with no string tension in the working.

Worked example 3: bead on a hoop rotating with angular speed ω. A smooth circular hoop of radius R spins about its vertical diameter; θ is the bead's angle from the bottom. The bead's speed has a part along the hoop, Rθ˙R\dot\theta, and a part from the rotation, ωRsin⁡θ\omega R\sin\theta. So

L=12mR2(θ˙2+ω2sin⁡2θ)+mgRcos⁡θL = \frac{1}{2}mR^2\left(\dot\theta^2 + \omega^2\sin^2\theta\right) + mgR\cos\theta
θ¨=sin⁡θ(ω2cos⁡θ−gR)\ddot\theta = \sin\theta\left(\omega^2\cos\theta - \frac{g}{R}\right)

Equilibria are at θ = 0 and, when ω2>gR\omega^2 > \dfrac{g}{R}, at cos⁡θ0=gω2R\cos\theta_0 = \dfrac{g}{\omega^2R}. Below the critical speed the bead rests at the bottom; above it the bottom becomes unstable and the bead rides up to θ0\theta_0. Here the constraint is rheonomic, and HH is conserved but is not equal to T + V.

The Hamiltonian and Hamilton's equations

Lagrange gives n second-order equations in the qjq_j. Hamilton trades them for 2n first-order equations in the qjq_j and their momenta pj=∂L∂q˙jp_j = \dfrac{\partial L}{\partial\dot q_j}. Define the Hamiltonian

H(q,p,t)=∑jpjq˙j−LH(q,p,t) = \sum_j p_j\dot q_j - L

written entirely in terms of q and p. Then

q˙j=∂H∂pj,p˙j=−∂H∂qj,dHdt=∂H∂t\dot q_j = \frac{\partial H}{\partial p_j}, \qquad \dot p_j = -\frac{\partial H}{\partial q_j}, \qquad \frac{dH}{dt} = \frac{\partial H}{\partial t}

If H has no explicit time dependence, it is conserved. When the constraints do not depend on time and V does not depend on velocities, T is quadratic in the velocities and H = T + V, the total energy.

Worked example 4: harmonic oscillator. L=12mx˙2−12kx2L = \dfrac{1}{2}m\dot x^2 - \dfrac{1}{2}kx^2 gives p=mx˙p = m\dot x and H=p22m+12kx2H = \dfrac{p^2}{2m} + \dfrac{1}{2}kx^2. Hamilton's equations: x˙=pm\dot x = \dfrac{p}{m}, p˙=−kx\dot p = -kx. In the (x, p) plane, called phase space, each motion is an ellipse of constant H.

Why it matters. The Hamiltonian is the doorway to quantum mechanics: replacing p by −iℏ∂∂x-i\hbar\dfrac{\partial}{\partial x} turns H into the operator in Schrödinger's equation (the Schrödinger equation). Phase space is also the stage for statistical mechanics.

Mains lens: how UPSC asks this

Lagrangian mechanics is named in the Physics optional syllabus and spelt out in more detail in the Forest Service syllabus. Recent papers have asked candidates to derive Lagrange's equations from Hamilton's principle (15 marks), to derive the Euler-Lagrange equations for a holonomic system with n degrees of freedom and say whether the method applies to non-holonomic systems (15 marks), to write the Lagrangian and equations of motion for a given system (10 to 20 marks), and to find the Lagrangian of a symmetric top and its conserved momenta (15 marks).

Expect:

  • Concepts (10 marks): holonomic and non-holonomic constraints with examples; degrees of freedom; cyclic coordinates.
  • Derivations (15 marks): Lagrange's equations from Hamilton's principle; Hamilton's equations from L.
  • Applications (10 to 20 marks): pendulum, Atwood machine, bead on a rotating wire, central force, spherical pendulum.

Model answer plan: "Derive the Euler-Lagrange equations from Hamilton's principle for a holonomic system with n degrees of freedom. Can it be applied to non-holonomic systems?" (15 marks).

  1. State the principle: δ∫t1t2L dt=0\delta\int_{t_1}^{t_2}L\,dt = 0 with fixed end points.
  2. Vary each qjq_j; integrate the δq˙j\delta\dot q_j term by parts; boundary terms vanish.
  3. Holonomic ⇒ the n variations δqj\delta q_j are independent ⇒ each bracket vanishes.
  4. Write the n Euler-Lagrange equations; one example such as the pendulum.
  5. Non-holonomic: the δq are not independent; the method needs Lagrange multipliers (or fails for inequalities).

Quick revision

  • Degrees of freedom n=3N−kn = 3N - k (k holonomic constraints).
  • Holonomic: f(q,t)=0f(q,t) = 0; non-holonomic: velocity relations or inequalities.
  • L=T−VL = T - V; ddt∂L∂q˙j=∂L∂qj\dfrac{d}{dt}\dfrac{\partial L}{\partial\dot q_j} = \dfrac{\partial L}{\partial q_j}.
  • Cyclic coordinate ⇒ pjp_j conserved.
  • Hamilton's principle: δ∫L dt=0\delta\int L\,dt = 0.
  • H=∑pq˙−LH = \sum p\dot q - L; q˙=∂H∂p\dot q = \dfrac{\partial H}{\partial p}, p˙=−∂H∂q\dot p = -\dfrac{\partial H}{\partial q}; H = T + V for natural systems.
  • Rotating hoop: bead leaves the bottom when ω2>gR\omega^2 > \dfrac{g}{R}.

Mains answer practice

Write your answer first, then open the points a good answer should cover.

  1. Distinguish between holonomic and non-holonomic constraints, and between scleronomic and rheonomic constraints, with one example of each. What are generalised coordinates?

    Show answer points
    • holonomic: f(q,t)=0, e.g. pendulum
    • non-holonomic: inequality or non-integrable velocity relation, e.g. gas in box, rolling coin
    • scleronomic vs rheonomic: time-free vs time-dependent
    • n = 3N - k independent generalised coordinates
  2. Write the Lagrangian of an Atwood machine and obtain its acceleration. Why does the string tension not appear?

    Show answer points
    • one coordinate x
    • T = ½(m1+m2)ẋ², V = -m1gx - m2g(l-x)
    • ẍ = (m1-m2)g/(m1+m2)
    • ideal constraint forces do no virtual work
  3. Derive the Euler-Lagrange equations from Hamilton's principle for a holonomic system with n degrees of freedom. Can it be applied to non-holonomic systems?

    Show answer points
    • δ∫L dt = 0 with fixed end points
    • integrate δq̇ term by parts; boundary terms vanish
    • independent δq_j ⇒ each bracket zero
    • non-holonomic: δq not independent; Lagrange multipliers needed
  4. A bead slides on a smooth circular hoop of radius R rotating with constant angular speed ω about its vertical diameter. Write the Lagrangian, obtain the equation of motion and find the equilibrium positions and their stability.

    Show answer points
    • L = ½mR²(θ̇² + ω²sin²θ) + mgR cos θ
    • θ̈ = sin θ(ω² cos θ - g/R)
    • equilibria θ = 0 and cos θ0 = g/(ω²R) if ω² > g/R
    • bottom unstable above critical speed
    • rheonomic: H conserved but ≠ T + V
  5. Define the Hamiltonian and obtain Hamilton's equations for a one-dimensional harmonic oscillator. Show the motion in phase space.

    Show answer points
    • p = mẋ, H = p²/2m + ½kx²
    • ẋ = p/m, ṗ = -kx
    • H conserved: no explicit t
    • phase-space orbit an ellipse
  6. What is a cyclic coordinate? Using the Lagrangian of a particle in a central field, show that angular momentum is conserved.

    Show answer points
    • cyclic: q absent from L ⇒ p conserved
    • L = ½m(ṙ² + r²φ̇²) - V(r)
    • φ cyclic ⇒ mr²φ̇ = const
    • Noether: symmetry ⇔ conservation

Previous year questions

Previous year questions for UPSC CSE will appear here once each one is checked word for word against the official question paper.

Learn with AI

A tutor that asks instead of telling, a partner that argues the other side, and this chapter told through your own district.

Tell the tutor what you are stuck on. It will guide you with questions and give the answer after a few tries.

🙋 Raise a doubt or feedback

Stuck somewhere, or spotted a mistake? Write to the ExamHike team. We usually reply within a day, and you will see the reply on My progress.

Log in to ask a doubt or send feedback →

More in this module: Mechanics of particles

Official sources

Facts in this chapter were checked against these official sources.

  1. IGNOU PHE-01 Elementary Mechanics and BPHCT-131 Block 4: Lagrangian and Hamiltonian formulations
  2. MIT OpenCourseWare 8.09 Classical Mechanics III, lecture notes on Lagrangian mechanics