© 2026 Neckpinch · www.neckpinch.com · All rights reserved.
Course 6Book 6A: The Heat Equation and Its RelativesChapter 11
Calculus of Variations and Gradient Flows
Euler–Lagrange equations, minimal surfaces, soap films and gradient flows.
Read with Evans, Partial Differential Equations, sections 8.1 (introduction: Euler–Lagrange equations, second variation, systems) and 8.2 (existence of minimisers: coercivity, lower semicontinuity, convexity), and section 9.6 on gradient flows if your edition has it. Colding and Minicozzi, A Course in Minimal Surfaces, is a reference for the geometry. Jost, chapter 10, is a second voice. The regularity of minimisers, constraints, critical points of mountain-pass type and Noether's theorem continue in 6C.1 Regularity of Minimisers and Constraints–6C.3 Symmetry, Noether’s Theorem and Moving Planes.
Many of the equations in this book are the equations satisfied by something that minimises an energy. Laplace's equation minimises the Dirichlet energy (6A.2 Harmonic Functions); the minimal surface equation minimises area; a hanging chain minimises its potential energy. The calculus of variations turns " minimises " into a PDE, the Euler–Lagrange equation, and its second-order version says when a critical point is stable.
Turned around, an energy also produces an evolution: move downhill as fast as possible. That is a gradient flow, and three flows of this book are gradient flows: the heat equation decreases Dirichlet energy, curve shortening decreases length (6A.10 Curve Shortening and the First Geometric Flows), and the harmonic map heat flow decreases the energy of a map. The Ricci flow is a gradient flow too, but only after a change of point of view that Perelman discovered (12A.2 Ricci Flow as a Gradient Flow), and this chapter is the preparation for it.
By the end of this chapter you will be able to:
- derive the Euler–Lagrange equation of an integral functional, and the second variation, and prove Legendre's condition;
- prove weak lower semicontinuity of convex integrals and the existence of minimisers by the direct method, and make Dirichlet's principle rigorous;
- write the minimal surface equation, compute the catenoid between two rings and its critical separation;
- recognise the heat equation, curve shortening and the harmonic map heat flow as gradient flows, and compute their energy identities;
- explain why gradient descent in machine learning is a discretised gradient flow.
A soap film between two rings
Dip two parallel coaxial wire rings of radius into soapy water and pull them apart slowly. A soap film spans them, shaped like a waisted tube. Surface tension makes the film minimise its area, and the area-minimising surfaces of revolution are catenoids, , obtained by rotating a catenary (Exercise 11.4). With the rings at , the condition becomes, with ,
The function rises to a maximum of at , where , and then falls (Figure 11.1). So for ring separations below there are two catenoids, a stable one with a wide waist and an unstable one with a narrow waist, which merge at the critical separation; beyond it there is no catenoid at all. Pull the rings further apart and the film's waist thins rapidly and the film pinches off, leaving a flat film across each ring. Even before the critical separation the two flat discs, of total area , have less area than the stable catenoid once exceeds about ; between and the catenoid is a local but not a global minimum, and a disturbance can still burst it.
This is a tabletop experiment and an exact computation, and it shows three things that recur in geometric analysis: a family of solutions can cease to exist when a parameter crosses a critical value, critical points come in stable and unstable pairs that merge there, and the loss of a solution is seen physically as a neck pinching. It is the existence question that 2B.3 Compactness previewed.
The Euler–Lagrange equation
Let be bounded and consider an energy
over functions with given boundary values, with smooth. If is a smooth minimiser, then for every the function has a minimum at , so its derivative vanishes there (2A.10 Derivatives):
after integrating by parts (1A.10 Divergence, Curl and the Integral Theorems). This holds for all , so (4A.9 Distributions and Weak Derivatives)
the Euler–Lagrange equation of . Any solution, minimiser or not, is a critical point of .
| energy | Euler–Lagrange equation | |
|---|---|---|
| Dirichlet energy | ||
| Dirichlet energy with source | ||
| area of a graph | ||
The second line is Poisson's equation, and the third is the minimal surface equation: a graph is a critical point of area exactly when its mean curvature vanishes. In one dimension, with in place of , the same computation gives Lagrange's equations of mechanics: with the Euler–Lagrange equation is , Newton's law (Exercise 11.7 treats a classical example).
The second variation. At a minimiser the second derivative is also non-negative:
Testing with rapidly oscillating shows that the first term must dominate, which forces a pointwise condition.
If minimises among functions with its boundary values, then for every and every ,
Proof. Fix , a function , and for let . Then and
Put this into the second variation, which is . The terms with undifferentiated are , so
As , , and the oscillating part integrates to against the continuous compactly supported function (the Riemann–Lebesgue lemma, 4A.6 The Fourier Transform). So for every , and since the integrand is continuous, it is non-negative at every point.
When the matrix is uniformly positive definite, the Euler–Lagrange equation is elliptic (6A.1 What a PDE Is): expanding gives . This is why equations coming from convex energies are elliptic, and their gradient flows parabolic. A critical point whose second variation is positive is stable; the narrow catenoid is unstable because the second variation is negative for a variation that pinches its waist further.
Existence of minimisers: the direct method
The Euler–Lagrange equation is a necessary condition. Existence of a minimiser is a separate question, and the answer is the direct method of 4A.7 Weak Convergence and the Direct Method: take a minimising sequence, extract a convergent subsequence by compactness, and show the limit is a minimiser by lower semicontinuity.
Let be smooth, bounded below, and convex in for each fixed . If weakly in , then .
Proof. (Evans, section 8.2.2.) Adding a constant to we may assume . Let and pass to a subsequence with . By Rellich (4A.11 Sobolev Embeddings and Critical Exponents) a further subsequence has in , and another has almost everywhere (3A.7 Lᵖ Spaces and Jensen’s Inequality).
Good sets. By Egorov's theorem (3A.6 Modes of Convergence and Differentiation), for each there is a measurable with on which uniformly. Let , whose complement has measure tending to as , and . We may choose the sets so that grows as decreases, with .
Convexity. A convex function lies above its tangent planes: . With , , , and ,
Passing to the limit. On , and are bounded and uniformly, so and uniformly on (smooth functions are uniformly continuous on compact sets). The first integral therefore converges to . In the second, weakly in , and the factor converges uniformly (hence in ) to a bounded function, so the integral tends to (a weakly null sequence against a strongly convergent one). Hence
Let : by monotone convergence the right side tends to .
Convexity in is exactly what lets the integral survive weak convergence of gradients. Without it, minimising sequences can oscillate between two preferred gradients and the energy of the limit can be larger than the limit of the energies, as in Bolza's example of 4A.7 Weak Convergence and the Direct Method. Convexity in is not needed, because converges strongly.
Suppose is smooth, convex in , and coercive: with . Then for every with , the energy has a minimiser in the admissible class .
Proof. Let , which is finite: and . Take with . By coercivity, is bounded. The functions lie in , and is bounded, so by the Poincaré inequality (4A.10 Sobolev Spaces) is bounded in . By 4A.7 Weak Convergence and the Direct Method a subsequence converges weakly in to some , and because is a closed subspace, hence weakly closed (Mazur, 4A.7 Weak Convergence and the Direct Method). So , and by Theorem 11.2, . Hence .
If moreover does not depend on and is strictly convex in , the minimiser is unique: if both minimise, then on a set of positive measure (their difference is in and not zero), and by strict convexity, a contradiction. Under growth conditions on and (Evans, section 8.2.3), the minimiser is a weak solution of the Euler–Lagrange equation, by differentiating at under the integral sign.
For the Dirichlet energy this is Dirichlet's principle made rigorous: Riemann's 1851 argument assumed a minimiser exists, Weierstrass pointed out that it need not in general, and Hilbert's direct method, completed with Sobolev spaces, shows that here it does. The minimiser is a weak solution of the Euler–Lagrange equation, and the regularity theory of 6A.6 Weak Solutions and Elliptic Regularity shows it is smooth. Existence by minimisation, then regularity by bootstrapping, is the pattern for nonlinear problems too, including the minimisers of Perelman's - and -functionals (12A.2 Ricci Flow as a Gradient Flow, 12A.3 The 𝓦-Entropy).
Area is not coercive in this sense (it grows like , not ), and Plateau's problem, to find a surface of least area spanning a given wire loop in space, needed new ideas. Jesse Douglas and Tibor Radó solved it independently in 1930–31, minimising a different energy over parametrised discs; Douglas received one of the first Fields Medals in 1936 for this work.
A tensile roof, a fabric or cable net held in tension between supports, works best when its surface is in equilibrium under uniform tension, which is the condition that it be a minimal surface or close to one. Frei Otto, at his Institute for Lightweight Structures in Stuttgart, found such forms experimentally with soap films stretched over wire frames, among other physical models; the film solves the minimal surface equation for the given boundary. The cable-net roofs of the Munich Olympic Park (1972), by Günter Behnisch with Frei Otto and Fritz Leonhardt, were developed from precise physical scale models before computer form-finding was available. Today the same problems are solved numerically, by minimising a discretised area or energy.
Gradient flows
Let be a smooth function on a Hilbert space (4A.5 Hilbert Spaces and Lax–Milgram). Its gradient is the vector representing the derivative: for all (Riesz representation). The gradient flow is the ODE
Along it,
the energy decreases, at the fastest possible rate for a given speed . It is constant exactly at critical points. Generic trajectories descend to local minima; special ones end at saddle points (Figure 11.2).
Convex energies contract. If is convex, its gradient is monotone: (add the two tangent-plane inequalities and the same with , exchanged). So for two solutions of the gradient flow,
the distance between them never increases. Uniqueness and continuous dependence on the initial data follow at once. If is -convex ( convex, ), the same computation gives , and every solution converges exponentially to the unique minimiser. For the heat equation this is the contraction and, with , the exponential decay of 6A.3 The Heat Equation on ℝⁿ. Gradient flows of convex functionals, even non-smooth ones, are the subject of Evans, section 9.6, and of the theory of maximal monotone operators (6C.5 Fixed Points, Monotonicity and Sub- and Supersolutions).
Which gradient you get depends on the inner product. For the Dirichlet energy on , with the inner product,
so and the gradient flow is . The heat equation is the gradient flow of the Dirichlet energy, and
(Exercise 11.6). The same energy with a different inner product gives a different flow: with the inner product it gives , a fourth-order equation of the Cahn–Hilliard type.
Curve shortening is the gradient flow of length: 6A.10 Curve Shortening and the First Geometric Flows showed for a normal velocity , so with respect to the inner product on normal velocities the gradient of is , and is steepest descent. Mean curvature flow is the gradient flow of area in the same way.
The harmonic map heat flow. For a map between Riemannian manifolds, the energy has as its critical points the harmonic maps, and its gradient flow, introduced by James Eells and Joseph Sampson in 1964, deforms any map towards a harmonic one when has non-positive curvature. It is used directly in the Ricci flow: DeTurck's diffeomorphisms are solutions of a harmonic map heat flow (11A.4 Short-Time Existence and Uniqueness).
Training a machine-learning model means minimising a loss function over millions or billions of parameters . The basic algorithm, gradient descent, is
which is Euler's method for the gradient flow with time step , the learning rate. Too large a step and the iteration overshoots and diverges, exactly as an explicit scheme for the heat equation does when ; too small and progress is slow. Practical methods use random subsets of the data for each gradient (stochastic gradient descent) and add momentum and adaptive step sizes, but the continuous-time picture, energy decreasing along a flow, is how much of the theory of these methods is analysed.
The Ricci flow is not the gradient flow of any function of the metric alone; Hamilton asked whether it was, and Perelman answered: it is, up to diffeomorphisms, the gradient flow of his functional , with respect to an inner product weighted by (12A.2 Ricci Flow as a Gradient Flow). One consequence is immediate from the picture above: a gradient flow cannot return to where it started, so the Ricci flow has no periodic solutions other than fixed points ("no breathers"). The other half of the variational picture, finding unstable critical points such as the narrow catenoid, is min–max theory: Birkhoff's sweepouts and the width of a three-manifold, which forces the Ricci flow on certain manifolds to become extinct (10A.11 Min–Max and Width, 12C.3 Finite Extinction).
History
The calculus of variations began with Johann Bernoulli's brachistochrone problem of 1696, and Euler and Lagrange derived its equations in the 1740s–1760s. Joseph Plateau's experiments with soap films were published in 1873, and Plateau's problem was solved by Douglas and Radó in 1930–31. Weierstrass's criticism of the Dirichlet principle dates from 1870 and Hilbert's rescue from 1900; the modern direct method with Sobolev spaces was developed through the twentieth century. Eells and Sampson introduced the harmonic map heat flow in 1964. The Munich Olympic roofs were completed in 1972. The Gateway Arch, analysed in Exercise 11.8, was completed in 1965.
Minimisers of satisfy the Euler–Lagrange equation , and their second variation is non-negative, which forces ellipticity (Legendre's condition, proved with oscillating test functions). Convex integrands are weakly lower semicontinuous, so convex, coercive energies have minimisers in by the direct method, unique if strictly convex, and smooth by regularity. Area gives the minimal surface equation; between two rings the catenoid exists only up to separation , where a stable and an unstable catenoid merge. A gradient flow decreases at the rate , and for convex it is a contraction; the heat equation, curve shortening and the harmonic map heat flow are gradient flows of energy, length and map energy. 6A.12 Entropy, Information and Diffusion studies a different monotone quantity along the heat equation: entropy.
Exercises
A surface obtained by rotating the graph , , about the -axis has area . (a) Since the integrand does not depend on , the quantity is constant along solutions of the Euler–Lagrange equation (the Beltrami identity); use it to show for a constant . (b) Solve to get .
Solution
(a) With , . (b) , so and .
(a) Show that has its maximum where , and find by a few steps of Newton's method (2A.10 Derivatives). (b) Deduce . (c) The same equation appeared for the Frank-Kamenetskii critical parameter in 6A.8 Nonlinear Parabolic Equations. Explain why: in both problems a one-parameter family of solutions of an ODE with is matched to a boundary condition, and the critical value is where the matching has a double root.
Solution
(a) , zero iff . Newton for , , from : , , , so , already correct to five digits. (b) , so and . (c) In 6A.8 Nonlinear Parabolic Equations the matching condition was , maximised where , i.e. again . Here it is . Both are maximised by the same function ; at the maximum two solution branches meet (a fold), and beyond it there are none.
For a smooth solution of on a bounded with on , show that and . Deduce that is non-increasing and decreasing, and that the ratio (the Rayleigh quotient, 6A.6 Weak Solutions and Elliptic Regularity) is also non-increasing. (For the last, use Cauchy–Schwarz: .)
Solution
, the boundary term vanishing because on . . With and , and , so
by the Cauchy–Schwarz inequality given. The Rayleigh quotient decreases towards : heat flow filters out the higher modes.
A bead slides without friction from rest at the origin down a wire (with measured downward) to a point . Its speed is , so the time taken is . Use the Beltrami identity to show that the fastest curve satisfies , and check that the cycloid , satisfies it with .
Solution
(dropping ). , constant, so . For the cycloid, , so and .
(a) A chain of uniform density hangs between two points; it minimises its potential energy subject to fixed length . With a Lagrange multiplier , minimise , and show by the Beltrami identity that : a catenary. (b) An arch of constant thickness, standing in pure compression, should follow an inverted catenary. The Gateway Arch in St. Louis is thicker at its base than at its top, and its centroid curve is a weighted catenary with (Osserman, "Mathematics of the Gateway Arch", Notices of the AMS, 2010). Explain why a chain with heavier links near its ends would hang in such a curve rather than a catenary.
Solution
(a) With , the Beltrami identity gives , the same equation as for the catenoid with , so . (b) In equilibrium the horizontal component of the tension is constant, and the vertical component increases along the chain by the weight carried: , where is the weight per unit length. For constant this gives the catenary. If is larger near the ends, the slope grows faster there than for a catenary, and the curve is a different (weighted) catenary; inverting it gives the shape of an arch in pure compression with that distribution of weight.
For with , show that gradient descent converges to if and only if . For , show the condition is , and that convergence is then slowest in the direction of . Relate this to the stability condition for the explicit scheme for the heat equation, whose largest eigenvalue is about .
Solution
, which tends to iff . With several directions each needs ; the slowest factor is . The discrete Laplacian on a grid of spacing has eigenvalues up to about , so explicit Euler needs .
Let solve , and suppose for some . (a) Show that , so is constant. (b) Perelman shows that is non-decreasing along the Ricci flow and constant only on Ricci-flat (steady soliton) metrics (12A.2 Ricci Flow as a Gradient Flow). A breather is a solution that returns to its initial metric up to diffeomorphism and scaling. Explain, as in (a), why a steady breather (no scaling) must be a steady soliton. Perelman's -entropy does the same for shrinking breathers (12A.3 The 𝓦-Entropy).
Solution
(a) ; integrating over gives the identity, and the integrand is non-negative and continuous, so for all , and then . (b) is invariant under diffeomorphisms, so a breather has ; since is non-decreasing, it is constant on , which by Perelman's monotonicity formula happens only for steady solitons.
Free resources for this chapter
Chosen for what this chapter covers, and all free to read or watch. Links checked Nov 6, 2026.
Read
- Reference Euler–Lagrange equationWikipediaThe equation satisfied by critical points of a functional.
- Reference Direct method in the calculus of variationsWikipediaExistence of minimisers.
Watch 2 lectures and talks
- Video The Math of Bubbles: Minimal Surfaces & the Calculus of VariationsTrefor Bazett (University of Victoria)Soap films, minimal surfaces and the Euler–Lagrange equation, with physical demonstrations.
- Video Lecture 23: Calculus of Variations / Weak FormMIT OpenCourseWare 18.086 Mathematical Methods for Engineers II (Spring 2006), Gilbert StrangThe calculus of variations and the weak form of an equation.
© 2026 Neckpinch (www.neckpinch.com). All content in the guidebook (text, mathematics, figures and exercises) is protected by copyright. All rights reserved. No part may be copied, republished or redistributed without written permission.