Lagrangian Mechanics

5 hours ~15 min read
Prerequisites

Newton tells you what happens at each instant: add up the forces, divide by the mass. Lagrange asks a stranger, deeper question: of all conceivable histories between two fixed moments, which one does nature actually choose? The answer — the path of stationary action — eliminates constraint forces, hands out conservation laws, and (as Feynman later showed) is the shadow of a quantum sum over every path at once. A cat stalking a sunbeam knew it all along.

Learning Objectives

After this lesson you will be able to:

  1. Reformulate mechanical problems in generalized coordinates, counting degrees of freedom and bypassing constraint forces.
  2. Derive the Euler–Lagrange equation from stationarity of the action S=∫L dtS = \int L\,dt via the calculus of variations.
  3. Construct Lagrangians L=T−VL = T - V and obtain equations of motion for the oscillator, the pendulum, and central potentials.
  4. Identify cyclic coordinates and extract conserved conjugate momenta — Noether's theorem in miniature.
  5. Explain why the action controls quantum amplitudes through the phase eiS/ℏe^{iS/\hbar} and the stationary-phase argument.
  6. Classify constraints as holonomic or non-holonomic and scleronomic or rheonomic, and state d'Alembert's principle.
  7. Derive conservation of energy, momentum and angular momentum from the homogeneity of time, the homogeneity of space and the isotropy of space.

Intuition

Newtonian mechanics is local and forceful: at every instant, tally the forces and integrate. It works, but for constrained systems it makes you compute forces you never cared about — the tension in a pendulum rod, the normal force from a wire — just to eliminate them again.

The Lagrangian view is global and economical. Assign every conceivable path q(t)q(t) between fixed endpoints a single number, the action S[q]S[q]. The physical path is the one where SS is stationary: wiggling the path changes SS only at second order. Constraint forces never appear (they do no work along allowed motions), any convenient coordinates work, and symmetries hand you conservation laws. Quantum mechanics will explain why nature grades paths this way: every path contributes an amplitude of phase S/ℏS/\hbar, and only near the stationary path do the phases agree and add up.


Theory

Newton in one paragraph

For a particle of mass mm, Newton's second law is mr¨=Fm\ddot{\mathbf r} = \mathbf F. A force is conservative if F=−∇V\mathbf F = -\nabla V for some potential V(r)V(\mathbf r); then energy is conserved: ddt(12mr˙2)=mr¨⋅r˙=−∇V⋅r˙=−dVdt\frac{d}{dt}\big(\tfrac12 m\dot{\mathbf r}^2\big) = m\ddot{\mathbf r}\cdot\dot{\mathbf r} = -\nabla V\cdot\dot{\mathbf r} = -\frac{dV}{dt}, so ddt(T+V)=0\frac{d}{dt}(T + V) = 0. This framework is complete in principle — the trouble is practical.

That energy calculation hides a contrast worth seeing once. Under a constant force the momentum grows at the fixed rate dp/dt=Fdp/dt = F, but the kinetic energy grows at dT/dt=F⋅r˙dT/dt = \mathbf F\cdot\dot{\mathbf r}, which rises with the speed:

Interactive demo: Momentum vs kinetic energy under a constant force. Push with a constant force and compare what each second adds to momentum and to kinetic energy.

Where Newton gets awkward

A pendulum bob in Cartesian coordinates obeys mr¨=mg+Trodm\ddot{\mathbf r} = m\mathbf g + \mathbf T_{\text{rod}}, where the rod tension Trod\mathbf T_{\text{rod}} is an unknown constraint force: you must solve for it and then eliminate it, even though the motion is fully described by one angle θ\theta. A bead on a bent wire is worse — the normal force changes direction along the wire. Newton forces you to (i) carry unknown constraint forces and (ii) work in coordinates that ignore the geometry. Both problems have one cure.

Generalized coordinates

A holonomic constraint is a relation f(r1,…,rN,t)=0f(\mathbf r_1, \dots, \mathbf r_N, t) = 0 among coordinates. A system of NN particles with kk independent holonomic constraints has n=3N−kn = 3N - k degrees of freedom, and can be described by nn independent generalized coordinates q1,…,qnq_1, \dots, q_n — any variables that smoothly parametrize the allowed configurations: the pendulum's θ\theta (n=1n = 1), arc length along the wire, two angles for a double pendulum. Velocities q˙i\dot q_i are their time derivatives; the pair (q,q˙)(q, \dot q) fixes the instantaneous state.

The action and the Euler–Lagrange equation

A functional assigns a number to a whole function. The action of a path q(t)q(t) between fixed endpoints q(t1)=qaq(t_1) = q_a, q(t2)=qbq(t_2) = q_b is

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

with LL the Lagrangian. Hamilton's principle: the physical path makes SS stationary, δS=0\delta S = 0. To extract the consequence, deform the path: q(t)→q(t)+ϵ η(t)q(t) \to q(t) + \epsilon\,\eta(t) where η\eta is arbitrary and smooth with η(t1)=η(t2)=0\eta(t_1) = \eta(t_2) = 0 (endpoints pinned). Then S(ϵ)S(\epsilon) is an ordinary function, and stationarity means dS/dϵ∣ϵ=0=0dS/d\epsilon|_{\epsilon=0} = 0 for every η\eta. Differentiating under the integral with the chain rule,

