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:

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.

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.