Analysis
Calculus of variations
Finds functions that minimize or maximize integral quantities, such as the shortest path or least time.
IntuitionWhat curve costs the least?
Ordinary calculus finds the input number that minimizes an output number. Calculus of variations asks a stranger question: among all possible functions satisfying some boundary condition, which whole function minimizes an integral built from it? A ray of light bends through glass so as to minimize travel time (Fermat's principle); a hanging chain settles into the shape that minimizes potential energy; a soap film stretched across a wire loop minimizes surface area. In every case, the unknown is not a number but an entire curve.
SchoolThe shortest path and the most enclosed area
Definition: Functional
A functional is a rule that assigns a single number to an entire function, instead of to a single number. Calculus of variations studies functionals built as integrals of a function together with its derivative, and looks for the function that makes this integral as small (or as large) as possible.
Here and are the fixed endpoints, is the unknown curve with given values at the endpoints, is its derivative, and (the Lagrangian) is a given function of three slots that encodes the quantity being accumulated — arc length, travel time, energy, and so on.
| Problem | Functional / constraint | Optimal curve |
|---|---|---|
| Shortest path (geodesic) in the plane | minimize | a straight line |
| Brachistochrone (least time) | minimize | a cycloid |
| Isoperimetric (max area, fixed perimeter) | maximize with fixed perimeter | a circle |
UndergraduateNecessary conditions for an extremal
Let be a twice continuously differentiable function on with fixed endpoint values , . If extremizes the functional among all such curves, then satisfies for every .
Why is it true?
This mirrors setting an ordinary derivative to zero at a minimum, but here the 'direction' we perturb in is not a single number but an entire admissible variation of the curve. Requiring the first-order change to vanish for every such variation forces the pointwise balance between the direct -dependence of and the -dependence, encoded exactly by this equation.
Proof
Fix an arbitrary smooth function with , and consider the one-parameter family of competitor curves , all of which share the same endpoint values as . Define ; since is assumed to extremize , the ordinary function has a critical point at , so .
Differentiating under the integral sign, , where the partial derivatives of are evaluated along . Setting gives .
Integrate the second term by parts: . The boundary term vanishes because , leaving .
This integral vanishes for every admissible . By the fundamental lemma of the calculus of variations — if a continuous function integrates to zero against every such test function, the function itself must be identically zero — the bracketed quantity vanishes at every , which is exactly .
If the Lagrangian has no explicit dependence on , then along any extremal the quantity is constant.
Why is it true?
This is a conserved quantity, exactly analogous to conservation of energy: when the 'rules' do not change as we slide along , a specific combination of and stays fixed. It gives a first-order equation in place of the second-order Euler–Lagrange equation, which is often much easier to solve directly.
Proof
Define evaluated along an extremal , and differentiate with respect to using the chain rule: .
The two terms containing cancel exactly, leaving .
But is an extremal, so by the Euler–Lagrange equation the bracketed factor is identically zero along . Hence everywhere on the interval, which means is constant, proving the claim.
UndergraduateReal-World Applications and Worked Examples
Calculus of variations underlies geodesics in general relativity and robot motion planning (shortest/least-cost path on a curved space), Fermat's principle in optics and lens design, minimal-surface soap films and architectural shell design, and optimal-control problems in economics and aerospace engineering (minimum-fuel trajectories). The two worked examples below derive the two most famous variational curves by hand.
Example: The brachistochrone problem
A bead slides without friction under gravity along a wire from the origin down to a lower point (taking positive downward). Among all wire shapes joining these two points, which one lets the bead arrive in the least time?
Solution
By conservation of energy, starting from rest at , the bead's speed at height satisfies . Since speed is arc length per unit time, the total travel time is , using .
The integrand depends on and but not explicitly on , so the Beltrami identity applies directly. Computing and simplifying gives , which rearranges to for some constant .
This first-order equation is solved by the substitution , which after integration yields the parametric family with — a cycloid, the curve traced by a point on the rim of a rolling circle.
So the fastest path is not the straight line: the cycloid initially drops more steeply than a straight line, trading extra distance for extra speed gained early, and this trade-off is exactly what the Euler–Lagrange/Beltrami machinery makes precise.
Example: Isoperimetric problem: maximum area for a fixed perimeter
Among all smooth simple closed curves in the plane with a given fixed perimeter , which one encloses the largest area?
Solution
This is a constrained variational problem: maximize the area subject to the constraint that the perimeter is fixed, where the curve is parametrized by .
As with constrained optimization in ordinary calculus, introduce a Lagrange multiplier and extremize the combined functional freely (no constraint), by applying the Euler–Lagrange equation separately to the and components.
Carrying out this variation shows that the curvature of an extremal curve must be constant along its entire length — a curve of constant curvature in the plane is precisely a circle. So among all closed curves of perimeter , only the circle of radius can be an extremal.
Since a circle of that radius indeed encloses area , and no closed curve of the same perimeter can enclose more (this is the isoperimetric inequality), the circle is confirmed as the maximizer — matching the everyday observation that round shapes 'use' their boundary most efficiently.
In the Euler–Lagrange equation, what condition must satisfy for it to hold?
What is the shape of the brachistochrone, the curve of fastest descent under gravity?
For the functional with , , which curve does the Euler–Lagrange equation select?
Among all simple closed curves enclosing a fixed perimeter, which shape maximizes the enclosed area?
References
- I. M. Gelfand, S. V. Fomin (2000). Calculus of Variations
- Mark Kot (2014). A First Course in the Calculus of Variations
- Camillo De Lellis, Matteo Focardi (2023). The regularity theory for the Mumford-Shah functional on the plane · arXiv:2308.14660 [preprint, not peer-reviewed]