dSdϵ∣0=∫t1t2(∂L∂q η+∂L∂q˙ η˙)dt. \frac{dS}{d\epsilon}\bigg|_{0} = \int_{t_1}^{t_2}\left(\frac{\partial L}{\partial q}\,\eta + \frac{\partial L}{\partial\dot q}\,\dot\eta\right)dt .

Integrate the second term by parts:

∫t1t2∂L∂q˙ η˙ dt=[∂L∂q˙ η]t1t2⏟= 0 since η(t1,2)=0−∫t1t2ddt ⁣(∂L∂q˙)η dt, \int_{t_1}^{t_2}\frac{\partial L}{\partial\dot q}\,\dot\eta\,dt = \underbrace{\left[\frac{\partial L}{\partial\dot q}\,\eta\right]_{t_1}^{t_2}}_{=\,0 \text{ since } \eta(t_{1,2})=0} - \int_{t_1}^{t_2}\frac{d}{dt}\!\left(\frac{\partial L}{\partial\dot q}\right)\eta\,dt ,

so that

dSdϵ∣0=∫t1t2[∂L∂q−ddt ⁣(∂L∂q˙)]η(t) dt=0for all admissible η. \frac{dS}{d\epsilon}\bigg|_0 = \int_{t_1}^{t_2}\left[\frac{\partial L}{\partial q} - \frac{d}{dt}\!\left(\frac{\partial L}{\partial\dot q}\right)\right]\eta(t)\,dt = 0 \quad\text{for all admissible }\eta .

Now the fundamental lemma of the calculus of variations: if ∫t1t2M(t)η(t) dt=0\int_{t_1}^{t_2} M(t)\eta(t)\,dt = 0 for every smooth η\eta vanishing at the endpoints, and MM is continuous, then M≡0M \equiv 0. (If M(t∗)>0M(t^*) > 0, continuity gives an interval where M>0M > 0; a smooth positive bump η\eta supported there makes the integral positive — contradiction.) Hence

  ddt ⁣(∂L∂q˙i)−∂L∂qi=0  i=1,…,n, \boxed{\;\frac{d}{dt}\!\left(\frac{\partial L}{\partial\dot q_i}\right) - \frac{\partial L}{\partial q_i} = 0\;} \qquad i = 1, \dots, n,

one Euler–Lagrange equation per coordinate (for several qiq_i, vary each independently).

Caution. In ∂L/∂q˙\partial L/\partial\dot q, the symbols qq and q˙\dot q are independent slots of the function L(q,q˙,t)L(q, \dot q, t): differentiate treating q˙\dot q as a variable in its own right, then evaluate along the trajectory. Only the outer d/dtd/dt is a total derivative along the motion. Conflating the two is the single most common Lagrangian error.

Stationary is all the principle asks for, and the word matters. Below, every path joins the same two endpoints for the oscillator L=12x˙2−12x2L = \tfrac12\dot x^2 - \tfrac12 x^2; bend one with the bumps η=sin⁡(nπt/T)\eta = \sin(n\pi t/T) and watch S(ϵ)S(\epsilon) stay flat to first order at the true path. For a short trip every bump raises SS, so the true path is a minimum. Let the trip last longer than half a period, T>πT > \pi, and the n=1n = 1 bump lowers SS: the true path is then a saddle of the action, and still the path the particle takes.

Interactive demo: Least action, or stationary action?. Bend a path between fixed endpoints and watch the action: flat at the true path, and a saddle once T passes half a period.

L=T−VL = T - V recovers Newton

For a particle in a conservative potential, take L=T−V=12mr˙2−V(r)L = T - V = \tfrac12 m\dot{\mathbf r}^2 - V(\mathbf r). Then ∂L/∂x˙i=mx˙i\partial L/\partial\dot x_i = m\dot x_i and ∂L/∂xi=−∂V/∂xi\partial L/\partial x_i = -\partial V/\partial x_i, so Euler–Lagrange gives mx¨i=−∂V/∂xim\ddot x_i = -\partial V/\partial x_i — exactly mr¨=−∇Vm\ddot{\mathbf r} = -\nabla V. Hamilton's principle with L=T−VL = T - V is Newtonian mechanics, repackaged.

Caution. L=T−VL = T - V is not a law of nature. It holds for velocity-independent potentials; a charged particle in a magnetic field needs the generalized potential L=12mv2−qϕ+q v⋅AL = \tfrac12 m\mathbf v^2 - q\phi + q\,\mathbf v\cdot\mathbf A, and dissipative forces like friction have no Lagrangian at all. What survives universally is Hamilton's principle itself — with the appropriate LL.

Classifying constraints

Generalized coordinates presupposed holonomic constraints. In general, constraints are sorted along two independent axes, and both matter later.

