physics2u
Tier
⌕ Search ⌘K
physics2u.com/vault/euler-lagrange-equation.html
Derivation · the atom

The Euler–Lagrange equation from Hamilton's principle

D-001 euler-lagrange-equation Home PU-201 Threads symmetry · energy Depends on verified

Statement

A path that makes the action stationary satisfies a second-order differential equation in each generalised coordinate, and that equation is the equation of motion.

Why it matters

Newton's second law requires you to identify every force, including constraint forces you do not care about. Hamilton's principle requires only a single scalar function and the coordinates you choose. Every constraint force disappears from the problem automatically. This is not a reformulation for elegance — it is the only practical route into rigid bodies, field theory and general relativity.

Assumptions
The endpoints are fixed.The varied path must agree with the true path at t1 and t2. Drop this and the boundary term at step 5 survives, and you get a boundary condition instead of an equation of motion — which is exactly what happens in field theory when you derive conserved currents.
The Lagrangian depends only on q, and t.No dependence on or higher. Drop this and you get the Ostrogradsky equations, which are fourth order and generically unstable.
The variation η(t) is arbitrary but smooth.Needed for the fundamental lemma at step 6. Drop smoothness and the lemma fails; the result then holds only in a weak sense.
Constraints are holonomic.Expressible as f(q, t) = 0, so that generalised coordinates can be chosen independently. Non-holonomic constraints require multipliers and the naive result is wrong.
Derivation
1
S[q] = ∫t1t2 L(q, , t) dt
Define the action as a functional — a machine that eats an entire path and returns one number. Hamilton's principle asserts that the physical path makes this number stationary. A
2
q(t, ε) = q(t) + ε η(t),   η(t1) = η(t2) = 0
Embed the true path in a one-parameter family of nearby paths. The family is pinned at both ends, so every member starts and finishes where the true path does. "Stationary" now means dS/ = 0 at ε = 0 — an ordinary derivative, not a functional one. A
3
dS/dε = ∫t1t2 ( ∂L/∂q · η + ∂L/∂ · η̇ ) dt
Chain rule under the integral sign, using ∂q/∂ε = η and ∂/∂ε = η̇. Differentiating under the integral is legal here because the integrand and its ε-derivative are continuous on a compact interval. B
4
∫ ∂L/∂ · η̇ dt = [ ∂L/∂ · η ]t1t2 − ∫ d/dt( ∂L/∂ ) η dt
Integrate the second term by parts. The purpose is to convert η̇ into η, so that a single common factor of η can be extracted from the whole integrand. This is the only genuinely creative step in the derivation. B
5
[ ∂L/∂ · η ]t1t2 = 0
The boundary term dies because η vanishes at both endpoints — this is where the fixed-endpoint assumption is spent. Note it precisely: nothing was assumed about ∂L/∂ itself. B
6
t1t2 ( ∂L/∂q − d/dt · ∂L/∂ ) η dt = 0  ∀ η
Collect. The integral vanishes for every admissible η. By the fundamental lemma of the calculus of variations, a continuous function whose integral against every smooth test function vanishes must itself be identically zero. If the bracket were non-zero anywhere, choose an η that is a bump there and the integral would not vanish. C
Result
d/dt ( ∂L/∂i ) − ∂L/∂qi = 0    for each i

Reading. One second-order equation per degree of freedom. The first term is the rate of change of the generalised momentum conjugate to qi; the second is the generalised force. So the equation says exactly what Newton's second law says — but in coordinates you chose for convenience, with constraint forces already eliminated.

Units check. ∂L/∂ has units of [energy]·[time]/[q]; its time derivative gives [energy]/[q], matching ∂L/∂q. For a Cartesian coordinate both reduce to newtons.

Limiting cases and special structures
  • If L does not contain qi at all, the coordinate is cyclic and ∂L/∂i is immediately conserved. Half of all mechanics problems are solved by spotting this.
  • If L does not contain t explicitly, a different quantity is conserved — see D-002.
  • Adding a total time derivative dF(q,t)/dt to L changes the action only by boundary terms and leaves the equations untouched. The Lagrangian is therefore not unique, which matters when you later gauge-fix.
Breaks when
  • Constraints are non-holonomic (rolling without slipping in three dimensions, for instance) — coordinates are no longer independent and multipliers are required.
  • Dissipative forces are present. Friction has no potential, so it cannot enter L; a Rayleigh dissipation function must be bolted on.
  • The action is stationary but not minimal. Beyond a conjugate point the true path is a saddle. "Principle of least action" is a misnomer often enough to matter.
Failure modes
  • Treating the boundary term as automatically zero when the endpoints are not in fact fixed — the error that hides the entire content of Noether's theorem in field theory.
  • Differentiating L with respect to t when only the explicit dependence is meant. ∂L/∂t and dL/dt are different objects and the distinction carries D-002 entirely.
  • Assuming L = T − V is a definition. It is a result that holds for a large class of systems, not the meaning of the Lagrangian.
Worked number — does it reproduce Newton?

