Functionals
An ordinary function
eats a number and hands back a number:
f(3) = 9. A functional is one level up — it eats a
whole function and hands back a single number. We write it
with square brackets, J[y], to remind ourselves the input is a
function y(x), not a point.
f : \text{number} \longmapsto \text{number}, \qquad J : \text{function} \longmapsto \text{number}.
Feed in one curve and you get back one value; feed in a different curve and you get back a
different value. The calculus of variations is the study of how that value
responds as you flex the whole curve.
Three functionals you already half-know
Most functionals are built from a
definite
integral: the integral sweeps along the curve and accumulates one running total,
so the whole function collapses to a single number.
Arc length. The length of the curve y(x) from
x = a to x = b sums the tiny hypotenuses
\sqrt{dx^2 + dy^2} along it:
L[y] = \int_a^b \sqrt{1 + y'^2}\,dx.
Area under a curve. The signed area swept out is itself a functional of
y:
A[y] = \int_a^b y\,dx.
Time of descent (the brachistochrone). A bead slides without friction down a
wire bent into the shape y(x) from a high start to a lower end.
Energy conservation makes its speed v = \sqrt{2gy} at drop
y, and the travel time is distance over speed, accumulated:
T[y] = \int_a^b \frac{\sqrt{1 + y'^2}}{\sqrt{2gy}}\,dx.
Each of these takes a shape and returns a number — a length, an area, a
time.
The central question
For an ordinary function we hunt for the input that makes the output stationary — where the
derivative is zero,
the language of the
gradient pointing nowhere. The calculus of variations asks the very same question
one level up:
Given a functional J[y] = \int_a^b L(x, y, y')\,dx over curves with
fixed endpoints:
-
we seek the function y(x) that makes J[y]
stationary — a maximum, a minimum, or a saddle;
-
the integrand L(x, y, y') is the Lagrangian:
it depends on the position x, the height
y, and the slope y';
-
"stationary" means the value doesn't change to first order when the curve is nudged — the
exact analogue of a flat tangent for an ordinary function.
For arc length the answer is the one your intuition already shouts: the shortest curve between
two points is the straight line. The machinery that proves it — and cracks the
brachistochrone too — is the Euler–Lagrange
equation.
Why is this harder than ordinary optimization? When you minimise an ordinary function you
wiggle one number and watch the output. When you minimise a functional you must
wiggle the height of the curve at every one of its infinitely many points at once
and keep the total stationary against all of those wiggles simultaneously. That leap — from
a finite list of variables to a continuum of them — is exactly what the next pages tame, and
it is why the subject sits at the foundation of mechanics, optics and general relativity:
nature, again and again, chooses the path that makes some functional stationary.
The single easiest way to trip over this topic is to slide back into ordinary-calculus habits
without noticing. Keep the two ideas firmly apart:
-
A function f eats a number
x and hands back a number
f(x). "Minimise f" means: search over
numbers for the one that makes f smallest.
-
A functional J eats an entire
function y(x) — a whole curve or path, not a
point on it — and hands back a single number
J[y]. "Minimise J" means: search over
curves for the one that makes J smallest.
If you catch yourself asking "what x minimises this?" for a problem
that is really asking "what shape minimises this?", you've slipped back a level. The
brachistochrone, arc length and the soap-film problems are never asking for a best number —
they are asking for a best curve, drawn from an infinite gallery of candidate curves.
That reframing — trading a handful of unknowns for a whole unknown function — is the one
conceptual leap the entire subject of calculus of variations asks of you.
In June 1696, the Swiss mathematician Johann
Bernoulli published a challenge to "the sharpest mathematicians of the world": a
bead slides, frictionless, down a wire from a high point A to a
lower point B that is not directly below it. Gravity pulls
it down and along. What shape should the wire be bent into so the bead arrives at
B in the least possible time?
Almost everyone's first guess is the straight line — the shortest path between the two points.
It's wrong. A curve that dips more steeply at the start lets the bead pick up speed early,
more than making up for the extra distance travelled. Bernoulli named the puzzle the
brachistochrone problem, from the Greek for "shortest time." Newton, Leibniz,
Bernoulli's own brother Jacob, and Bernoulli himself all raced to solve it — legend has it
Newton, then in his fifties and running the Royal Mint, solved it overnight after receiving the
challenge by post, and sent his solution back anonymously (Bernoulli reportedly recognised the
author at once, remarking that he knew the lion "by his claw"). The general method that fell
out of solving problems like this one — hunting for the curve, not the number, that makes some
quantity stationary — is exactly the machinery built on
the
next page. It's fair to say this single puzzle is the problem that invented the
calculus of variations as a field.
Worked example: plugging in an actual curve
A functional only becomes a genuine number once you commit to one specific curve. Let's do that
twice, for the area functional A[y] = \int_0^2 y\,dx.
Try y(x) = x^2. Substitute it straight into the
integral and integrate:
A[x^2] = \int_0^2 x^2\,dx = \left[\frac{x^3}{3}\right]_0^2 = \frac{8}{3}.
Now try y(x) = 3 (a flat, constant curve at height
3) over the same interval:
A[3] = \int_0^2 3\,dx = \big[3x\big]_0^2 = 6.
Same functional, same interval — but two different curves went in, and two different numbers
came out: 8/3 and 6. That's the whole
mechanism in miniature: a functional is a machine that swallows a shape whole and returns a
single verdict on it. Once you can picture A[y] as a dial that moves
as the curve y flexes, "find the curve that makes the dial smallest"
stops sounding mysterious — it's the same kind of question as "find the number that makes
f(x) smallest," just asked about shapes instead of numbers.
Watch a functional change
Here is one curve between two fixed endpoints, (0,0) and
(2,0): a straight chord plus a bump,
y = s\,\sin(\pi x / 2). The slider s
flexes the bump up and down, and the readout shows the value of the arc-length functional
L[y] = \int_0^2 \sqrt{1 + y'^2}\,dx live. Slide all the way to
s = 0: the curve becomes the straight chord, and the length bottoms
out — the straight line minimises the functional, exactly as the theorem promises.