Vector Space Methods VII: Euler–Lagrange EquationsTextbook
Motivation
The calculus of variations replaces optimization over finitely many coordinates by optimization over paths. Its necessary conditions underlie geodesics, minimum-energy curves, classical mechanics, and many optimal-control models. Chapter 7 of David G. Luenberger's Optimization by Vector Space Methods presents this transition as an application of differentiation in normed vector spaces: a local extremum first forces every directional derivative to vanish, and the resulting integral identity forces a differential equation along the optimizing path. This mission formalizes the scalar, fixed-endpoint version in §§7.4–7.5. The target is intentionally the theorem actually isolated by the source, not a stronger modern Sobolev-space variant.
Setting
Fix real numbers . A path on the segment is represented in Lean by two functions, . Both are continuous on , and has derivative at every . Ordinary two-sided derivatives are not demanded at or ; this makes the formal endpoint convention match the one-sided role of endpoints in a closed interval.
Let be a scalar Lagrangian. Along a candidate path, write
The Lean statement records these partial derivatives with HasDerivAt and assumes that and are continuous on . A fixed-endpoint variation is another pair with . The first variation already computed from the action is
The main theorem begins from the stationarity identity for every such variation. It does not claim that the complete passage from a local extremum in Luenberger's norm to this integral formula has already been bundled into the root statement.
Formalization targets
Main goal: Euler–Lagrange equation
From the computed first-variation identity, prove that
The conclusion is expressed as HasDerivAt Lv (Lx t) t, so it asserts both differentiability of and the equality of its derivative with . This is equation (2) and the conclusion reached on printed pages 180–181.
Milestones
The first milestone formalizes §7.4, Theorem 1: a local minimum or maximum of a real functional has zero derivative along every direction whenever that scalar directional derivative exists. The remaining milestones are the three fixed-endpoint fundamental lemmas from §7.5. They respectively show that a continuous coefficient annihilating all variations is zero, that a continuous coefficient annihilating all variation derivatives is constant, and that an identity involving both and forces the second coefficient to have derivative equal to the first. These are stated with the same variation class used by the goal.
Significance
The result turns an infinite family of scalar integral equalities into a pointwise differential equation. Once available, the same interface can support standard variational examples by supplying a concrete , its two partial derivatives, and a stationary path. It also provides the analytic core needed before treating natural boundary conditions, vector-valued paths, higher derivatives, or weak Euler–Lagrange equations.
The formalization adds reusable interval-sensitive infrastructure. In particular, IsC1OnSegment separates a path from its chosen continuous derivative and avoids silently imposing derivatives outside the optimization interval. The three fundamental lemmas are useful independently of the named Euler–Lagrange theorem: they are test-function principles for interval integrals and can serve later missions involving integration by parts or weak formulations. The mathematics is classical and proved in the cited text; the open work is a machine-checked Lean development of these exact statements in the pinned Mathlib environment.
Difficulty
The source argument uses informal phrases such as “arbitrary function vanishing at the endpoints” and treats endpoint differentiation according to standard calculus convention. In Lean, those phrases must determine a precise domain, derivative witness, continuity requirement, and interval-integral orientation. Replacing variations by merely continuous functions would change Lemmas 2 and 3, while requiring HasDerivAt at the endpoints would add a hypothesis not present in the book.
Another tempting shortcut is to assume from the outset that is differentiable and then use integration by parts. That would trivialize the central regularity conclusion of Lemma 3: the book derives differentiability of from stationarity and continuity. The root therefore assumes only continuity of the two coefficient functions and concludes a HasDerivAt assertion on the open interval. Conversely, constructing the first variation from a local extremum of the action requires a separate differentiation-under-the-integral development and a topology on bundled paths; it is not hidden inside the main goal.
Formalization scope
The scalar field, path values, time variable, and action values are all real. The interval is nondegenerate through the explicit hypothesis . Integrals use Mathlib's oriented interval integral, but all principal statements are made in the forward orientation. Paths and variations are total functions on whose relevant regularity is restricted to . The Lagrangian is finite-valued. No measurability or integrability premise is omitted: continuity of the coefficient and variation factors on the compact interval supplies the intended finite integrals.
The goal starts from an already computed first-variation identity. Contributions connecting a genuine local extremum of the action in the norm to that identity are welcome as a strengthening, but they must not be advertised as part of the present root theorem. Other welcome contributions include reusable continuous test-function constructions and endpoint-aware interval integration lemmas. Sobolev paths, vector-valued state spaces, free endpoints, and weak derivatives are outside this mission and should be proposed separately rather than obtained by weakening the stated hypotheses until the result becomes vacuous.
Selected references
- David G. Luenberger, Optimization by Vector Space Methods, John Wiley & Sons, 1969, Chapter 7, §§7.4–7.5, pp. 178–181; definition of on p. 23. Open Library record