Euler–Lagrange Variations
Bend a fixed-endpoint path and locate the stationary value of an integral functional.
By Riano · Published · Updated · Report a correction
Calculus of Variations: Finding the Stationary Path
The Euler-Lagrange equation determines the path that makes an integral functional stationary. Here, we bend a polynomial path with fixed endpoints to minimize a model functional, revealing the connection between the functional derivative and ordinary calculus.
Worked example: The convex action functional
Consider the family of paths yc(t) = A + (B - A)t + ct(1 - t) on t ∈ [0, 1]. The functional is J[y] = ∫01 (0.5(y')2 + qy) dt. We want to find the optimal bend c* that minimizes this functional.
- Let A=0, B=1, and q=2. The path becomes yc(t) = t + ct(1 - t), so y'c(t) = 1 + c(1 - 2t).
- Substitute yc and y'c into J. The exact integral evaluates to J(c) = 0.5 + c2/6 + c/3 + 1. Simplifying, J(c) = 1.5 + (c2 + 2c)/6.
- Set the ordinary derivative dJ/dc to zero. dJ/dc = c/3 + 1/3 = 0, which yields the optimal bend c* = -1.
- At c* = -1, the functional evaluates to J(-1) = 1.5 + (1 - 2)/6 = 1.3333333333333333. The theoretical excess for bend c=0 is J(0) - J(-1) = 1.5 - 1.3333333333333333 = 0.16666666666666666.
Perturbing the path with real controls
Open Euler–Lagrange Variations to observe the path variations interactively.
- Set the Endpoints to "Rising" (0 to 1) and Forcing q to 2. The optimal Stationary bend c* is calculated as -1.
- Set the Bend c to 0. Notice the Functional value is 1.5, matching our manual calculation. The Euler Lagrange residual (y'' - q) is -2, indicating the path is not stationary.
- Adjust the Bend c to -1. The residual becomes 0, the Functional derivative is 0, and the Excess above minimum falls to 0.0. The path visually aligns with the dashed stationary path.
- Change Endpoints to "Shifted" (1 to 2) and Forcing q to -2. Adjust Bend c to 1 to find the new stationary configuration.
A restricted polynomial family
This module uses a specific one-parameter family of trial functions: a straight line perturbed by a parabola ct(1-t). The true minimum of a general functional might not take this shape.
Because the forcing term q is constant and the functional is strictly convex, the true extremal path is indeed a parabola (y'' = q). This allows our restricted one-parameter family to locate the exact true minimum. For a more general forcing term q(t) or a non-linear Lagrangian, a single degree of freedom would only find an approximate variational minimum within that subspace (like in the Rayleigh-Ritz method), not the exact solution to the boundary value problem.
The Principle of Least Action
Read about the path-integral formulation and functional variations in The Feynman Lectures on Physics, Vol. II, Chapter 19. Feynman intuitively explains how setting the variation of the action to zero yields the differential equations of motion.
Experience it interactively
Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Euler–Lagrange Variations module.
Try Euler–Lagrange Variations on Riano →