Holonomic or not. A constraint is holonomic when it is an equation among the coordinates and possibly time, f(r1,…,rN,t)=0f(\mathbf r_1, \dots, \mathbf r_N, t) = 0; each one removes a degree of freedom. A particle confined to the surface z=g(x,y)z = g(x, y) keeps two coordinates. Differentiating along the motion gives a relation among velocities, z˙−gxx˙−gyy˙=0\dot z - g_x\dot x - g_y\dot y = 0, but an integrable one: it is the time derivative of the holonomic equation. A non-holonomic constraint admits no such equation, and comes in two kinds:

  • Non-integrable velocity constraints, f(q,q˙,t)=0f(q, \dot q, t) = 0. The standard example is a coin of radius RR rolling upright without slipping on a table. Its configuration needs four coordinates: the contact point (x,y)(x, y), the heading φ\varphi and the rotation angle ψ\psi. Rolling imposes x˙=Rψ˙cos⁡φ\dot x = R\dot\psi\cos\varphi and y˙=Rψ˙sin⁡φ\dot y = R\dot\psi\sin\varphi, and these cannot be integrated into relations among x,y,φ,ψx, y, \varphi, \psi: by rolling along suitable paths the coin reaches every configuration (E6). The velocities are restricted; the configurations are not, so no coordinate can be eliminated.
  • Inequalities: molecules confined to a box, 0≤x≤L0 \le x \le L, or a particle sliding on the outside of a sphere, r≥ar \ge a, which may fly off. They bind only on part of the motion, and the problem has to be solved piecewise.

Non-holonomic constraints need extra machinery (Lagrange multipliers, [Gold] §2.4). Every system in this term is holonomic.

Time-dependent or not. A constraint with no explicit time dependence is scleronomic: a bead on a fixed wire. One with explicit tt is rheonomic: a bead on a wire turned by a motor (Example 2 below), or a pendulum whose support is driven up and down. The distinction decides, in P.1.4, whether the Hamiltonian equals the energy.

Why constraint forces drop out. A virtual displacement δri\delta\mathbf r_i is an infinitesimal change of configuration allowed by the constraints frozen at one instant tt. Ideal constraints, such as frictionless surfaces, rigid rods and rolling without slipping, exert forces that do no work in any virtual displacement: a normal force is perpendicular to every displacement along its surface. Newton's law Fi=mir¨i\mathbf F_i = m_i\ddot{\mathbf r}_i, with Fi\mathbf F_i split into applied and constraint parts, then collapses to d'Alembert's principle:

∑i(Fi(applied)−mir¨i)⋅δri=0. \sum_i\big(\mathbf F_i^{(\text{applied})} - m_i\ddot{\mathbf r}_i\big)\cdot\delta\mathbf r_i = 0 .

Expanding δri=∑j(∂ri/∂qj) δqj\delta\mathbf r_i = \sum_j(\partial\mathbf r_i/\partial q_j)\,\delta q_j in independent δqj\delta q_j, and using the two identities ∂r˙i/∂q˙j=∂ri/∂qj\partial\dot{\mathbf r}_i/\partial\dot q_j = \partial\mathbf r_i/\partial q_j and ddt(∂ri/∂qj)=∂r˙i/∂qj\frac{d}{dt}(\partial\mathbf r_i/\partial q_j) = \partial\dot{\mathbf r}_i/\partial q_j, the acceleration term becomes ddt∂T∂q˙j−∂T∂qj\frac{d}{dt}\frac{\partial T}{\partial\dot q_j} - \frac{\partial T}{\partial q_j}, so

ddt ⁣(∂T∂q˙j)−∂T∂qj=Qj,Qj≡∑iFi(applied)⋅∂ri∂qj, \frac{d}{dt}\!\left(\frac{\partial T}{\partial\dot q_j}\right) - \frac{\partial T}{\partial q_j} = Q_j, \qquad Q_j \equiv \sum_i\mathbf F_i^{(\text{applied})}\cdot\frac{\partial\mathbf r_i}{\partial q_j} ,

with QjQ_j the generalized force conjugate to qjq_j. When the applied forces derive from a potential, Qj=−∂V/∂qjQ_j = -\partial V/\partial q_j, and this is the Euler–Lagrange equation for L=T−VL = T - V derived above from Hamilton's principle, now reached by a completely independent route ([Gold] §1.4). Note the word virtual: a moving constraint can do real work, as the motor turning the wire in Example 2 does, but never virtual work, because a virtual displacement freezes the constraint.

Three worked systems

Harmonic oscillator. L=12mx˙2−12kx2L = \tfrac12 m\dot x^2 - \tfrac12 kx^2. Euler–Lagrange: ddt(mx˙)=−kx\frac{d}{dt}(m\dot x) = -kx, i.e. x¨=−ω2x\ddot x = -\omega^2 x with ω=k/m\omega = \sqrt{k/m}; solution x=Acos⁡(ωt+φ)x = A\cos(\omega t + \varphi).

Here ω\omega is an angular frequency; the cycles per second are f=ω/2πf = \omega/2\pi. The damping slider goes beyond L=T−VL = T - V (friction has no Lagrangian, as the caution above warns), but it shows what the ideal oscillator's constant amplitude is being compared against:

Interactive demo: Mass on a spring. Change mass and damping and read ω, f and the amplitude envelope of a spring oscillator.

Simple pendulum (length ℓ\ell, mass mm). One generalized coordinate θ\theta: x=ℓsin⁡θx = \ell\sin\theta, y=−ℓcos⁡θy = -\ell\cos\theta, so T=12mℓ2θ˙2T = \tfrac12 m\ell^2\dot\theta^2 and V=−mgℓcos⁡θV = -mg\ell\cos\theta:

L=12mℓ2θ˙2+mgℓcos⁡θ⟹mℓ2θ¨=−mgℓsin⁡θ⟹θ¨=−gℓsin⁡θ. L = \tfrac12 m\ell^2\dot\theta^2 + mg\ell\cos\theta \quad\Longrightarrow\quad m\ell^2\ddot\theta = -mg\ell\sin\theta \quad\Longrightarrow\quad \ddot\theta = -\frac{g}{\ell}\sin\theta .

This is the exact equation — no rod tension ever appeared. For small angles sin⁡θ≈θ\sin\theta \approx \theta and the pendulum is an oscillator with ω=g/ℓ\omega = \sqrt{g/\ell}.

Put the two systems side by side under one gravity slider. Hang the spring vertically and mgmg only shifts its equilibrium, leaving ω=k/m\omega = \sqrt{k/m} untouched; for the pendulum, gravity is the restoring force:

Interactive demo: One gravity slider, two oscillators. Change g and compare a hanging spring, whose beat never changes, with a pendulum, whose beat does.

Particle in a central potential (plane polar coordinates r,θr, \theta). With T=12m(r˙2+r2θ˙2)T = \tfrac12 m(\dot r^2 + r^2\dot\theta^2),

L=12m(r˙2+r2θ˙2)−V(r):mr¨=mrθ˙2−V′(r),ddt(mr2θ˙)=0. L = \tfrac12 m\big(\dot r^2 + r^2\dot\theta^2\big) - V(r): \qquad m\ddot r = mr\dot\theta^2 - V'(r), \qquad \frac{d}{dt}\big(mr^2\dot\theta\big) = 0 .

