The subject was born from Johann Bernoulli’s 1696 brachistochrone challenge (12.3), but its general machinery is due to Leonhard Euler and Joseph-Louis Lagrange. Euler, in 1744, obtained the equation now bearing both names by a laborious limiting argument — approximating the curve by a polygon of many segments, extremising over the vertices, and letting the segments shrink. In 1755 the nineteen-year-old Lagrange sent Euler a far slicker method: the -notation and the perturbation used in 12.1, which sidesteps the polygon entirely. Euler recognised its superiority at once, held back his own results so the young man could publish first, and named the new field the calculus of variations after Lagrange’s -variations. The collaboration produced not only the equation but the variational reformulation of all of mechanics that Lagrange completed in his Mécanique analytique (1788).
12.2 The Euler–Lagrange equation
The first variation of 12.1 left us with a condition that still mixed the test function and its derivative :
This lesson removes , invokes the arbitrariness of , and lands on the single differential equation every extremal satisfies — the Euler–Lagrange equation, the workhorse of the whole subject.
The fundamental lemma
Everything hinges on one small, intuitive fact.
▶ Fundamental lemma of the calculus of variations Derivation
Claim. If is continuous on and
for every smooth test function with , then on .
Why. Suppose not — say at some interior point. By continuity stays positive on a small interval around . Choose a test function that is a smooth positive bump living entirely inside that interval and zero elsewhere (such bumps exist). Then , because the integrand is positive where and zero elsewhere — contradicting the hypothesis that the integral vanishes for all . The same argument with a negative bump handles . So can be neither positive nor negative anywhere: . ∎
The lemma is the variational analogue of “if a vector is orthogonal to every vector, it is zero.” It is what lets us pass from “an integral against every vanishes” to “the coefficient of vanishes pointwise” — provided we can first get the condition into the single form .
Integrating by parts
The obstacle is the term. Remove it with integration by parts, trading the derivative off and onto the rest:
The boundary term vanishes because — the payoff of pinning the endpoints. Substituting back, the first variation collapses to the single-form condition
Now the fundamental lemma applies with : the bracket must vanish identically.
The equation
- partial derivative of the integrand w.r.t. the height slot y (x, y' held fixed)
- partial derivative of the integrand w.r.t. the slope slot y' (x, y held fixed)
- total derivative in x — acts on everything that depends on x, including y(x) and y'(x) inside ∂F/∂y'
Two derivatives that are easy to confuse, and the distinction is the crux:
- is a partial derivative — differentiate the formula with respect to its third slot, pretending , , are independent letters.
- is a total derivative — it then treats the result as a function of through , , and , so it produces terms via the chain rule: .
Because that last term carries , the Euler–Lagrange equation is in general a second-order ODE for (Foundations Ch 5). The variational problem — a search over an infinite-dimensional space of curves — has become an ordinary differential equation with two boundary conditions , . That reduction is the entire practical power of the method.
First worked example: the shortest path
Find the curve of least length between two points — the arc-length functional .
▶ Straight lines minimise length Derivation
Since depends on only, , and Euler–Lagrange reduces to
Compute the partial: . Setting it equal to a constant and solving,
a constant. So — a straight line, with and fixed by the two endpoints. The obvious answer, but now derived from a principle rather than assumed, and by exactly the machinery that will hand us the non-obvious answers of the next lesson.
Two shortcuts: first integrals
When the integrand is missing one of its slots, the second-order equation drops to first order. These two special cases solve most classic problems.
-
independent of . Then and Euler–Lagrange gives immediately — a conserved quantity (the shortest-path case above). In mechanics this is conservation of a momentum: if the Lagrangian does not depend on a coordinate, the corresponding momentum is constant.
-
independent of . Then a different combination is conserved — the Beltrami identity:
▶ The Beltrami identity, and why it is 'energy' Derivation
Suppose with no explicit . Compute the total -derivative of the combination :
With no explicit , the chain rule gives . Substitute:
The bracket is exactly the Euler–Lagrange expression, which vanishes on an extremal. So the whole derivative is zero and is constant along any solution.
This is one of the most important facts in physics in disguise. When is a Lagrangian with no explicit time, the conserved combination is the energy (the Hamiltonian). Time-translation symmetry of the Lagrangian conservation of energy — the special case of Noether’s theorem we prove in general in 12.5.
▶ Check: Beltrami on the shortest path Worked Example
For (which is also independent of ), the Beltrami identity gives , so — the straight line again, reached by the other shortcut. Both first integrals are available whenever misses both and ; pick whichever is cleaner.
The history — Euler's construction, Lagrange's δ, and a new calculus
The next lesson turns the Euler–Lagrange equation and these two first integrals loose on the problems that made the subject famous.