The calculus of variations is a powerful mathematical tool for finding optimal functions. It's used to solve problems like finding the shortest path between two points or the shape of a hanging chain.
At its core, the calculus of variations uses the Euler-Lagrange equation to find stationary points of functionals. This leads to solutions for various optimization problems in physics, engineering, and economics.
Calculus of Variations
Euler-Lagrange equations derivation
- Provide necessary conditions for a function to be a stationary point of a functional (mapping from vector space to real numbers)
- Consider functional and assume is a stationary point
- Introduce small variation around and expand using Taylor series
- Set first-order term to zero, integrate by parts, and apply fundamental lemma of calculus of variations
- Resulting Euler-Lagrange equation:
- Express balance between change in with respect to and change in with respect to
- Solutions make functional stationary (minimum, maximum, or saddle points)
Variational problem solutions
- Identify functional to be minimized or maximized
- Write Euler-Lagrange equation:
- Solve differential equation for subject to boundary conditions
- Verify solution satisfies sufficient conditions for optimality (if applicable)
- Examples:
- Geodesics: Find shortest curve connecting two points on a surface
- Brachistochrone: Find curve of fastest descent between two points under gravity
- Isoperimetric problems: Maximize or minimize quantity subject to perimeter or area constraint

Advanced Topics in Variational Calculus
Legendre transform in variations
- Convert between Lagrangian (generalized coordinates and velocities) and Hamiltonian (generalized coordinates and momenta) formulations
- Legendre transform definition: Given , transform
- Relates Lagrangian and Hamiltonian
- Define generalized momentum
- Hamiltonian given by Legendre transform of Lagrangian:
- Hamilton's equations of motion: and
- Advantages: Symmetric treatment of coordinates and momenta, rich mathematical structure (symplectic geometry, Poisson brackets)
Optimality conditions for variations
- Ensure solution to Euler-Lagrange equations is minimum or maximum of functional
- Second variation : Second-order term in Taylor expansion of
- For minimum (maximum), must be non-negative (non-positive) for all admissible variations
- Legendre condition: Necessary condition for second variation to be non-negative (non-positive)
- For minimum:
- For maximum:
- Jacobi's condition: Strengthened Legendre condition requiring absence of conjugate points along solution curve
- Conjugate points: Points where solution to Jacobi equation (linearized Euler-Lagrange equation) vanishes
- Presence indicates solution is not strict minimum or maximum
- Weierstrass-Erdmann corner conditions: Apply when solution curve has corners (discontinuities in first derivative)
- At corner: and must be continuous