In 1696 Johann Bernoulli challenged Europe's mathematicians: along which curve does a bead slide fastest between two points? Newton solved it overnight. The answer, a cycloid, launched the calculus of variations, which optimizes over whole functions rather than numbers.
We will get numbers from functions, compare paths, compute the first variation, and finish with length as a functional.
Step 1: Numbers from functions
A functional assigns a number to a whole function. The value y(0.5) at a midpoint, the area ∫₀¹ y dx and the maximum of y are all functionals of y. A derivative, by contrast, turns a function into another function, y′, not into a number. The central example in mechanics is an integral along a path:
To evaluate it, substitute x(t) and ẋ(t) into L and integrate. Example: for x(t) = 2t, ẋ = 2, so ∫₀² ẋ² dt = ∫₀² 4 dt = 8. For x(t) = t, ∫₀¹ (ẋ² + x) dt = ∫₀¹ (1 + t) dt = 1.5.
Step 2: Comparing paths
Different paths with the same endpoints give different values. Among paths from x(0) = 0 to x(1) = 1, the functional ∫₀¹ ẋ² dt is 1 for the straight line x = t. Bulging the path, x = t + c·t(1 − t), keeps the endpoints, and ẋ = 1 + c(1 − 2t) gives
The cross term 2c∫₀¹(1 − 2t) dt vanishes and ∫₀¹(1 − 2t)² dt = ⅓, so any bulge, up or down, costs extra: with c = 3 the value is 4. The straight line is the minimizer.
Step 3: The first variation
The term linear in c is the first variation: the rate of change dS/dc at c = 0 along the perturbation η = t(1 − t). For ∫₀¹ ẋ² dt it is 2∫₀¹ ẋη̇ dt, which for the straight line is 2∫₀¹(1 − 2t) dt = 0: no first-order gain or loss, as at the bottom of a valley. For the path x = t², which has the same endpoints, it is 2∫₀¹ 2t(1 − 2t) dt = −⅔: bulging that way lowers the value, so x = t² is not the minimizer.
Step 4: Length as a functional
The length of a curve y(x) is also a functional, which depends on the curve only through its slope at each point:
For a straight line y = mx the integrand is the constant √(1 + m²): Pythagoras along each little step. Example: y = (5/12)x from x = 0 to 12 has √(1 + 25/144) = 13/12, so its length is 13. Finding the shortest curve between two points is then a calculus-of-variations problem: in a plane the answer is a straight line, and on the surface of a sphere the curves of stationary length are arcs of great circles.