Skip to content

Lagrangian mechanics from the action principle

8 min read

Short answer

Define the Lagrangian L=T−UL=T-U (kinetic minus potential energy). The actual motion makes the action S=∫L dtS=\int L\,dt stationary, which leads to the Euler–Lagrange equations ddt∂L∂q˙=∂L∂q\dfrac{d}{dt}\dfrac{\partial L}{\partial\dot q}=\dfrac{\partial L}{\partial q}. They reproduce F=maF=ma but work in any coordinates and handle constraints automatically.

d/dt (∂L/∂q̇) = ∂L/∂qd/dt (∂L/∂q̇) = ∂L/∂qL = T − U kinetic minus potentialq any convenient coordinateAction S = ∫L dt is stationaryResult reproduces F = ma
One scalar function L and one equation per coordinate replace a vector equation with explicit constraint forces.

The principle of stationary action

Among all paths between two fixed endpoints in a fixed time, the path nature takes is one for which the action S[q]=∫t1t2L(q,q˙) dtS[q]=\int_{t_1}^{t_2}L(q,\dot q)\,dt is stationary: nearby paths change SS only to second order, like the bottom of a valley. (It is often a minimum for short times, but "stationary" is the correct word.)

Requiring the first variation to vanish for every small deformation that fixes the endpoints, and integrating by parts, gives the Euler–Lagrange equation for each coordinate qq.

It reproduces Newton

For one particle, L=12mx˙2−U(x)L=\tfrac12m\dot x^2-U(x). Then ∂L∂x˙=mx˙\dfrac{\partial L}{\partial\dot x}=m\dot x, so ddt∂L∂x˙=mx¨\dfrac{d}{dt}\dfrac{\partial L}{\partial\dot x}=m\ddot x, and ∂L∂x=−U′(x)\dfrac{\partial L}{\partial x}=-U'(x). The equation reads mx¨=−U′(x)=Fm\ddot x=-U'(x)=F: Newton's second law.

The payoff is generality. You can choose any coordinates (angles, distances along a track) and write TT and UU in them. Forces of constraint, like the tension that keeps a pendulum bob at a fixed distance, never appear.

Conserved quantities for free

If LL does not depend on a coordinate qq (a cyclic coordinate), then ∂L/∂q=0\partial L/\partial q=0 and the conjugate momentum p=∂L/∂q˙p=\partial L/\partial\dot q is conserved. This is the concrete form of the symmetry-conservation link: an angle that does not appear in LL gives conserved angular momentum. If LL has no explicit time dependence, the energy function q˙ ∂L/∂q˙−L\dot q\,\partial L/\partial\dot q-L is conserved.

Worked example

Derive the equation of motion of a simple pendulum of length ℓ\ell and mass mm using the angle θ\theta from the downward vertical.

The bob moves on a circle: T=12mℓ2θ˙2T=\tfrac12m\ell^2\dot\theta^2, and U=−mgℓcos⁡θU=-mg\ell\cos\theta.

L=12mℓ2θ˙2+mgℓcos⁡θ.L=\tfrac12m\ell^2\dot\theta^2+mg\ell\cos\theta.

∂L∂θ˙=mℓ2θ˙\dfrac{\partial L}{\partial\dot\theta}=m\ell^2\dot\theta, so ddt(⋅)=mℓ2θ¨\dfrac{d}{dt}(\cdot)=m\ell^2\ddot\theta; and ∂L∂θ=−mgℓsin⁡θ\dfrac{\partial L}{\partial\theta}=-mg\ell\sin\theta.

Euler–Lagrange gives mℓ2θ¨=−mgℓsin⁡θm\ell^2\ddot\theta=-mg\ell\sin\theta, so θ¨=−gℓsin⁡θ\ddot\theta=-\dfrac{g}{\ell}\sin\theta. The string tension never entered.

Try it yourself

Write the Lagrangian of a mass mm on a spring of constant kk and derive its equation of motion.

Show the answer

L=12mx˙2−12kx2L=\tfrac12m\dot x^2-\tfrac12kx^2. Then mx¨=−kxm\ddot x=-kx, so x¨=−kmx\ddot x=-\tfrac km x: simple harmonic motion with ω=k/m\omega=\sqrt{k/m}.

Keep going with practice

Vidi's mechanics lessons introduce generalized coordinates, the step that makes the Lagrangian approach practical.