Home / Learn / Exam prep / GATE Physics / Lesson 2.1
All lessons

Module 2: Classical mechanics · Lesson 2.1 · about 50 min

Lagrangian mechanics

Generalised coordinates, constraints and degrees of freedom, d'Alembert's principle, the Euler-Lagrange equations, cyclic coordinates and conserved momenta, Noether's theorem, velocity-dependent potentials, Lagrange multipliers and Hamilton's principle, with the shortcuts GATE and NET reward.

Key points, meanings and formulas on one page: choose "Save as PDF" in the print box.

Module 2 · about 50 minutes. By the end you will be able to count degrees of freedom, choose generalised coordinates, write a Lagrangian and get the equations of motion from it, spot conserved quantities without solving anything, handle a charge in a magnetic field, and find a constraint force with a Lagrange multiplier.

Newton’s laws in vectors are covered in the JAM lesson on Newton’s laws and frames. Here the same physics is written in a form that works in any coordinates and makes conservation laws easy to see.

Write one scalar, L = T − V, in whatever coordinates suit the problem. The equations of motion, the conserved quantities and even the constraint forces all come out of it by differentiation.

1. Constraints and generalised coordinates

A system of N particles needs 3N coordinates. A holonomic constraint is an equation f(r→1,…,r→N,t)=0 that removes one of them: a rigid rod fixes a distance, a bead on a wire must sit on a curve. With k such constraints there are n=3N−k degrees of freedom, and any n independent quantities q1,…,qn that fix the configuration are generalised coordinates: angles, distances, or anything else.

Constraints that cannot be written that way are non-holonomic, for example r≥R (a particle outside a sphere) or rolling without slipping on a plane, where the condition ties velocities together and cannot be integrated. A constraint that depends on time (a bead on a wire that is being turned) is rheonomic; one that does not is scleronomic.

Worked example. A rigid body is N particles with fixed distances between every pair. Fix three points that are not in a line: that is 9 coordinates and 3 distances, so 6 degrees of freedom, and every other particle is then fixed. Three of them say where the centre is and three (for example the Euler angles) say how the body is turned.

2. From d’Alembert to the Euler-Lagrange equations

Ideal constraint forces (a smooth wire, a rigid rod) do no work in a virtual displacement, an instant small change allowed by the constraints. Newton’s second law then gives d’Alembert’s principle, ∑i(F→i−p→˙i)⋅δr→i=0, with only the applied forces. Rewriting it in the qj:

Change variables. ri = ri(q, t), so δri = Σj (∂ri/∂qj) δqj, with no δt term (virtual means at one instant).

Generalised force. The applied part becomes Σj Qj δqj, with Qj = Σi Fi·∂ri/∂qj. For a conservative force, Qj = −∂V/∂qj.

Two identities. ∂ṙi/∂q̇j = ∂ri/∂qj and d/dt(∂ri/∂qj) = ∂ṙi/∂qj turn the inertia term into d/dt(∂T/∂q̇j) − ∂T/∂qj.

Independence. The δqj are independent, so each coefficient vanishes separately. With V independent of q̇, put L = T − V.

ddt∂L∂q˙j−∂L∂qj=0,j=1,…,n
qj, q̇j
a generalised coordinate and its generalised velocity, treated as independent variables in L
pj = ∂L/∂q̇j
the canonical (conjugate) momentum; it is mẋ for a Cartesian coordinate and an angular momentum for an angle
∂L/∂qj
the generalised force, including the "fictitious" centrifugal terms that come from T
n equations
one second-order equation for each degree of freedom, with no constraint forces in sight
Physical meaning
Each equation says "rate of change of the momentum belonging to qj = the force belonging to qj", which is Newton's second law in whatever coordinates you chose.

Worked example: the Atwood machine with a heavy pulley. Masses m1>m2 hang over a pulley of moment of inertia I and radius R. One coordinate, the drop x of m1, fixes everything: the pulley turns through x/R. So T=12(m1+m2+I/R2)x˙2 and V=−(m1−m2)gx. The Euler-Lagrange equation gives

x¨=(m1−m2)gm1+m2+I/R2

with no string tensions anywhere. A pulley made of a uniform disc has I/R2=M/2.

3. A spinning hoop: equilibria that move