Take L = ½m² − V(x). Then ∂L/∂ = m and ∂L/∂x = −V′(x). The result gives m = −V′(x). That is F = ma, recovered without ever drawing a force.

Run the check → symbolic EL generator vs. the double pendulum

Discussion

The Euler–Lagrange equation is what a global statement about an entire path looks like when you make it local. Hamilton's principle is a single sentence about the whole trajectory: of all the ways the system could get from its start to its finish, the physical one makes the action S stationary. That is a statement about a curve in configuration space, not about any one instant. The derivation's whole job is to squeeze that global condition down to something a differential equation can test point by point. The bracket that emerges, ∂L/∂q − d/dt(∂L/∂), is precisely the functional derivative δSq(t): it is the gradient of the action with respect to wiggling the path at time t. Setting it to zero at every t is the infinite-dimensional analogue of setting ∇f = 0 to find a stationary point of an ordinary function.

The equation is second order in time, and that is not an accident of any particular L — it is forced by Assumption 2. Because L carries but not , the term d/dt(∂L/∂) differentiates a function of (q, , t) once, producing at most . Second order is exactly what a mechanical initial-value problem needs: give position and velocity now and the future is fixed. The two pieces also have a clean identity. The quantity pi = ∂L/∂i is the generalised momentum conjugate to qi, and ∂L/∂qi is the generalised force. The equation reads dpi/dt = (generalised force): Newton's second law wearing coordinate-independent clothes.

The deeper reason to prefer this formulation is covariance. The Euler–Lagrange operator transforms as a covector under any smooth, possibly time-dependent change of coordinates qQ(q, t): if the equations hold in one chart they hold in every chart, with no fictitious-force bookkeeping. This is why the same three lines generate geodesics on a curved manifold (take L = ½gij(q)ij and the result is the geodesic equation with Christoffel symbols), classical fields (promote t to the four coordinates xμ, replace d/dt by ∂μ, and ∂μ(∂L/∂(∂μφ)) − ∂L/∂φ = 0 is the field equation), and the whole of general relativity from the Einstein–Hilbert action. The same variational skeleton, with the boundary term of step 5 kept alive instead of killed, is Noether's theorem: a symmetry of L makes a specific combination of ∂L/∂ conserved. And the Legendre transform H = pL converts this one second-order equation into Hamilton's two first-order equations, the gateway to phase space, Poisson brackets and canonical quantisation.

Common misconceptions. First, "least action" is a misnomer: the action is stationary, and past a conjugate point the true path is a saddle, not a minimum (see Breaks-when). Second, d/dt here is a total time derivative — it acts on q(t) and (t) inside ∂L/∂, so it generically produces cross terms in , and q, not just ∂/∂t. Third, L = TV is not the definition of the Lagrangian; it is a form that happens to work for a broad class of systems. Fourth, the Lagrangian is not unique — adding any total derivative dF(q,t)/dt leaves every equation of motion unchanged, which is the classical seed of gauge freedom.

Worked examples

Example 1 — The plane pendulum from a single coordinate. A bob of mass m hangs on a rigid massless rod of length and swings in a vertical plane. The rod constraint is holonomic, so one generalised coordinate — the angle θ from the downward vertical — suffices, and the (unknown) rod tension never appears. Find the equation of motion and the small-oscillation period for = 0.25 m, g = 9.81 m s−2.

1
T = ½mℓ2θ̇2,   V = −mgℓ cosθ,   L = ½mℓ2θ̇2 + mgℓ cosθ
Speed of the bob is ℓθ̇; height above the pivot is − cosθ. Build L = TV.
2
L/∂θ̇ = mℓ2θ̇,   d/dt(∂L/∂θ̇) = mℓ2θ̈,   ∂L/∂θ = −mgℓ sinθ
Form the two pieces of the Euler–Lagrange equation. The conjugate momentum mℓ2θ̇ is the angular momentum about the pivot.
3
mℓ2θ̈ + mgℓ sinθ = 0 ⇒  θ̈ = −(g/) sinθ
Insert into d/dt(∂L/∂θ̇) − ∂L/∂θ = 0 and divide by mℓ2. Mass has dropped out entirely.
4
sinθθθ̈ = −(g/)θ,   ω = √(g/),   T = 2π√(/g)
Linearise for small amplitude. The result is simple harmonic motion with angular frequency ω.
5
T = 2π√(0.25 / 9.81) = 2π√(0.02548 s2) = 2π(0.1597 s)
Substitute numbers only now.
θ̈ = −(g/) sinθ,   Tsmall = 1.00 s

Answer. The equation of motion is θ̈ = −(g/) sinθ, independent of mass, and the small-amplitude period is T = 2π√(ℓ/g) = 1.00 s. The rod tension — a constraint force — never entered the calculation.

