Calculus of Variations & Transversality
A derivation-first account of the first variation, Euler–Lagrange equation, natural and moving-endpoint boundary conditions, conserved quantities, constraints, and the second-order tests that distinguish an extremal from a minimum.
Calculus of variations asks for a function that minimizes a functional. Its central move is to perturb the entire candidate curve, compute the first-order change, and require that change to vanish for every admissible perturbation. The Euler–Lagrange equation is what remains in the interior; transversality conditions are what remain at free endpoints.
From a perturbed curve to the first variation #
Consider
with fixed endpoints and . Let
where is any smooth variation satisfying . Define
At a differentiable local minimum, . Differentiating under the integral gives the first variation
Integrate the second term by parts:
The boundary term vanishes for fixed endpoints. Because the remaining integral must be zero for every such , the fundamental lemma yields
This is the Euler–Lagrange equation. For a vector curve , it holds componentwise:
What the equation does and does not prove #
The Euler–Lagrange equation is a necessary first-order condition. A solution is an extremal, not automatically a minimum. It may be a maximum, a saddle, or inadmissible once constraints and endpoints are enforced.
For example,
has
so every extremal satisfies
and therefore
The endpoint values determine . Because the integrand is jointly convex in , that feasible extremal is also the unique global minimizer. Without convexity, the differential equation alone would not justify that conclusion.
Free endpoints create natural boundary conditions #
If is free while remains fixed, is arbitrary. The boundary term requires
If is also free, then as well. These are natural boundary conditions: they are not specified by the user but forced by stationarity.
When the terminal point may move in both coordinates, write its variation as . The terminal boundary contribution becomes
For a completely free terminal point,
If the endpoint must lie on a curve , then allowable endpoint variations satisfy
Stationarity means the variational boundary covector is normal to that target curve. Equivalently, for some multiplier ,
First integrals from missing coordinates #
Euler–Lagrange contains useful conservation laws.
If does not depend explicitly on , then and
If does not depend explicitly on , differentiate
along an extremal. Euler–Lagrange cancels the remaining terms, giving the Beltrami identity
This is the variational ancestor of Hamiltonian conservation for autonomous optimal-control problems.
Integral and pointwise constraints #
An isoperimetric constraint
introduces a constant multiplier . Extremals satisfy Euler–Lagrange for the augmented integrand
A pointwise equality requires a multiplier function , because the restriction applies at every :
Inequality constraints require complementary-slackness logic and can create boundary arcs. Simply assigning a large penalty to a violated constraint changes the problem; it does not reproduce an exact hard constraint.
Second variation and minimum tests #
The second variation is
A necessary local-minimum condition is the Legendre condition
along the extremal; the strengthened form uses . This still may not be sufficient because the mixed and terms can make the quadratic form negative for some extended variation. Conjugate-point or Jacobi analysis checks that global-in-the-interval failure mode.
For convex and a convex feasible set, every stationary feasible curve is a global minimizer. Convexity is therefore much stronger than a local second-order test, but many control problems with nonlinear dynamics or nonconvex constraints do not have it.
From curves to controlled dynamics #
Introduce a state , control , and dynamics
The variational integrand becomes a running cost. More general state equations constrain the permissible relation between a trajectory and its derivative, and bounded or discontinuous controls invalidate the naive assumption that every variation of is small and smooth. Needle variations solve that problem and lead to the Pontryagin maximum principle.
The central lesson survives the generalization: interior differential equations and endpoint transversality are two parts of one stationarity calculation. Dropping either part leaves the boundary-value problem incomplete.