First Variation and Stationarity
Ordinary calculus finds the extrema of by demanding that its differential vanish: for every displacement . The calculus of variations asks the same question one level up, about functionals — machines that eat an entire function and return a number . The length of a curve, the travel time of a sliding bead, the action of a trajectory: each is a functional, and each physical problem is the demand that its functional be stationary. The first variation makes that demand precise. The construction is disciplined and, once seen, unmistakably ordinary. Embed the candidate in a one-parameter family , where perturbs the whole curve, and watch as sweeps through zero. Because is an honest function of one variable, all of single-variable calculus reawakens: the first variation is simply , and stationarity at is nothing more than — but now required for every direction . That word every is the whole engine. In finite dimensions for all collapses to equations ; for functionals, for all forces the bracket to vanish at every interior point — an infinity of conditions packaged as one differential equation (Euler–Lagrange), with the leftover boundary term dictating the boundary conditions. Stationarity, not minimality, is the universal language: Hamilton's principle, geodesics, Fermat's principle, and the brachistochrone are all one statement — some functional has .
- A functional assigns a number to each admissible function ; the first variation is the analogue of the differential for such maps.
- Formally — the Gâteaux derivative of at along the admissible perturbation .
- A function is stationary (an extremal) when for every admissible ; this is lifted to infinite dimensions.
- For one integration by parts gives — a bulk term plus a boundary term.
- Arbitrariness of plus the fundamental lemma forces the bulk bracket to zero (Euler–Lagrange); the boundary term yields essential or natural boundary conditions.
- Stationary is not minimal: locates minima, maxima, and saddles alike, exactly as does; the second variation decides which.
- Key idea: replace the gradient of a function by the first variation of a functional — a function is stationary when for all admissible , and that arbitrariness is what converts the scalar into a differential equation plus boundary conditions.
Replace the gradient of a function by the first variation of a functional: a function is stationary when for every admissible perturbation , and the arbitrariness of is exactly what turns one scalar equation into a differential equation plus boundary conditions.
Where this lives today
The first variation is not a museum piece — it is a live computational engine. The finite element method, which simulates aircraft wings, bridges, and beating hearts, is built directly on it: one writes the energy of a structure as a functional, takes its first variation to obtain the "weak form," and discretizes that rather than the raw differential equation. The essential-versus-natural split of Derivation 2 is exactly what a finite-element engineer respects — displacement (essential) conditions are imposed on the trial functions, while traction (natural) conditions emerge from the boundary term, precisely as did above. In optimal control, Pontryagin's maximum principle is the first variation of a cost functional under dynamical constraints, routing spacecraft and training control policies. In general relativity, Einstein's field equations are the statement that the first variation of the Einstein–Hilbert action vanishes, : the same Lagrange applied to a sliding bead now shapes spacetime. And the entire Standard Model is one Lagrangian plus the demand of stationary action, the first variation unpacking that single line into every equation of motion. Wherever a system "chooses" a configuration by optimising something, the first variation is how that choice is computed.
The physical picture
Picture the functional as the altitude of a landscape over an infinite-dimensional space whose every point is an entire curve . To walk away from in a direction is to deform the whole curve into , sliding it continuously as grows. The first variation is the slope of that landscape along the chosen direction; stationarity means the ground is dead flat in every direction at once — and because there are infinitely many independent directions, flatness in all of them is an enormously strong condition. The first figure fixes the geometry: a bundle of admissible curves pinned at the same two endpoints, differing only by the variation that swells and shrinks in between.
Slice the landscape along a single direction and the infinite-dimensional problem shrinks to a curve that ordinary calculus handles at sight: flat to first order () at an extremal, curving up, down, or into a saddle at second order. The second figure draws that slice for a concrete functional whose numbers we pin down exactly, so "the first variation vanishes" becomes an arithmetic fact — a parabola with a horizontal tangent and a definite curvature.
Why insist on stationary rather than minimal? Because the first-order condition is blind to the sign of the curvature — it cannot tell a valley from a ridge from a mountain pass. The action of a free particle is minimized over short times but only a saddle over long ones, yet the equations of motion are identical. Physics asks only for ; the character of the extremum is a separate, second-order question.
The core equations
The first variation is defined by freezing the direction and differentiating with respect to the amplitude — the directional (Gâteaux) derivative of , the functional analogue of .
where: — a functional mapping the function to a real number; — the candidate (base) function tested for stationarity; — an admissible variation, a perturbing function of the same class; — a real scalar whose limit extracts the linear part; — the first variation, the leading-order change of in the direction . Expanding in powers of the amplitude names its Taylor tower: the coefficient of is the first variation, and the coefficient of is the second variation, which decides the extremum type.
where: — the second variation, positive for a minimum and negative for a maximum along ; — higher-order terms negligible as . This is the Maclaurin series of read term by term. Stationarity is the vanishing of the entire first variation — not for one lucky direction but for all admissible ones at once.
where: admissible — variations smooth enough and respecting the imposed boundary constraints (vanishing where the endpoint value is prescribed). One direction proves nothing; the quantifier "for all" does the work. For the canonical integral functional the chain rule turns the definition into an integral over the two partial derivatives of — the raw first variation, before integration by parts.
where: — the integrand, the Lagrangian density; — partial derivative holding fixed; — partial derivative with respect to the slope; . The two terms track how responds to shifting the height and the slope . Integrating the term by parts factors out a common and exiles the leftover to the endpoints — the master formula of the whole subject, from which every Euler–Lagrange equation and boundary condition falls out.
where: — total derivative along the curve, accounting for the , , dependence of ; — the boundary term at the two endpoints. The bulk integrand is what the fundamental lemma acts on; the bracket is the seed of the boundary conditions. When the endpoints are pinned the boundary term dies, and the arbitrariness of forces the bracket in to vanish pointwise — the Euler–Lagrange equation every extremal obeys.
where: the equation holds at every interior point for a stationary . It is generally second order, its two constants fixed by the boundary data. When the integrand carries no explicit , the Euler–Lagrange equation has an automatic first integral — the Beltrami identity — lowering the order by one before any solving begins.
where: the constant is fixed by one boundary condition. This is the variational shadow of energy conservation — -translation symmetry of produces a conserved quantity, a baby Noether theorem. For a vector-valued curve the same steps give one equation per component, since the components of are independently arbitrary.
This is the flagship calculation of the calculus of variations, and every later structure inherits from it: take the fixed-endpoint problem with and prescribed, compute its first variation from the definition, impose stationarity, and let the arbitrariness of the variation collapse a single scalar equation into a pointwise differential equation via the fundamental lemma. The Euler–Lagrange equation then appears as the forced consequence of demanding flatness in every direction, not a formula to memorise. The boxed result is .
Step 1. Form and differentiate under the integral sign at , legitimate because is smooth and the interval is fixed. Why: this reduces an infinite-dimensional derivative to an ordinary one-variable derivative — the move that makes the subject tractable.
Step 2. Apply the chain rule: since and , evaluating at gives . Why: this exposes the two channels through which the deformation feeds into — height and slope — and is exactly equation .
Step 3. Integrate the second term by parts with , : , so . Why: shifting the derivative off onto makes a common factor — the only way the fundamental lemma can later be applied.
Step 4. Impose the fixed-endpoint conditions: admissible variations may not disturb the prescribed values, so and the boundary term vanishes. Why: this is where the essential boundary conditions enter and remove the boundary term, leaving a pure bulk integral.
Step 5. Set for all such : for every continuous vanishing at the ends. By the fundamental lemma the bracket must vanish at every interior point, giving . Why: a continuous function that integrates to zero against every test function must itself be zero — the mechanism that turns one scalar equation into an infinity of pointwise ones. *Verified: reproduces the standard Euler–Lagrange derivation in Stone & Goldbart §1.2, Arfken & Weber Ch. 22, and Gelfand & Fomin §3.*
Go deeper · Derivation B · 1 minThe natural boundary condition from a free endpoint
When an endpoint is not held fixed, the boundary term in the master formula can no longer be discarded, and its survival forces a condition on at that end — a condition the problem chooses for itself rather than one imposed by hand, which is why it is called natural. Running the same machinery with a free right endpoint, while tracking which part of the arbitrariness of enforces the interior equation and which enforces the boundary equation, makes the essential-versus-natural split transparent. Take prescribed but free, so while ranges freely. The boxed result is .
Step 1. Write the master formula with the boundary term expanded at each end: . Why: keeping the endpoints separate is essential once they carry different constraints.
Step 2. Drop the fixed end using : . Why: the prescribed left value kills its boundary contribution, isolating the free-endpoint physics on the right.
Step 3. Exploit the arbitrariness in stages. First restrict to variations that also vanish at : these see only the integral, and the fundamental lemma forces the interior bracket to zero — the Euler–Lagrange equation still holds. Why: the extremal obeys the same interior equation regardless of the free end, so the bulk term is settled first.
Step 4. With the integral now zero, the remaining requirement is for all ; since is unconstrained, its coefficient must vanish: . Why: an arbitrary nonzero multiplier is annihilated only if its coefficient is zero — the natural, Neumann-type condition the variational principle supplies for free. *Verified: matches the treatment of natural boundary conditions in Gelfand & Fomin §6 and Riley, Hobson & Bence Ch. 22.*
Go deeper · Derivation C · 1 minThe Beltrami first integral when the integrand hides x
Many of the classic variational problems — geodesics, the brachistochrone, the catenary, minimal surfaces of revolution — share the feature that their integrand depends on and but not explicitly on . In exactly that case the Euler–Lagrange equation, normally second order, admits a first integral that reduces it to first order before any real integration is attempted. The aim is to derive that shortcut directly from the Euler–Lagrange equation and recognise it as the variational form of energy conservation under translation of the independent variable. The boxed result is .
Step 1. Take the total -derivative of , using the chain rule on : . Why: this combination is engineered so the terms cancel, leaving something proportional to the Euler–Lagrange expression.
Step 2. Cancel the two terms and factor: . Why: the derivative has collapsed onto the Euler–Lagrange bracket, so a stationary curve makes the right-hand side vanish.
Step 3. On an extremal the bracket is zero, hence . Why: a quantity with zero derivative along the curve is conserved — Noether's theorem in miniature, with -translation symmetry producing the "Hamiltonian" . *Verified: the Beltrami identity as given in Arfken & Weber Ch. 22 and Lanczos, The Variational Principles of Mechanics; it reproduces the cycloid for the brachistochrone and the catenary for the minimal surface of revolution.*
Limiting cases
The first variation specializes cleanly whenever the problem simplifies — each row is a genuine reduction.
| Case | Result | Meaning |
|---|---|---|
| Finite-dimensional analogue | When the function space is just , the first variation is the ordinary differential and stationarity is . | |
| Fixed endpoints | The boundary term drops and stationarity is pure Euler–Lagrange. | |
| Free endpoint | An unconstrained end forces the natural boundary condition there. | |
| No explicit dependence | Stationarity admits the Beltrami first integral, lowering the order before solving. | |
| No explicit dependence | The Euler–Lagrange equation integrates once immediately: is conserved (a momentum). |
Worked examples
1 · The first variation of a quadratic functional, fully numerical (confidence builder)
Take on curves with , . Show that is stationary, and use the specific admissible variation to compute and explicitly.
Step 1. Here , so , , and the Euler–Lagrange equation reads , whose endpoint-matching solution is the straight line with .
Step 2. Compute the first variation from equation along , admissible since . With and , — , confirming stationarity along this direction.
Step 3. Expand the full functional to expose the second variation. With , . The constant term gives ; the linear term ; the quadratic term uses .
Step 4. Assemble: . Matching the Taylor form , and — an upward parabola, so the extremal is a genuine local minimum, exactly the curve of the second figure. The straight line is stationary () and here minimal ().
2 · The brachistochrone by Beltrami: recovering the cycloid
A bead slides frictionlessly from the origin to a lower point under gravity . The descent time is ( downward). Find the curve that makes stationary.
Step 1. The integrand has no explicit , so the Beltrami identity applies. With , the combination .
Step 2. Square and absorb constants: for a positive set by the endpoint. This first-order equation already encodes the whole extremal — Beltrami removed one order of differentiation for free.
Step 3. The substitution turns into , and integrating gives . These are the parametric equations of a cycloid — traced by a point on a rolling circle of radius .
Step 4. The fastest descent is not the straight line but the cycloid, which dives steeply to build speed and flattens near the end — the founding result of the calculus of variations (Johann Bernoulli, 1696), falling out the instant one notices has no explicit . The brachistochrone is a cycloid, , .
3 · A free endpoint chooses its own boundary condition
Minimize with but left free. Find the extremal and the condition at .
Step 1. Here , so , , and the Euler–Lagrange equation is with general solution .
Step 2. The fixed left end gives the essential condition ; the free right end lets Derivation 2 supply the natural condition .
Step 3. With , imposing gives , so and . The variational principle itself picked the Neumann condition — nothing was imposed there by hand.
Physics of the portrait
The first variation and the very symbol are the signature of one mind: born geometrically with Euler, the calculus of variations became an algorithm in the hands of Joseph-Louis Lagrange.
Origins · 1 minJoseph-Louis Lagrange and how this was discovered
Lagrange was nineteen when, in 1755, he wrote to Leonhard Euler describing a purely analytic way to attack the extremal problems Euler had been solving with laborious geometric constructions. His idea was to introduce a variation of the unknown function — an infinitesimal change in the whole curve, independent of the change along it — manipulated by rules formally parallel to differentiation. This -calculus turned the subject from a collection of clever tricks into a machine: write the functional, take its first variation, integrate by parts, set it to zero. Euler was so taken that he set aside his own approach, coined the name "calculus of variations," and delayed publishing so the young Lagrange could receive full credit. In the Mécanique analytique (1788) Lagrange recast all of mechanics as a single variational statement, proudly noting the book contained not one diagram. The stationary-action formulation of physics, the Euler–Lagrange equations, Lagrange multipliers, and the notation that opens every derivation here are all his — the language in which Hamilton, Jacobi, and eventually field theory and quantum mechanics would be written.
Going further
Texts. Gelfand & Fomin, Calculus of Variations, §§1–6 (the cleanest modern treatment of the first variation and natural boundary conditions) · Stone & Goldbart, Mathematics for Physics, Ch. 1 · Arfken, Weber & Harris, Mathematical Methods for Physicists, 7th ed., Ch. 22 · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, 3rd ed., Ch. 22 · Lanczos, The Variational Principles of Mechanics, Chs. 1–2 · Byron & Fuller, Mathematics of Classical and Quantum Physics, Ch. 2.
Provenance. The definition of the first variation, the master formula, and the natural-boundary-condition derivation follow Gelfand & Fomin §§1–6 and Stone & Goldbart Ch. 1; the Beltrami first integral follows Arfken & Weber Ch. 22 and Lanczos. A verifier should recompute: (i) the chain-rule and integration-by-parts steps yielding the master formula; (ii) worked example 1, confirming and so ; (iii) that the brachistochrone integral integrates to the cycloid; (iv) worked example 3, with , giving . No numerical constants are asserted beyond standard textbook results.
Prerequisites. Functionals and Function Spaces · Multivariable calculus and directional derivatives · Integration by parts. Leads to. Fundamental Lemma of the Calculus of Variations · Euler–Lagrange Equation · Natural and Essential Boundary Conditions · Hamilton's Principle of Stationary Action.
Ask the tutor: ask me to work any variational problem end to end — write its first variation, extract the Euler–Lagrange equation and boundary conditions, and test whether the extremal is actually a minimum.
What is the difference between δy and dy?
They point in different directions. The differential measures how the curve changes as you move along it. The variation measures how it changes when you swap it for a different curve at the same — a vertical shift of the whole graph. Lagrange's insight was that obeys the same formal rules as (it commutes with differentiation, , and with integration), so variations can be manipulated algebraically. Keeping the two straight is the single most important habit in the subject: moves you along one curve, moves you between curves.
Why must the variation η vanish at fixed endpoints?
Because an admissible variation may not violate the constraints that define the problem. If and are prescribed, every competing curve passes through those same two points, so the difference from the base curve — which is — must be zero there, giving . This is not a convenience; it encodes the physical statement that the endpoints are held. Relax an endpoint and there becomes free, the boundary term survives, and it hands you a natural boundary condition in exchange. So "where is forced to vanish?" is really "which boundary data are prescribed?".
Is the fundamental lemma really necessary, or is it obvious?
It feels obvious but genuinely needs proof, and the proof is where the rigour lives. The claim: if a continuous satisfies for every smooth vanishing at the ends, then on . The proof is constructive — if somewhere, build a "bump" positive only near , and the integral is strictly positive, a contradiction. Without this lemma the leap from " for all " to "the bracket vanishes pointwise" — the leap that produces Euler–Lagrange — would be unjustified.
Does δJ = 0 guarantee a solution exists or is unique?
No, and this is a common overreach. The first variation is a necessary condition on any smooth extremal; it says nothing about whether an extremal exists, is unique, or is even smooth. Famous functionals (Weierstrass's examples, the Lavrentiev phenomenon) have no minimizer, or minimizers the Euler–Lagrange equation cannot see because they are not differentiable. Establishing existence is the province of the direct method, which uses lower-semicontinuity and compactness rather than . So narrows the search to critical points; it does not promise the hunt succeeds.
How does the first variation reduce to ordinary calculus?
Parametrise the curve by finitely many numbers and the functional collapses to an ordinary function. If is represented by coefficients (amplitudes in a finite basis), then becomes a plain and the first variation becomes its differential ; stationarity is exactly . This is the literal content of the Ritz and Galerkin methods, which approximate a variational problem by a finite-dimensional one and solve numerically — the calculus of variations is multivariable calculus taken to infinitely many coordinates.
Why is the physical principle "stationary action" and not "least action"?
Because nature only enforces the first-order condition , which is agnostic about curvature. The principle was named "least action" (Maupertuis, Euler) in an era that assumed nature economises, and for many short-time problems the action is indeed minimized. But the general statement is stationarity: the physical trajectory is a critical point, and it can be a saddle. For a harmonic oscillator over a time longer than half a period the true path is no longer a minimum, yet it still satisfies the equations of motion, because those come from alone. "Least action" is safe shorthand only once you have checked the second variation.