The θ\theta equation says pθ=mr2θ˙p_\theta = mr^2\dot\theta is conserved — the angular momentum (this is Kepler's second law: equal areas in equal times). This conserved pθp_\theta is the seed of the quantum theory of angular momentum in P.6.1.

Conserving pθp_\theta is not conserving p\mathbf p: LL does not depend on θ\theta, but written in xx and yy it depends on both. On a circular orbit at constant speed the angular momentum stays fixed while the linear momentum turns continuously:

Interactive demo: Momentum on a circle. Constant speed, turning momentum: compare the momentum vector at two points of a circular path.

Cyclic coordinates and conservation

Define the conjugate (canonical) momentum pi=∂L/∂q˙ip_i = \partial L/\partial\dot q_i. If LL does not depend on some qjq_j — a cyclic coordinate — Euler–Lagrange collapses to p˙j=0\dot p_j = 0: the conjugate momentum of a cyclic coordinate is conserved. Free particle: xx cyclic, p=mx˙p = m\dot x conserved. Central potential: θ\theta cyclic, pθp_\theta conserved. This is Noether's theorem in its simplest form — each continuous symmetry of LL (here, invariance under shifting qjq_j) produces a conservation law. In quantum mechanics the same logic returns as "observables commuting with the Hamiltonian are conserved" (1.1.3).

The full statement is worth having. Noether's theorem: if the action is unchanged by a continuous family of transformations (LL unchanged, or changed only by a total time derivative), then some quantity is conserved along every solution. Shifting every position along a direction n^\hat{\mathbf n} conserves the total momentum along n^\hat{\mathbf n}; rotating about an axis conserves the angular momentum about that axis; shifting time, ∂L/∂t=0\partial L/\partial t = 0, conserves the energy function h=∑iq˙i ∂L/∂q˙i−Lh = \sum_i \dot q_i\,\partial L/\partial \dot q_i - L. The hypothesis is a symmetry of the action. A transformation that only maps solutions to solutions, such as rescaling x→λxx \to \lambda x for the oscillator, whose equation of motion is linear, multiplies LL by λ2\lambda^2 and yields no conserved quantity. None of the three laws is automatic: each holds exactly as long as its symmetry does.

Interactive demo: One symmetry, one conserved quantity. Switch potentials under a moving particle and see momentum, angular momentum and energy conserved exactly when their symmetry holds.

The three classic symmetries, derived

Every isolated system has three symmetries, which follow from the properties classical mechanics assumes for space and time. Each can be turned into its conservation law by hand. Take NN particles with L=∑a12mar˙a2−V(r1,…,rN)L = \sum_a\tfrac12 m_a\dot{\mathbf r}_a^2 - V(\mathbf r_1, \dots, \mathbf r_N), and write pa=∂L/∂r˙a\mathbf p_a = \partial L/\partial\dot{\mathbf r}_a, so that Euler–Lagrange reads p˙a=∂L/∂ra\dot{\mathbf p}_a = \partial L/\partial\mathbf r_a.

Homogeneity of time → energy. If no instant is special, LL has no explicit time dependence. Along a motion, the chain rule and Euler–Lagrange give

dLdt=∑i(∂L∂qiq˙i+∂L∂q˙iq¨i)+∂L∂t=∑iddt(q˙i∂L∂q˙i)+∂L∂t,sodhdt=−∂L∂t,h≡∑iq˙i∂L∂q˙i−L. \frac{dL}{dt} = \sum_i\Big(\frac{\partial L}{\partial q_i}\dot q_i + \frac{\partial L}{\partial\dot q_i}\ddot q_i\Big) + \frac{\partial L}{\partial t} = \sum_i\frac{d}{dt}\Big(\dot q_i\frac{\partial L}{\partial\dot q_i}\Big) + \frac{\partial L}{\partial t}, \quad\text{so}\quad \frac{dh}{dt} = -\frac{\partial L}{\partial t}, \qquad h \equiv \sum_i\dot q_i\frac{\partial L}{\partial\dot q_i} - L .

With ∂L/∂t=0\partial L/\partial t = 0 the energy function hh is conserved. To see that hh is the energy, use Euler's theorem on homogeneous functions: if f(λx)=λkf(x)f(\lambda\mathbf x) = \lambda^kf(\mathbf x), differentiating in λ\lambda at λ=1\lambda = 1 gives ∑ixi ∂f/∂xi=kf\sum_i x_i\,\partial f/\partial x_i = kf. When the constraints are scleronomic, TT is a homogeneous quadratic (k=2k = 2) in the velocities, so ∑iq˙i ∂T/∂q˙i=2T\sum_i\dot q_i\,\partial T/\partial\dot q_i = 2T, and with a velocity-independent VV, h=2T−(T−V)=T+Vh = 2T - (T - V) = T + V. The bead on the rotating wire (Example 2) is the instructive exception: rheonomic, so hh is conserved but is not T+VT + V.

Homogeneity of space → momentum. If no place is special, shifting every particle by the same infinitesimal ϵn^\epsilon\hat{\mathbf n} (δra=ϵn^\delta\mathbf r_a = \epsilon\hat{\mathbf n}, velocities unchanged) leaves LL unchanged. That is automatic when VV depends only on the separations ra−rb\mathbf r_a - \mathbf r_b. Then 0=δL=ϵ n^⋅∑a∂L/∂ra0 = \delta L = \epsilon\,\hat{\mathbf n}\cdot\sum_a\partial L/\partial\mathbf r_a for every n^\hat{\mathbf n}, so ∑a∂L/∂ra=∑ap˙a=0\sum_a\partial L/\partial\mathbf r_a = \sum_a\dot{\mathbf p}_a = 0:

P=∑amar˙a=constant. \mathbf P = \sum_a m_a\dot{\mathbf r}_a = \text{constant}.

Since ∂L/∂ra\partial L/\partial\mathbf r_a is the force on particle aa, the same line says the internal forces sum to zero. Newton's third law is a consequence of the homogeneity of space.

Isotropy of space → angular momentum. If no direction is special, rotating the whole system by an infinitesimal angle δϕ\delta\phi about n^\hat{\mathbf n}, which moves positions and velocities, δra=δϕ n^×ra\delta\mathbf r_a = \delta\phi\,\hat{\mathbf n}\times\mathbf r_a and δr˙a=δϕ n^×r˙a\delta\dot{\mathbf r}_a = \delta\phi\,\hat{\mathbf n}\times\dot{\mathbf r}_a, leaves LL unchanged. Using Euler–Lagrange and the cyclic rule a⋅(n^×b)=n^⋅(b×a)\mathbf a\cdot(\hat{\mathbf n}\times\mathbf b) = \hat{\mathbf n}\cdot(\mathbf b\times\mathbf a),

0=δL=δϕ∑a[p˙a⋅(n^×ra)+pa⋅(n^×r˙a)]=δϕ n^⋅ddt∑ara×pa. 0 = \delta L = \delta\phi\sum_a\big[\dot{\mathbf p}_a\cdot(\hat{\mathbf n}\times\mathbf r_a) + \mathbf p_a\cdot(\hat{\mathbf n}\times\dot{\mathbf r}_a)\big] = \delta\phi\,\hat{\mathbf n}\cdot\frac{d}{dt}\sum_a\mathbf r_a\times\mathbf p_a .

Since n^\hat{\mathbf n} is arbitrary, the total angular momentum J=∑ara×pa\mathbf J = \sum_a\mathbf r_a\times\mathbf p_a is conserved. (It is written J\mathbf J here only to keep it apart from the Lagrangian LL; P.1.4 and P.6 call it L\mathbf L.)

These are the seven additive integrals of motion of an isolated system: the energy, three components of momentum and three of angular momentum, each the sum of its values over non-interacting parts ([LL] §§6–9). External fields remove exactly the laws whose symmetries they break. Near the Earth's surface gravity singles out the vertical, so PxP_x and PyP_y survive but PzP_z does not (E1), and only JzJ_z survives. A fixed central force singles out a point, so P\mathbf P is lost while all three components of J\mathbf J survive (the central-potential example above).

Why the action matters for quantum mechanics

Feynman's path-integral formulation of quantum mechanics (plain statement — the machinery comes much later): a quantum particle going from aa to bb takes every path, and each path contributes a complex amplitude of unit magnitude and phase S[path]/ℏS[\text{path}]/\hbar; the total amplitude is ∑pathseiS/ℏ\sum_{\text{paths}} e^{iS/\hbar}. When S≫ℏS \gg \hbar, the phase spins wildly as the path is deformed, and contributions from neighboring paths cancel — except near a path where SS is stationary, where nearby paths share the same phase and interfere constructively. Classical mechanics is the stationary-phase limit of quantum mechanics: Hamilton's principle is not an axiom but an interference pattern. Note ℏ\hbar has units of action (J·s) — it is precisely the scale that decides whether SS counts as "large". The waves being superposed here are amplitudes over paths, the same superposition logic as P.1.1.


Worked Examples

Example 1 — Atwood's machine

Masses m1=3.00m_1 = 3.00 kg and m2=5.00m_2 = 5.00 kg hang from an inextensible string over a massless, frictionless pulley. One degree of freedom: let xx be the downward displacement of m2m_2 (so m1m_1 rises by xx). Then T=12(m1+m2)x˙2T = \tfrac12(m_1 + m_2)\dot x^2 and V=−m2gx+m1gxV = -m_2gx + m_1gx, so

L=12(m1+m2)x˙2+(m2−m1)gx⟹(m1+m2)x¨=(m2−m1)g. L = \tfrac12(m_1 + m_2)\dot x^2 + (m_2 - m_1)gx \quad\Longrightarrow\quad (m_1 + m_2)\ddot x = (m_2 - m_1)g .

Hence x¨=g(m2−m1)/(m1+m2)=9.81×2.00/8.00=2.45\ddot x = g(m_2 - m_1)/(m_1 + m_2) = 9.81 \times 2.00/8.00 = 2.45 m/s². The string tension — which Newton's approach must introduce and eliminate — never appeared. (If wanted afterwards: Tstr=m1(g+x¨)=36.8T_{\text{str}} = m_1(g + \ddot x) = 36.8 N.)

Example 2 — Bead on a uniformly rotating wire

A bead slides without friction on a straight horizontal wire forced to rotate at constant angular speed Ω\Omega about a vertical axis. Using the distance rr from the axis, the bead's position is (rcos⁡Ωt, rsin⁡Ωt)(r\cos\Omega t,\ r\sin\Omega t), so T=12m(r˙2+r2Ω2)T = \tfrac12 m(\dot r^2 + r^2\Omega^2) and V=0V = 0: L=12m(r˙2+Ω2r2)L = \tfrac12 m(\dot r^2 + \Omega^2 r^2). Euler–Lagrange: mr¨=mΩ2rm\ddot r = m\Omega^2 r, i.e. r¨=Ω2r\ddot r = \Omega^2 r — the "centrifugal" term emerged automatically from the kinematics. With r(0)=r0r(0) = r_0, r˙(0)=0\dot r(0) = 0: r(t)=r0cosh⁡(Ωt)r(t) = r_0\cosh(\Omega t). For Ω=2.00\Omega = 2.00 rad/s, r0=0.100r_0 = 0.100 m: r(1 s)=0.100cosh⁡2=0.376r(1\,\text{s}) = 0.100\cosh 2 = 0.376 m — the bead is flung outward. Its kinetic energy grows (the motor turning the wire does work): energy is not conserved here, a subtlety the Hamiltonian framework will diagnose cleanly in P.1.4.

Below, the bead spirals out while its energy EE climbs. The flat line beside it is h=r˙ ∂L/∂r˙−Lh = \dot r\,\partial L/\partial \dot r - L, conserved because LL has no explicit tt; P.1.4 will call it the Hamiltonian.

Interactive demo: Conserved, but not the energy. Spin a wire with a bead on it: the Hamiltonian stays constant while the energy climbs, because the motor does work.


Hands-on (Python)

import numpy as np

# --- The true path is stationary: discretized action for the oscillator ---
# m = k = 1, endpoints x(0) = 0, x(Tf) = 1 with Tf = 1 (< pi => a minimum).
# True solution of xdd = -x through these endpoints: x(t) = sin(t)/sin(1).
m = k = 1.0; Tf = 1.0; N = 2001
t = np.linspace(0.0, Tf, N); dt = t[1] - t[0]

def action(x):
    v  = np.diff(x)/dt                   # velocities on interval midpoints
    xm = 0.5*(x[1:] + x[:-1])            # positions on interval midpoints
    return np.sum(0.5*m*v**2 - 0.5*k*xm**2)*dt

x_true = np.sin(t)/np.sin(1.0)
S0 = action(x_true)
print(f"S_true = {S0:.4f}")              # 0.3210  (analytic: sin(2)/(4 sin^2 1))

# one random smooth perturbation, exactly zero at both endpoints:
rng = np.random.default_rng(0)
modes = np.arange(1, 6)
eta = (rng.normal(size=5)[:, None]*np.sin(np.outer(modes, np.pi*t/Tf))).sum(0)
for eps in (0.01, 0.05, 0.10, 0.20):
    dS = action(x_true + eps*eta) - S0
    print(f"eps = {eps:4.2f}   S - S_true = {dS:+.6f}   dS/eps^2 = {dS/eps**2:.3f}")
# Expected: every dS > 0 and dS/eps^2 = 27.268 for ALL eps -- the first-order
# variation vanishes identically: the true path is stationary (here a minimum).
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import solve_ivp

# --- Full pendulum vs small-angle solution ---
g, ell = 9.81, 1.0
w0 = np.sqrt(g/ell)                       # small-angle frequency, period 2.006 s
rhs = lambda t, y: [y[1], -(g/ell)*np.sin(y[0])]

t = np.linspace(0, 10, 2000)
fig, axes = plt.subplots(2, 1, figsize=(8, 6))
for th0, ax in zip((0.10, 2.50), axes):
    sol = solve_ivp(rhs, (0, 10), [th0, 0.0], t_eval=t, rtol=1e-9)
    ax.plot(t, sol.y[0], label="exact")
    ax.plot(t, th0*np.cos(w0*t), "--", label="small-angle")
    ax.set(title=f"theta0 = {th0} rad", ylabel="theta (rad)"); ax.legend()
axes[1].set_xlabel("t (s)"); plt.tight_layout(); plt.show()
# Expected: theta0 = 0.10 -> the two curves are indistinguishable.
# theta0 = 2.50 -> exact period ~ 3.29 s (elliptic integral), so the exact
# curve drifts steadily out of phase with the 2.006 s small-angle cosine.

Exercises

E1 (easy). Write the Lagrangian of a projectile in a vertical plane, L=12m(x˙2+y˙2)−mgyL = \tfrac12 m(\dot x^2 + \dot y^2) - mgy, derive both equations of motion, and identify the conserved momentum.

Solution

Euler–Lagrange: ddt(mx˙)=0\frac{d}{dt}(m\dot x) = 0 and ddt(my˙)=−mg\frac{d}{dt}(m\dot y) = -mg, i.e. x¨=0\ddot x = 0, y¨=−g\ddot y = -g — projectile motion. xx is cyclic, so px=mx˙p_x = m\dot x is conserved (horizontal translation symmetry).

E2 (easy). A mass hangs from a vertical spring; let xx be the downward displacement from the spring's natural length, so L=12mx˙2−12kx2+mgxL = \tfrac12 m\dot x^2 - \tfrac12 kx^2 + mgx. Find the motion.

Solution

Euler–Lagrange: mx¨=−kx+mgm\ddot x = -kx + mg. Substituting u=x−mg/ku = x - mg/k: mu¨=−kum\ddot u = -ku — simple harmonic motion at ω=k/m\omega = \sqrt{k/m} about the shifted equilibrium xeq=mg/kx_{\text{eq}} = mg/k. Gravity relocates the center of oscillation but leaves the frequency alone.

E3 (medium). Show that L′=L+dFdtL' = L + \frac{dF}{dt} for any smooth F(q,t)F(q, t) yields the same Euler–Lagrange equations as LL.

Solution

S′[q]=S[q]+∫t1t2dFdt dt=S[q]+F(qb,t2)−F(qa,t1)S'[q] = S[q] + \int_{t_1}^{t_2}\frac{dF}{dt}\,dt = S[q] + F(q_b, t_2) - F(q_a, t_1). The added term depends only on the fixed endpoints, so it is the same constant for every admissible path: δS′=δS\delta S' = \delta S, and the stationary paths — hence the equations of motion — coincide. The Lagrangian of a given system is therefore not unique (a "gauge" freedom).

E4 (medium). Use the Euler–Lagrange equation to prove the shortest path between two points in a plane is a straight line, starting from the arc-length functional J[y]=∫x1x21+y′2 dxJ[y] = \int_{x_1}^{x_2}\sqrt{1 + y'^2}\,dx.

Solution

Here xx plays "time" and L(y,y′)=1+y′2L(y, y') = \sqrt{1 + y'^2} has no explicit yy: yy is cyclic, so ∂L/∂y′=y′/1+y′2\partial L/\partial y' = y'/\sqrt{1 + y'^2} is constant. That forces y′=consty' = \text{const}, i.e. y=ax+by = ax + b — a straight line. The variational machinery is indifferent to what the independent variable means physically.

E5 (hard). A block of mass mm slides on the frictionless face (angle α\alpha) of a wedge of mass MM that itself slides on a frictionless floor. Find the accelerations of both.

Solution

Coordinates: wedge position XX; block displacement ss down the incline. The block's position is (X+scos⁡α, h−ssin⁡α)(X + s\cos\alpha,\ h - s\sin\alpha), so

T=12MX˙2+12m[(X˙+s˙cos⁡α)2+s˙2sin⁡2α],V=−mgssin⁡α. T = \tfrac12 M\dot X^2 + \tfrac12 m\big[(\dot X + \dot s\cos\alpha)^2 + \dot s^2\sin^2\alpha\big], \qquad V = -mgs\sin\alpha .

XX is cyclic: ddt[(M+m)X˙+ms˙cos⁡α]=0\frac{d}{dt}\big[(M + m)\dot X + m\dot s\cos\alpha\big] = 0 (total horizontal momentum), so (M+m)X¨=−ms¨cos⁡α(M+m)\ddot X = -m\ddot s\cos\alpha. The ss equation: m(s¨+X¨cos⁡α)=mgsin⁡αm(\ddot s + \ddot X\cos\alpha) = mg\sin\alpha. Substituting X¨\ddot X:

s¨=(M+m)gsin⁡αM+msin⁡2α,X¨=−mgsin⁡αcos⁡αM+msin⁡2α. \ddot s = \frac{(M + m)g\sin\alpha}{M + m\sin^2\alpha}, \qquad \ddot X = -\frac{mg\sin\alpha\cos\alpha}{M + m\sin^2\alpha}.

Checks: M→∞M \to \infty gives s¨→gsin⁡α\ddot s \to g\sin\alpha, X¨→0\ddot X \to 0 ✓. For M=2.00M = 2.00 kg, m=1.00m = 1.00 kg, α=30°\alpha = 30°: s¨=6.54\ddot s = 6.54 m/s², X¨=−1.89\ddot X = -1.89 m/s². Two Newtonian constraint forces (normal forces on two surfaces) were never computed.

E6 (medium). Classify each constraint as holonomic or non-holonomic and as scleronomic or rheonomic, and give the number of degrees of freedom where that makes sense: (a) a bead on a fixed circular hoop; (b) a bead on a circular hoop spinning at constant Ω\Omega about its vertical diameter; (c) a pendulum whose string is drawn up through a hole at a constant rate, ℓ(t)=ℓ0−ct\ell(t) = \ell_0 - ct; (d) a particle sliding on the outside of a fixed sphere of radius aa; (e) the upright coin rolling without slipping. For (e), show that every configuration (x,y,φ,ψ)(x, y, \varphi, \psi) can be reached, so the rolling conditions cannot be integrated.

Solution

(a) Holonomic (x2+y2=R2x^2 + y^2 = R^2, z=0z = 0), scleronomic; one degree of freedom, the angle on the hoop. (b) Holonomic, rheonomic: the hoop's plane is at azimuth φ=Ωt\varphi = \Omega t, which contains tt explicitly. One degree of freedom, the polar angle θ\theta; its hh is conserved but is not the energy, just like the rotating wire of Example 2. (c) Holonomic, rheonomic (x2+y2=ℓ(t)2x^2 + y^2 = \ell(t)^2); one degree of freedom. (d) The inequality r≥ar \ge a is non-holonomic. While the particle is on the sphere it acts as r=ar = a (two degrees of freedom); it leaves where the normal force needed to hold it would turn negative, and then it has three. The motion must be solved piecewise. (e) Non-holonomic and scleronomic. To see non-integrability: rolling along a suitable curve brings the contact point to any (x,y)(x, y) with any heading φ\varphi. Then roll once around a full circle of radius ρ\rho: xx, yy and φ\varphi return to their values, while ψ\psi advances by 2πρ/R2\pi\rho/R, which can be anything since ρ\rho is free. Every configuration is therefore reachable, so no relation F(x,y,φ,ψ)=0F(x, y, \varphi, \psi) = 0 restricts them: four coordinates are needed, though at any instant only two velocities (ψ˙\dot\psi and φ˙\dot\varphi) are free.


Checkpoint

  1. What is a generalized coordinate, and which two Newtonian headaches does it cure?
  2. Sketch the derivation of the Euler–Lagrange equation. Where exactly is η(t1)=η(t2)=0\eta(t_1) = \eta(t_2) = 0 used?
  3. When is L=T−VL = T - V valid, and what is a standard counterexample?
  4. What is a cyclic coordinate, and what conservation law follows? Give two examples.
  5. In the path-integral picture, why do classical paths dominate when S≫ℏS \gg \hbar?
  6. Why does a non-holonomic constraint not reduce the number of generalized coordinates? What does "virtual" mean in d'Alembert's principle?
  7. Which symmetry gives which conservation law, and what extra condition makes the conserved hh equal to T+VT + V?
Answers
  1. Any variable smoothly parametrizing allowed configurations (one per degree of freedom). It eliminates constraint forces and lets you work in coordinates adapted to the geometry.
  2. Perturb q→q+ϵηq \to q + \epsilon\eta, expand SS to first order, integrate the η˙\dot\eta term by parts, and invoke the fundamental lemma. The endpoint conditions kill the boundary term [ (∂L/∂q˙)η ]t1t2[\,(\partial L/\partial\dot q)\eta\,]_{t_1}^{t_2} from the integration by parts.
  3. For velocity-independent (conservative) potentials. Counterexample: magnetic forces, which need L=12mv2−qϕ+qv⋅AL = \tfrac12 m\mathbf v^2 - q\phi + q\mathbf v\cdot\mathbf A; friction has no Lagrangian.
  4. A coordinate absent from LL; its conjugate momentum p=∂L/∂q˙p = \partial L/\partial\dot q is conserved. Free particle (xx → linear momentum); central potential (θ\theta → angular momentum mr2θ˙mr^2\dot\theta).
  5. Each path contributes eiS/ℏe^{iS/\hbar}; away from stationary points of SS the phase varies rapidly between neighboring paths and contributions cancel, while paths near the stationary (classical) one share a phase and add constructively.
  6. It restricts velocities, not configurations: every configuration stays reachable (the rolling coin), so no coordinate can be eliminated. A virtual displacement is one allowed by the constraints frozen at a single instant; ideal constraint forces do no work in such displacements, even when a moving constraint does real work.
  7. Homogeneity of time gives energy (the conserved h=∑q˙ ∂L/∂q˙−Lh = \sum\dot q\,\partial L/\partial\dot q - L), homogeneity of space gives momentum, isotropy of space gives angular momentum. h=T+Vh = T + V needs scleronomic constraints (so TT is quadratic in the velocities, by Euler's theorem) and a velocity-independent VV.

Further Reading

  • [Gold] Goldstein, Poole & Safko, Ch. 1–2 — constraints, generalized coordinates, and variational principles; the definitive treatment.
  • [LL] Landau & Lifshitz, Mechanics, §§1–9 — the principle of least action and the conservation laws derived from the symmetries of space and time, famously compact.
  • [Sha] Shankar, §2.1 — the principle of least action, written with quantization in mind.
  • [Sak] Sakurai & Napolitano, §2.6 — propagators and Feynman path integrals: eiS/ℏe^{iS/\hbar} made precise.

← Prev: Waves & the Wave Equation · Up: Pre-Term · Next: Hamiltonian Mechanics →

Ready to measure your state?

6 exercises · 14 checkpoint questions

Start the quiz