A bead slides on a smooth vertical hoop of radius R that is forced to spin at a fixed rate ω about its vertical diameter. Measure θ from the bottom. The bead moves along the hoop at Rθ˙ and around the axis at ωRsin⁡θ, so

L=12mR2(θ˙2+ω2sin2⁡θ)+mgRcos⁡θ,θ¨=sin⁡θ(ω2cos⁡θ−gR)

Equilibria are where θ¨=0: the bottom, the top, and, only if ω2>g/R, the angle with cos⁡θ0=g/(ω2R). Spin the hoop past g/R and the bottom stops being stable: the bead climbs to θ0. This is a bifurcation, the same mathematics as a magnet ordering below its Curie point.

The bead on the spinning hoop, with its effective potential. Raise ω past √(g/R) and the single minimum at the bottom splits into two side minima; the bead settles into one of them.

Here the time-dependent constraint does work on the bead, so T+V is not conserved. But L has no explicit t, so h=θ˙∂L/∂θ˙−L=12mR2θ˙2−12mR2ω2sin2⁡θ−mgRcos⁡θ is. Section 5 explains why.

4. Cyclic coordinates and Noether’s theorem

If a coordinate qk is missing from L (it is cyclic, or ignorable), the Euler-Lagrange equation reads p˙k=0: its conjugate momentum is conserved. This is the simplest case of Noether’s theorem: every continuous symmetry of the Lagrangian gives a conserved quantity.

Symmetry of L Conserved quantity
shift every position by the same vector (homogeneity of space) total linear momentum
turn the system about an axis (isotropy of space) angular momentum about that axis
shift the time origin (L has no explicit t) the energy function h

Worked example. A particle moves on the surface of a cone z=rcot⁡α under gravity. With r and ϕ as coordinates, L=12m(r˙2csc2⁡α+r2ϕ˙2)−mgrcot⁡α. ϕ is cyclic, so pϕ=mr2ϕ˙ is conserved: the vertical component of angular momentum, because the cone is symmetric about its axis. The x-momentum is not conserved, since gravity and the cone break that symmetry.

A symmetry tells you a conserved quantity before you solve anything. For a charge near an infinite straight wire, the system is unchanged by moving along the wire and turning around it, so pz and pϕ are conserved even though the motion is complicated.

5. The energy function and when it is the energy

Define the energy function

h=∑jq˙j∂L∂q˙j−L,dhdt=−∂L∂t

So h is conserved whenever L has no explicit time dependence. It equals the total energy T+V only when T is a quadratic form in the velocities (T=12∑ajkq˙jq˙k) and V does not depend on velocities, which is true when the transformation r→i(q) has no explicit t. Euler’s theorem on homogeneous functions then gives ∑q˙j∂T/∂q˙j=2T, so h=2T−(T−V)=T+V.

On the spinning hoop, the kinetic energy has a velocity-free part 12mR2ω2sin2⁡θ, so h≠T+V: h is conserved, T+V is not. Two separate questions are worth keeping apart: is h conserved? (look for explicit t in L) and is h the energy? (look for explicit t in the coordinates).

6. Velocity-dependent potentials: a charge in a field

The Lorentz force depends on velocity, yet it fits the Lagrangian scheme with a generalised potential U=qϕ−qv→⋅A→:

L=12mv2−qϕ+qv→⋅A→,p→=mv→+qA→

The Euler-Lagrange equations give mv→˙=q(E→+v→×B→) with E→=−∇ϕ−∂A→/∂t and B→=∇×A→. The canonical momentum p→ is not mv→; it is the one that becomes −iℏ∇ in quantum mechanics. A gauge change A→→A→+∇χ, ϕ→ϕ−∂χ/∂t adds qdχ/dt to L, a total derivative, so the motion is unchanged.

Worked example. A uniform field B→=Bzˆ can be written with A→=(−By,0,0). Then L=12m(x˙2+y˙2+z˙2)−qBx˙y. Both x and z are cyclic, so px=mx˙−qBy and pz=mz˙ are conserved. The first says mx˙=px+qBy: the orbit centre sits at yc=−px/(qB), the canonical momentum labels the guiding centre. With the symmetric gauge A→=12B(−y,x,0) the cyclic coordinate is ϕ instead; different gauges show different conserved quantities.

