Newton's F=ma tracks motion step by step, forcing us to keep up with every constraint force and curved coordinate direction, so we want a way to find a system's path by looking at its entire journey at once using energy.
The Action and the Tug-of-War Between T and V
Instead of stepping forward instant by instant with forces, we score every possible path y(t) between the fixed start and end points by integrating the difference between kinetic energy T and potential energy V:
ActionS=∫tstarttendLdt,LagrangianL=T−V
Nature picks the path where the action S is stationary, meaning a tiny wiggle of the path leaves S unchanged to first order.
Let's test this score on a 1 kg ball thrown straight up in uniform gravity g=10 m/s2 from y(0)=0 to y(2)=0, and see how S singles out the true parabolic trajectory from a family of trial paths.
Testing Trial Paths for a Thrown Ball
Text solution
Write the action integral for the ballWith m=1 kg and g=10 m/s2, substitute T=21y˙2 and V=10y into S=∫(T−V)dt.
S=∫02(21y˙2−10y)dt
Differentiate the trial archFor the adjustable family of parabolas y(t)=At(2−t)=2At−At2 pinned at y(0)=0 and y(2)=0, take the time derivative to get the velocity.
y˙(t)=2A(1−t)
Integrate kinetic and potential energyIntegrate 21y˙2 and 10y from t=0 to t=2, then subtract to get the action S(A) as a function of the parameter A.
Find the stationary pathSet the derivative of S(A) with respect to A to zero.
dAdS=34(2A−10)=0⟹A=5
So A=5 gives the exact physical trajectory ytrue(t)=10t−5t2 m with S(5)=−3100≈−33.333 J⋅s. Nudging A to 5+ε gives S(5+ε)=34(−25+ε2), which has no linear ε term because the action curve S(A) is flat right at A=5.
Drag the arch's peak up and down to see how kinetic and potential energy trade off, making the total action level out right at the true path.
1
The Euler-Lagrange Equation and Generalized Coordinates
Testing a one-parameter family only checks one shape at a time; we want a differential equation that makes the action stationary against any tiny local nudge along the path, in whatever coordinates fit the system best.
The Euler-Lagrange Equation and Generalized Coordinates
For the action S=∫L(qi,q˙i,t)dt to be stationary (δS=0) under any small nudge of the path, every generalized coordinate qi must obey the Euler-Lagrange equation at every instant:
how L changeswith position(generalizedforce)∂qi∂L=dtdhow L changeswith velocity(generalizedmomentum)(∂q˙i∂L)
For the thrown ball with L=21my˙2−mgy, the generalized force is ∂y∂L=−mg and the momentum is ∂y˙∂L=my˙, so the Euler-Lagrange equation immediately gives −mg=dtd(my˙)=my¨.
Anywhere along the true parabolic path, a local poke changes potential energy from its height and kinetic energy from its tilted sides by equal amounts to first order, leaving the Action unchanged to first order.
2
Single Degree of Freedom: The Simple Pendulum
Now let's find the equation of motion for a simple pendulum of mass m on a rigid, massless rod of length ℓ, using only its angle θ from the downward vertical.
θ
ℓ
m
y=0
y=−ℓcosθ
v=ℓθ˙
The Simple Pendulum in Generalized Coordinates
θ
ℓ
m
g
L=T−V=?
Text solution
Write T and V in terms of θMoving along an arc of radius ℓ with the pivot at y=0, the bob has speed v=ℓθ˙ and height y=−ℓcosθ.
T=21mv2=21mℓ2θ˙2,V=mgy=−mgℓcosθ
Form the LagrangianSubtract V from T, watching the double negative on the potential energy term.
L=T−V=21mℓ2θ˙2+mgℓcosθ
Take the partial derivativesDifferentiate L with respect to θ (holding θ˙ fixed) to get the gravitational torque, and with respect to θ˙ (holding θ fixed) to get the angular momentum.
∂θ∂L=−mgℓsinθ,∂θ˙∂L=mℓ2θ˙
Set ∂θ∂L=dtd(∂θ˙∂L) and simplifyDifferentiate the angular momentum with respect to time and divide both sides by mℓ2.
−mgℓsinθθ¨+ℓgsinθ=dtd(mℓ2θ˙)=mℓ2θ¨=0
So the pendulum's angular equation of motion comes straight from scalar energies in θ, without resolving force vectors or solving for the tension in the rod.
3
Coupled Motion and Cyclic Coordinates: Cart and Pendulum
Now let the pendulum's pivot ride on a cart of mass M that slides along a frictionless horizontal track: we want the coupled equations of motion for the cart's horizontal position x and the pendulum's angle θ.
M
x
θ
ℓ
m
0
xbob=x+ℓsinθ
ybob=−ℓcosθ
Coupled Motion and Conserved Momentum: Cart and Pendulum
M
x
x˙
θ
ℓ
m
0
x¨=?θ¨=?
Text solution
Find the bob's speed from Cartesian coordinatesWrite (xbob,ybob) in terms of x and θ, differentiate with respect to time, and square and add the velocity components.
Build the LagrangianAdd the cart's kinetic energy 21Mx˙2 and the bob's kinetic energy 21mvbob2, then subtract the potential energy V=−mgℓcosθ.
L=T−V=21(M+m)x˙2+mℓx˙θ˙cosθ+21mℓ2θ˙2+mgℓcosθ
Write the θ Euler-Lagrange equationTake the partials with respect to θ and θ˙, then apply the product and chain rules when taking dtd(∂θ˙∂L) along the path.
Equating ∂θ∂L and dtd(∂θ˙∂L), canceling −mℓx˙θ˙sinθ on both sides, and dividing by mℓ gives the first coupled equation:
ℓθ¨+x¨cosθ+gsinθ=0
Write the x Euler-Lagrange equationBecause x does not appear in L,∂x∂L=0, so the horizontal momentum ∂x˙∂L is conserved and its time derivative is zero.
Two habits keep coupled problems clean. First, whenever motions combine, don't guess the speed in your head: write the Cartesian coordinates (x,y) in terms of your generalized coordinates and differentiate them. Second, don't mix up the partial derivative ∂q˙i∂ and the total time derivative dtd. When you take ∂θ˙∂L, hold all other variables fixed so x˙ and θ act like constants. Then, when you apply dtd to that result, remember that every coordinate qj(t) and velocity q˙j(t) changes with time and needs the product and chain rules.
Key concepts
To find a system's equations of motion with the Lagrangian method, start by counting its degrees of freedom and choosing independent generalized coordinates q1,q2,… that automatically respect the constraints (such as θ for a pendulum on a rigid rod, or x and θ for a cart and pendulum). Write the total kinetic energy T and potential energy V in terms of those coordinates and their time derivatives, using Cartesian positions x(qi),y(qi) first whenever motions combine (like xbob=x+ℓsinθ), and form the Lagrangian:
L=T−V,S=∫tstarttend(T−V)dt
The true path makes the action S stationary (δS=0), which means each coordinate obeys its own Euler-Lagrange equation:
∂qi∂L=dtd(∂q˙i∂L)
Before taking time derivatives, check L for any cyclic coordinate qi that is missing from L, like x in the cart-and-pendulum Lagrangian. Because ∂qi∂L=0, its momentum ∂q˙i∂L is automatically constant. In the same way, if L does not depend explicitly on time t, energy is conserved. Finally, only put conservative forces into V(q). Gravity, springs (V=21kx2), and electrostatic forces come from a position-dependent potential (F=−∂q∂V) and fit right into L=T−V. Friction and air drag oppose velocity q˙ and drain energy over a round trip, so they cannot be written as V(q) and must be added as a non-conservative generalized force Qi beside ∂qi∂L:∂qi∂L+Qi=dtd(∂q˙i∂L).
4
Practice
1
A ball of mass m=2 kg moves vertically in uniform gravity g=10 m/s2, starting at y(0)=0 and landing back at y(1)=0 at t=1 s. Consider the family of parabolic trial paths y(t)=At(1−t), where A is an adjustable parameter. (a) Calculate the integrated kinetic energy ∫01Tdt, the integrated potential energy ∫01Vdt, and the action S(A)=∫01(T−V)dt in terms of A. (b) Find the value of A where S(A) is stationary, and show that writing A=Atrue+ε leaves no linear term in ε in S(A).
Differentiate y(t)=A(t−t2) with respect to t first so you can form T=21my˙2 before integrating from 0 to 1.
(a) Differentiating y(t)=A(t−t2) with respect to time gives the velocity:
y˙(t)=A(1−2t)
With m=2 kg, the kinetic energy is T=21(2)y˙2=A2(1−2t)2 (watch out for forgetting the 21 in 21my˙2, which would double the kinetic integral to 32A2 and halve Atrue to 2.5 m/s2). Integrating from t=0 to t=1 gives:
The +10ε and −10ε terms cancel completely, confirming that the action is stationary to first order at the true path.
2
A bead slides along a rigid wire bent into a curved vertical loop. (a) When the wire is frictionless and the bead's position is described by its arc length s along the wire, explain why the normal force of the wire never appears in the Euler-Lagrange equation for s. (b) If the wire is rough and exerts kinetic friction on the bead, explain why you cannot account for friction by adding a friction potential energy term Vfriction(s) to L=T−V.
Think about the direction of a small allowed nudge δs compared to the normal force in part (a), and what happens to the work done over a round trip from A to B and back to A in part (b).
(a) Because the generalized coordinate s measures distance along the wire, every trial path s(t) automatically satisfies the constraint of staying on the wire, and any small allowed nudge δs points tangent to the wire. The normal force from the wire acts perpendicular to the wire at every point, so it does zero work during any allowed displacement δs and therefore never changes the energy along the path or enters L=T−V.
(b) A potential energy V(s) depends only on position s, which means a force derived from it (F=−∂s∂V) has a single fixed direction at each point s and does zero net work over any round trip from A to B and back to A. (A common slip is to try writing Vfriction(s)=fks, which would give a constant force −∂s∂V=−fk that pushes toward decreasing s even when the bead is moving in the −s direction!) Kinetic friction always opposes the velocity s˙, reversing direction whenever the bead turns around and draining mechanical energy on both legs of a round trip. Because the work done depends on the path taken rather than position alone, friction cannot be written as V(s) and must enter as a non-conservative generalized force Qs added to ∂s∂L in the Euler-Lagrange equation: ∂s∂L+Qs=dtd(∂s˙∂L).
3
A block of mass m attached to a horizontal spring of spring constant k (with potential energy V(x)=21kx2) slides on a frictionless surface, where x is the displacement from equilibrium. Write the Lagrangian L(x,x˙), evaluate ∂x∂L and ∂x˙∂L, state the physical meaning of each partial derivative, and use the Euler-Lagrange equation to obtain the equation of motion.
Write T and V first, and watch the minus sign between them in L=T−V before taking ∂x∂L.
With kinetic energy T=21mx˙2 and spring potential energy V=21kx2, the Lagrangian is:
L(x,x˙)=T−V=21mx˙2−21kx2
(Be careful not to write L=T+V, which is total energy; using a plus sign gives ∂x∂L=+kx and leads to the runaway equation mx¨−kx=0.)
Holding x˙ fixed gives the partial derivative with respect to position:
∂x∂L=−kx
which is the restoring spring force on the block.
Holding x fixed gives the partial derivative with respect to velocity:
∂x˙∂L=mx˙
which is the block's linear momentum.
Setting ∂x∂L=dtd(∂x˙∂L) gives the equation of motion:
−kx=dtd(mx˙)=mx¨⟹mx¨+kx=0
4
A puck of mass m slides on a frictionless horizontal table while attached to a central spring anchored at the origin with potential energy V(r)=21kr2. In plane polar coordinates (r,θ), the puck's Cartesian coordinates are x=rcosθ and y=rsinθ. (a) Differentiate x(t) and y(t) with respect to time to find v2=x˙2+y˙2 and write the Lagrangian L(r,θ,r˙,θ˙). (b) Identify the cyclic coordinate in L, use its Euler-Lagrange equation to find the conserved quantity, and explain what physical quantity and symmetry it represents.
A common slip is writing v2=r˙2+θ˙2 without the r2 factor on θ˙2, which has the wrong dimensions and misses the r dependence of the angular kinetic energy.
Both r(t) and θ(t) vary with time, so use the product rule when differentiating x=rcosθ and y=rsinθ.
(a) Applying the product and chain rules to x(t)=r(t)cosθ(t) and y(t)=r(t)sinθ(t) gives:
x˙y˙=r˙cosθ−rθ˙sinθ=r˙sinθ+rθ˙cosθ
Squaring and adding the components, the cross terms ∓2rr˙θ˙sinθcosθ cancel out:
(A common slip is writing v2=r˙2+θ˙2 without the r2 factor on θ˙2, which has the wrong dimensions and misses the r dependence of the angular kinetic energy.) With T=21m(r˙2+r2θ˙2) and V=21kr2, the Lagrangian is:
L=T−V=21mr˙2+21mr2θ˙2−21kr2
(b) The angle θ does not appear explicitly in L, so θ is a cyclic coordinate with ∂θ∂L=0. Its Euler-Lagrange equation gives:
dtd(∂θ˙∂L)=∂θ∂L=0⟹∂θ˙∂L=mr2θ˙=constant
Physically, mr2θ˙ is the puck's angular momentum about the origin, which is conserved because the central spring potential V(r)=21kr2 is rotationally symmetric: rotating the entire system through any angle about the origin leaves the Lagrangian unchanged.
5
A cart of mass M slides along a frictionless vertical track (upward vertical coordinate y) while attached to a vertical spring of potential energy 21ky2. A pendulum of mass m and length ℓ (angle θ from the downward vertical) hangs from a pivot on the cart, so the bob has coordinates xbob=ℓsinθ and ybob=y−ℓcosθ. In uniform gravity g, the Lagrangian of the system is
Derive the coupled Euler-Lagrange equations of motion for θ(t) and y(t), showing each partial derivative and total time derivative clearly.
In the cross term mℓy˙θ˙sinθ, remember that both y˙(t) and θ(t) change with time when you apply dtd to ∂θ˙∂L and ∂y˙∂L.
Equation for θ(t): Holding y,y˙,θ˙ fixed, differentiate L with respect to θ:
∂θ∂L=mℓy˙θ˙cosθ−mgℓsinθ
Holding y,θ,y˙ fixed, differentiate L with respect to θ˙:
∂θ˙∂L=mℓy˙sinθ+mℓ2θ˙
Now take the total time derivative dtd(∂θ˙∂L) along the trajectory using the product and chain rules on mℓy˙(t)sinθ(t) (forgetting to differentiate sinθ(t) here is a common slip: it drops the +mℓy˙θ˙cosθ term so it fails to cancel with ∂θ∂L):
dtd(∂θ˙∂L)=mℓy¨sinθ+mℓy˙θ˙cosθ+mℓ2θ¨
Setting ∂θ∂L=dtd(∂θ˙∂L), canceling mℓy˙θ˙cosθ from both sides, and dividing by mℓ gives:
Equation for y(t)Holding θ,y˙,θ˙ fixed, differentiate L with respect to y:
∂y∂L=−ky−(M+m)g
Holding y,θ,θ˙ fixed, differentiate L with respect to y˙:
∂y˙∂L=(M+m)y˙+mℓθ˙sinθ
Take the total time derivative dtd(∂y˙∂L) using the product and chain rules on mℓθ˙(t)sinθ(t) (watch out for treating sinθ as constant here, which would miss the centripetal term +mℓθ˙2cosθ):
dtd(∂y˙∂L)=(M+m)y¨+mℓθ¨sinθ+mℓθ˙2cosθ
Setting ∂y∂L=dtd(∂y˙∂L) and moving all terms to one side gives the second coupled equation: