12.1 Functionals and the first variation
A function takes a number and returns a number: . A functional takes a whole function and returns a number. The length of a curve, the time a bead takes to slide down it, the energy stored in a bent beam — each assigns a single number to an entire function , and each is a functional. The calculus of variations is the calculus of these objects: how to find the function that makes a functional as small (or as large, or as stationary) as possible.
What a functional is
Write a functional with square brackets to distinguish it from a function: . The typical form we meet is an integral over the function and its derivative,
where is an ordinary function of three arguments — the integrand — and the integral turns the whole curve on into one number.
- the functional — a number assigned to the entire function y
- the integrand: an ordinary function of position, height, and slope
- the unknown function (the 'curve') we are free to choose on [a,b]
- its slope
Two examples fix the idea, and both recur through the chapter:
- Arc length. The length of the graph of from to is (each element of arc is ). Here depends on alone.
- Action. For a particle of mass in a potential , the action is . Here the “curve” is the trajectory and is the Lagrangian. That this is minimised (stationary) is Hamilton’s principle — the destination of 12.5.
The variational problem
The problem is to find the function that makes stationary, usually among all functions with fixed endpoints,
The endpoints are pinned; the curve between them is free. This is the exact analogue of ordinary minimisation — but instead of searching a line of candidate numbers , we search an infinite-dimensional space of candidate functions. We need the variational version of “set the derivative to zero.”
Perturbing the curve: the first variation
In ordinary calculus, is a stationary point of if is unchanged to first order under a small nudge . Import the idea directly. Suppose is the extremal we seek. Perturb it by a small multiple of an arbitrary test function :
The condition keeps the endpoints pinned — every competitor still runs from to . Now the functional becomes an ordinary function of the single number ,
If genuinely extremises , then must be a stationary point of — for every choice of test function . The first variation is defined as the first-order change, , and the stationarity condition is
Whatever perturbation you add, the length only ever increases: the straight line sits at the bottom of the J(ε) curve, where the first variation δJ = J′(0) = 0. That stationarity condition, imposed for every perturbation, is what the Euler–Lagrange equation solves.
The interactive is the arc-length functional between two fixed points. The straight line is the extremal; the perturbation (which vanishes at both endpoints) bends it. The right panel plots : a curve with its minimum exactly at . Whatever perturbation shape you pick, the length only ever increases away from the line, and the bottom of the curve — where — is flat. That flatness, demanded for all , is the whole content of the variational principle.
Computing the first variation
Turning into something solvable starts with differentiating under the integral sign.
▶ The first variation δJ = ∫ (F_y η + F_{y'} η′) dx Derivation
Write out and differentiate with respect to , using the chain rule on (refresher: partial derivatives →). Only the second and third arguments of carry :
Setting (so the partials are evaluated on the unperturbed ) gives the first variation:
This must vanish for every test function with . As it stands the condition mixes and its derivative , so we cannot yet “cancel .” The next lesson removes by an integration by parts, after which the arbitrariness of forces a differential equation on — the Euler–Lagrange equation.
The pieces and are ordinary partial derivatives of the integrand: treat , , and as three independent slots and differentiate with respect to each. (For arc length, gives and .) Holding these straight is the one piece of bookkeeping the whole subject rests on.
Maxima, minima, and merely stationary
As in ordinary calculus, locates stationary functions — it does not by itself say minimum, maximum, or saddle. The sign of the second variation decides: a minimum needs for all (the Legendre condition, , is the local test). In almost every physical problem the geometry or physics tells you which case you are in — the soap film is obviously a minimum of area, the light ray a minimum of time — so the practice is to solve for the extremal and confirm the nature separately. We follow that practice throughout, and take up the second variation only where the character of the extremal is genuinely in doubt.
With the first variation in hand, the next lesson converts from an integral condition into the differential equation that every extremal obeys.