“The canonical momentum is always mass times velocity.” Only for a Cartesian coordinate with a velocity-free potential. For an angle it is an angular momentum, for a charge in a magnetic field it is mv→+qA→ (which depends on the gauge), and on the spinning hoop pθ=mR2θ˙. Always compute ∂L/∂q˙.

7. Constraint forces with Lagrange multipliers

Choosing coordinates that satisfy the constraints hides the constraint forces. To find one, keep an extra coordinate and impose the constraint f(q)=0 with a multiplier λ:

ddt∂L∂q˙j−∂L∂qj=λ∂f∂qj

The right side is the generalised constraint force. The method also handles non-holonomic constraints written in differential form, ∑jajdqj=0, by replacing ∂f/∂qj with aj.

Worked example: when does a particle leave a sphere? A particle slides from rest at the top of a smooth sphere of radius R. Keep r with the constraint r−R=0, and measure θ from the top, so the height is rcos⁡θ and L=12m(r˙2+r2θ˙2)−mgrcos⁡θ. The r equation at r=R is −mRθ˙2+mgcos⁡θ=λ. Energy gives Rθ˙2=2g(1−cos⁡θ), so the normal force is λ=mg(3cos⁡θ−2). It reaches zero at cos⁡θ=2/3, about 48.2° from the top, where the particle flies off.

8. Hamilton’s principle

The Euler-Lagrange equations are exactly the condition that the action is stationary for paths with fixed end points:

S[q]=∫t1t2L(q,q˙,t)dt,δS=0

This is the cleanest statement of classical mechanics: it needs no forces or coordinates, it shows at once that adding dF(q,t)/dt to L changes nothing (it only adds a constant F(t2)−F(t1) to S), and it carries straight into field theory and, via Feynman’s path integral, quantum mechanics. The same calculus of variations solves geometric problems: the shortest path on a surface, the soap film between two rings (a catenoid), and the brachistochrone, the curve of fastest descent, which is a cycloid.

Worked example. A Lagrangian L=12mx˙2−12kx2 gives SHM. Multiply it by any constant, or add ddt(x2t), and the equation of motion mx¨=−kx is unchanged. A test question that offers two Lagrangians differing by such a term expects you to call them equivalent.

  • Degrees of freedom n=3N−k for k holonomic constraints; rolling without slipping on a plane is non-holonomic.
  • Euler-Lagrange: ddt∂L∂q˙j=∂L∂qj, L=T−V; ideal constraint forces drop out.
  • Canonical momentum pj=∂L/∂q˙j; a cyclic coordinate means a conserved pj (Noether: symmetry gives a conservation law).
  • h=∑q˙jpj−L is conserved when ∂L/∂t=0; it equals T+V only when the coordinates have no explicit time dependence.
  • A charge: L=12mv2−qϕ+qv→⋅A→, p→=mv→+qA→; gauge changes add a total derivative.
  • Constraint forces: λ∂f/∂qj. A particle leaves a smooth sphere at cos⁡θ=2/3.
  • Hamilton’s principle δ∫Ldt=0; L and L+dF(q,t)/dt give the same motion.

Practise: exam questions on this lesson

They start easy and climb to top-rank level. More on the Lagrangian mechanics practice page.

Basics: the JAM lessons on Newton’s laws and frames and potential energy. Next: lesson 2.2, Hamiltonian mechanics.

Check yourself

1A bead slides on a frictionless wire bent into a fixed circle in a vertical plane. How many degrees of freedom does it have?
2In L = ½m(ṙ² + r²θ̇²) − U(r), which quantity is conserved because θ does not appear?
3Adding dF/dt to a Lagrangian, where F(q, t) is any function of the coordinates and time,

Sources

  • H. Goldstein, C. Poole and J. Safko, Classical Mechanics, 3rd ed. (2002), chapters 1 and 2
  • L. D. Landau and E. M. Lifshitz, Mechanics, 3rd ed. (1976), chapters 1 and 2
  • J. R. Taylor, Classical Mechanics (2005), chapters 6 and 7
  • GATE Physics syllabus (Classical Mechanics), IIT organising institute; CSIR-UGC NET Physical Sciences syllabus, Part A Classical Mechanics

Your ticks stay in this browser. Save them as a file on the course home.

Updated 2026-11-22. Not affiliated with the IITs, IISc or the GATE organising institute. The general aptitude part of GATE is not covered here. Check the official GATE website for the current pattern. All questions are original.