Example 2 — Bead on a rotating hoop: an off-axis equilibrium. A bead of mass m slides without friction on a circular wire of radius R that is forced to spin about its vertical diameter at constant angular velocity Ω. Let θ be the bead's angle from the lowest point. The spin is imposed, so θ is the one true degree of freedom. Find the equation of motion and the stable equilibrium angle for R = 0.20 m, Ω = 12 rad s−1, g = 9.81 m s−2.

1
T = ½mR2(θ̇2 + Ω2 sin2θ),   V = −mgR cosθ
The bead has velocity Rθ̇ along the wire and sinθ around the spin axis (its distance from the axis is R sinθ). Height above centre is R cosθ below, hence the minus sign in V.
2
L = ½mR2θ̇2 + ½mR2Ω2 sin2θ + mgR cosθ
L = TV. The middle term acts as a negative effective potential — the centrifugal contribution — because the spin is prescribed, not dynamical.
3
L/∂θ̇ = mR2θ̇,  d/dt(•) = mR2θ̈,  ∂L/∂θ = mR2Ω2 sinθ cosθmgR sinθ
Assemble the two pieces of the Euler–Lagrange equation.
4
θ̈ = sinθ (Ω2 cosθg/R)
Divide by mR2. Equilibria (θ̈ = 0) are sinθ = 0, or cosθ0 = g/(Ω2R) when the spin is fast enough that Ω2 > g/R.
5
Ω2 = 144 s−2 > g/R = 49.05 s−2;   cosθ0 = 49.05 / 144 = 0.3406
The bifurcation threshold is passed, so the off-axis equilibrium exists. Evaluate it.
θ0 = arccos(0.341) = 70.1°

Answer. The equation of motion is θ̈ = sinθ(Ω2 cosθg/R). Above the critical spin Ωc = √(g/R) = 7.00 rad s−1 the bottom position θ = 0 turns unstable and the bead settles at θ0 = 70.1°. This pitchfork bifurcation drops straight out of the Euler–Lagrange equation with no free-body diagram of the wire's reaction force.

Problems
  1. Free particle. For L = ½m2, apply the Euler–Lagrange equation and interpret the conserved quantity.
    Solution

    L/∂ = m, so d/dt(m) = m; ∂L/∂x = 0. The equation gives m = 0, i.e. = 0. Since x is absent from L it is a cyclic coordinate, so its conjugate momentum p = m is conserved — this is exactly conservation of linear momentum for a free particle.

  2. Projectile in uniform gravity. With L = ½m(2 + 2) − mgy, find both equations of motion and identify which momentum is conserved.
    Solution

    x: ∂L/∂ = m, ∂L/∂x = 0 ⇒ m = 0, so = 0. y: ∂L/∂ = m, ∂L/∂y = −mgm = −mg, so = −g. Because L has no explicit x, the horizontal momentum px = m is conserved; the vertical direction has a force, so py is not.

  3. Harmonic oscillator, with numbers. For L = ½m2 − ½kx2 with m = 0.50 kg and k = 20 N m−1, derive the equation of motion and compute the oscillation period.
    Solution

    L/∂ = m ⇒ d/dt = m; ∂L/∂x = −kx. Euler–Lagrange: m + kx = 0, i.e. = −(k/m)x. Then ω = √(k/m) = √(20/0.50) = √40 = 6.32 rad s−1, and T = 2π/ω = 2π/6.32 = 0.993 s.

  4. Atwood machine. Two masses m1 = 3.0 kg and m2 = 5.0 kg hang over a massless, frictionless pulley on an inextensible string. Using the single coordinate x (the descent of m2), find the acceleration by the Euler–Lagrange method. Note how the string tension is bypassed.
    Solution

    The constraint ties both speeds to . Kinetic energy T = ½(m1 + m2)2; potential (taking m2 descending, m1 rising) V = −m2gx + m1gx. So L = ½(m1+m2)2 + (m2m1)gx. Euler–Lagrange: (m1+m2) = (m2m1)g, giving = (m2m1)g/(m1+m2) = (2.0)(9.81)/8.0 = 2.45 m s−2. The internal tension is a constraint force and never appears because a single unconstrained coordinate was chosen.

  5. Central force in polar coordinates (harder). A particle of mass m moves in a plane under a central potential V(r). With L = ½m(2 + r2φ̇2) − V(r), obtain both equations of motion, identify the conserved quantity, and reduce the radial motion to a one-dimensional problem with an effective potential.
    Solution

    φ-equation: ∂L/∂φ̇ = mr2φ̇, ∂L/∂φ = 0. Since φ is cyclic, d/dt(mr2φ̇) = 0, so the angular momentum = mr2φ̇ is conserved. r-equation: ∂L/∂ = m ⇒ d/dt = m; ∂L/∂r = mrφ̇2V′(r). Euler–Lagrange: m = mrφ̇2V′(r). Eliminate φ̇ = /(mr2): m = 2/(mr3) − V′(r) = −dVeff/dr with Veff(r) = V(r) + 2/(2mr2). The radial motion is thus that of a single particle in the effective potential Veff, whose extra term is the centrifugal barrier — a direct consequence of the conserved that the cyclic φ handed us.