Mathematical Methods Handbook

The Euler-Lagrange equation

Functionals, their first variation and the equations extremals satisfy, with boundary conditions and constraints.

In this chapter 8

Tick a unit to add it to your PDF basket.

  1. Extremals of functionals
  2. Boundary conditions and constraints

Extremals of functionals

5

Definition

Functionals and the first variation

Adapted

Defines functionals on spaces of curves, the admissible variations and the first variation, proves that the first variation vanishes at an extremum, and proves the fundamental lemma that turns this into a pointwise equation.

Prerequisites: Taylor's theorem

DefinitionAdaptedAdapted from Gelfand & Fomin (1963), Ch. 1, §§1–3, pp. 1–2, 6–8, 12–13

A functional is a rule JJ that assigns a real number J[y]J[y] to each function yy in some class. The class used throughout this chapter is C1[a,b]C^1[a,b], the continuously differentiable real functions on a closed interval, with the norm

∥y∥1=max⁡a≤x≤b∣y(x)∣+max⁡a≤x≤b∣y′(x)∣.\|y\|_1 = \max_{a\le x\le b}|y(x)| + \max_{a\le x\le b}|y'(x)| .

The typical functional is an integral functional

J[y]=∫abF(x,y(x),y′(x)) dx,J[y] = \int_a^b F\bigl(x, y(x), y'(x)\bigr)\,dx ,

where the integrand F(x,y,p)F(x, y, p) is a given function of three real variables. We write FyF_y and FpF_{p} for its partial derivatives in the second and third slots; following custom, FpF_p is also written Fy′F_{y'}.

  • The admissible functions are the y∈C1[a,b]y \in C^1[a,b] that satisfy the side conditions of the problem, for instance the fixed end values y(a)=Ay(a) = A, y(b)=By(b) = B. They do not form a vector space: the sum of two admissible functions has the wrong end values.

  • An admissible variation (or direction) at yy is a function hh such that y+εhy + \varepsilon h is admissible for all small ∣ε∣|\varepsilon|. For fixed end values these are exactly the functions in

    C01[a,b]={ h∈C1[a,b]:h(a)=h(b)=0 }.C^1_0[a,b] = \{\,h \in C^1[a,b] : h(a) = h(b) = 0\,\}.
  • The first variation of JJ at yy in the direction hh is

    δJ[y;h]=ddεJ[y+εh]∣ε=0,\delta J[y; h] = \frac{d}{d\varepsilon} J[y + \varepsilon h]\Big|_{\varepsilon = 0},

    whenever this derivative exists. The function yy is stationary if δJ[y;h]=0\delta J[y;h] = 0 for every admissible variation hh.

  • JJ has a weak local minimum at an admissible yy if there is r>0r > 0 with J[y~]≥J[y]J[\tilde y] \ge J[y] for every admissible y~\tilde y with ∥y~−y∥1<r\|\tilde y - y\|_1 < r; a weak local maximum is defined in the same way. If the comparison is made with the smaller norm max⁡∣y~−y∣\max|\tilde y - y| instead, the extremum is called strong. Every strong extremum is a weak one, so a necessary condition for weak extrema also holds for strong ones.

DefinitionAdaptedAdapted from Gelfand & Fomin (1963), Ch. 1, Thm 2, p. 13 and Lemma 1, p. 9; Evans (2010), §8.1.2, pp. 428–429

Let FF have continuous first partial derivatives on [a,b]×R×R[a,b]\times\mathbb{R}\times\mathbb{R}, and let y,h∈C1[a,b]y, h \in C^1[a,b].

  1. First variation of an integral functional. The derivative δJ[y;h]\delta J[y;h] exists and

    δJ[y;h]=∫ab(Fy(x,y,y′) h+Fy′(x,y,y′) h′) dx.\delta J[y; h] = \int_a^b \Bigl( F_y\bigl(x, y, y'\bigr)\, h + F_{y'}\bigl(x, y, y'\bigr)\, h' \Bigr)\, dx .

    It is linear in hh.

  2. Necessary condition. If JJ has a weak local extremum at an admissible yy, then δJ[y;h]=0\delta J[y; h] = 0 for every admissible variation hh.

  3. Fundamental lemma. Let k≥0k \ge 0 be an integer and gg continuous on [a,b][a,b]. If ∫abg h dx=0\int_a^b g\,h\,dx = 0 for every h∈Ck[a,b]h \in C^k[a,b] with h(a)=h(b)=0h(a) = h(b) = 0, then g(x)=0g(x) = 0 for all x∈[a,b]x \in [a,b].

Idea of the proofOriginal

Restricting JJ to the straight line ε↦y+εh\varepsilon \mapsto y + \varepsilon h in function space turns it into an ordinary function of one real variable. An extremum of JJ is then an extremum of that function at ε=0\varepsilon = 0, so its derivative, the first variation, must vanish. The fundamental lemma says that a continuous function which integrates to zero against every test function must vanish identically: if it were positive somewhere, a test function concentrated there would detect it.

ProofAdaptedAdapted from Gelfand & Fomin (1963), Lemma 1, p. 9 and Thm 2, p. 13; Evans (2010), pp. 428–429

Part 1. Write φ(ε)=J[y+εh]\varphi(\varepsilon) = J[y + \varepsilon h] and fix ε≠0\varepsilon \ne 0 with ∣ε∣≤1|\varepsilon| \le 1. For each xx, the mean value theorem (the case n=0n = 0 of Taylor's theorem) applied to t↦F(x,y+th,y′+th′)t \mapsto F(x, y + t h, y' + t h') on the interval between 00 and ε\varepsilon gives a θ=θ(x)∈(0,1)\theta = \theta(x) \in (0,1) with

F(x,y+εh,y′+εh′)−F(x,y,y′)ε=Fy(x,y+θεh,y′+θεh′) h+Fy′(x,y+θεh,y′+θεh′) h′.\frac{F(x, y + \varepsilon h, y' + \varepsilon h') - F(x, y, y')}{\varepsilon} = F_y(x, y + \theta\varepsilon h, y' + \theta\varepsilon h')\,h + F_{y'}(x, y + \theta\varepsilon h, y' + \theta\varepsilon h')\,h' .

All arguments (x,y+sh,y′+sh′)(x, y + s h, y' + s h') with ∣s∣≤1|s| \le 1 lie in a compact box K⊂[a,b]×R2K \subset [a,b]\times\mathbb{R}^2, because y,y′,h,h′y, y', h, h' are bounded. FyF_y and Fy′F_{y'} are continuous, hence uniformly continuous on KK. The arguments above differ from (x,y,y′)(x, y, y') by at most ∣ε∣(∣h∣+∣h′∣)≤∣ε∣ ∥h∥1|\varepsilon|(|h| + |h'|) \le |\varepsilon|\,\|h\|_1, so the right-hand side converges to Fyh+Fy′h′F_y h + F_{y'} h' uniformly in xx as ε→0\varepsilon \to 0. Uniform convergence lets us pass the limit through the integral, which gives the formula. Linearity in hh is visible in the formula.

Part 2. Suppose yy is a weak local minimum (for a maximum replace JJ by −J-J) and let hh be an admissible variation. For small ∣ε∣|\varepsilon| the function y+εhy + \varepsilon h is admissible, and ∥(y+εh)−y∥1=∣ε∣ ∥h∥1\|(y + \varepsilon h) - y\|_1 = |\varepsilon|\,\|h\|_1 is below the radius rr of the definition. Hence φ(ε)≥φ(0)\varphi(\varepsilon) \ge \varphi(0) for all small ∣ε∣|\varepsilon|: the real function φ\varphi has an interior local minimum at 00. Since φ\varphi is differentiable at 00 by part 1, φ′(0)=0\varphi'(0) = 0, that is, δJ[y;h]=0\delta J[y; h] = 0.

Part 3. Suppose, for a contradiction, that g(x0)≠0g(x_0) \ne 0 for some x0x_0; replacing gg by −g-g we may take g(x0)>0g(x_0) > 0. By continuity there is an interval [c,d]⊂[a,b][c, d] \subset [a,b] with c<dc < d on which g>g(x0)/2g > g(x_0)/2. Define

h(x)={((x−c)(d−x))k+1,c≤x≤d,0,otherwise.h(x) = \begin{cases} \bigl((x - c)(d - x)\bigr)^{k+1}, & c \le x \le d,\\ 0, & \text{otherwise.} \end{cases}

At x=cx = c the polynomial branch has a zero of order k+1k+1, so it and its first kk derivatives vanish there, matching the zero branch; the same holds at dd. So h∈Ck[a,b]h \in C^k[a,b], h(a)=h(b)=0h(a) = h(b) = 0, and h>0h > 0 on (c,d)(c, d). Then

∫abg h dx=∫cdg h dx≥g(x0)2∫cdh dx>0,\int_a^b g\,h\,dx = \int_c^d g\,h\,dx \ge \frac{g(x_0)}{2}\int_c^d h\,dx > 0 ,

contradicting the hypothesis. Hence g≡0g \equiv 0. □\square

RemarkOriginal

Where the hypotheses are used.

  • Continuity of FyF_y, Fy′F_{y'} is what makes the difference quotients converge uniformly in part 1. It is also why the problem is posed in C1C^1 with the norm ∥⋅∥1\|\cdot\|_1: an integrand that depends on y′y' needs y′y' to be controlled. Arc length is an example. A zigzag curve can be uniformly within ε\varepsilon of a straight segment yet be much longer, so arc length is not continuous for the max norm, although it is continuous for ∥⋅∥1\|\cdot\|_1.
  • Admissibility of y+εhy + \varepsilon h for small ε\varepsilon of both signs is used in part 2. If only ε≥0\varepsilon \ge 0 were allowed (a one-sided constraint such as y≥0y \ge 0 that is active somewhere), we would get only δJ[y;h]≥0\delta J[y; h] \ge 0.
  • Continuity of gg is used in part 3 to make gg positive on a whole interval. Without it the lemma fails: the function equal to 11 at x=(a+b)/2x = (a+b)/2 and 00 elsewhere integrates to zero against every hh but is not zero. For merely integrable gg the conclusion becomes "g=0g = 0 except on a set that does not affect integrals".
  • The class of test functions can be shrunk to CkC^k functions vanishing near aa and bb, or to infinitely differentiable ones, since the hh used in part 3 can be replaced by a smooth bump on (c,d)(c,d). The vanishing of δJ\delta J is a statement about every admissible direction; it says nothing about second-order behaviour, which decides between minimum, maximum and saddle (see the second variation).
ExampleOriginal

Take J[y]=∫01(y′2+2xy) dxJ[y] = \int_0^1 \bigl(y'^2 + 2xy\bigr)\,dx on functions with y(0)=0y(0) = 0, y(1)=1y(1) = 1. Is y0(x)=xy_0(x) = x a candidate for a minimum?

Here F=p2+2xyF = p^2 + 2xy, so Fy=2xF_y = 2x and Fy′=2y′F_{y'} = 2y'. For the admissible variation h(x)=x(1−x)h(x) = x(1 - x), which has h′=1−2xh' = 1 - 2x, part 1 gives

δJ[y0;h]=∫01(2x⋅x(1−x)+2⋅1⋅(1−2x)) dx=2(13−14)+0=16.\delta J[y_0; h] = \int_0^1 \bigl(2x\cdot x(1-x) + 2\cdot 1\cdot(1 - 2x)\bigr)\,dx = 2\Bigl(\frac13 - \frac14\Bigr) + 0 = \frac16 .

As a check, expand directly: (y0+εh)′=1+ε(1−2x)(y_0 + \varepsilon h)' = 1 + \varepsilon(1 - 2x), so

J[y0+εh]=∫01(1+2ε(1−2x)+ε2(1−2x)2+2x2+2εx2(1−x))dx=53+ε6+ε23,J[y_0 + \varepsilon h] = \int_0^1 \Bigl(1 + 2\varepsilon(1 - 2x) + \varepsilon^2(1 - 2x)^2 + 2x^2 + 2\varepsilon x^2(1 - x)\Bigr)dx = \frac53 + \frac{\varepsilon}{6} + \frac{\varepsilon^2}{3},

whose derivative at ε=0\varepsilon = 0 is 16\frac16, as computed. Since δJ[y0;h]≠0\delta J[y_0; h] \ne 0, part 2 says y0y_0 is not an extremum. Indeed ε=−14\varepsilon = -\frac14 gives J=53−124+148=53−148<J[y0]J = \frac53 - \frac1{24} + \frac1{48} = \frac53 - \frac1{48} < J[y_0].

ApplicationOriginal

When the first variation can be written as δJ[y;h]=∫abG(x) h(x) dx\delta J[y;h] = \int_a^b G(x)\,h(x)\,dx for a continuous GG, physicists call G(x)G(x) the functional derivative δJ/δy(x)\delta J/\delta y(x). It plays the role of the gradient. In density-functional theory the ground-state density makes the energy functional stationary under a particle-number constraint. In statistical field theory the mean field solves δF/δϕ(x)=0\delta \mathcal F/\delta\phi(x) = 0 for the free-energy functional F\mathcal F. In data assimilation for weather prediction, the adjoint model computes the functional derivative of a misfit functional with respect to the initial state. In each case the fundamental lemma is what turns "δJ=0\delta J = 0 for all hh" into a pointwise equation.

Theorem

The Euler-Lagrange equation

Adapted

A continuously differentiable curve with fixed endpoints that makes an integral functional stationary satisfies the Euler-Lagrange equation, and it is automatically twice differentiable near every point where F_{y'y'} != 0 along it.

Prerequisites: Functionals and the first variation, Implicit and inverse function theorems

TheoremAdaptedAdapted from Gelfand & Fomin (1963), Ch. 1, §4.1, Thm 1, p. 15 and Thm 3, p. 17

Let F(x,y,p)F(x, y, p) have continuous first partial derivatives on [a,b]×R×R[a,b]\times\mathbb{R}\times\mathbb{R}, and let

J[y]=∫abF(x,y(x),y′(x)) dx,y∈C1[a,b],y(a)=A, y(b)=B.J[y] = \int_a^b F\bigl(x, y(x), y'(x)\bigr)\,dx ,\qquad y \in C^1[a,b],\quad y(a) = A,\ y(b) = B .
  1. Euler-Lagrange equation. If yy is stationary for JJ, that is, δJ[y;h]=0\delta J[y;h] = 0 for every h∈C1[a,b]h \in C^1[a,b] with h(a)=h(b)=0h(a) = h(b) = 0 (in particular, if yy is a weak local extremum), then the function x↦Fy′(x,y(x),y′(x))x \mapsto F_{y'}\bigl(x, y(x), y'(x)\bigr) is continuously differentiable on [a,b][a,b] and

    ddx Fy′(x,y,y′)=Fy(x,y,y′),a≤x≤b.\frac{d}{dx}\, F_{y'}\bigl(x, y, y'\bigr) = F_y\bigl(x, y, y'\bigr), \qquad a \le x \le b .
  2. Regularity. Suppose in addition that FF has continuous second partial derivatives, and let x0∈[a,b]x_0 \in [a,b] be a point with Fy′y′(x0,y(x0),y′(x0))≠0F_{y'y'}\bigl(x_0, y(x_0), y'(x_0)\bigr) \ne 0. Then there is a δ>0\delta > 0 such that yy is twice continuously differentiable on [x0−δ,x0+δ]∩[a,b][x_0 - \delta, x_0 + \delta]\cap[a,b] (a one-sided interval if x0x_0 is an endpoint), and on that interval the equation takes the second-order form

    Fy′y′ y′′+Fy′y y′+Fy′x−Fy=0.F_{y'y'}\,y'' + F_{y'y}\,y' + F_{y'x} - F_y = 0 .

Solutions of the Euler-Lagrange equation are called extremals, whether or not they give an extremum.

Idea of the proofOriginal

The first variation contains hh and h′h'. The textbook move is to integrate the h′h' term by parts, but that needs ddxFy′\frac{d}{dx}F_{y'}, which we do not yet know exists. Instead we integrate the hh term by parts, so that only h′h' remains. A continuous function that integrates to zero against every h′h' must be constant. That constant relation shows that Fy′F_{y'} along the curve is an antiderivative of FyF_y. Differentiability of Fy′F_{y'} comes out of the proof rather than going in.

ProofAdaptedAdapted from Gelfand & Fomin (1963), Lemmas 2 and 4, pp. 10–11 and Thm 3, pp. 17–18

Along the given curve put P(x)=Fy(x,y(x),y′(x))P(x) = F_y(x, y(x), y'(x)) and Q(x)=Fy′(x,y(x),y′(x))Q(x) = F_{y'}(x, y(x), y'(x)). Both are continuous, because FyF_y, Fy′F_{y'} are continuous and yy, y′y' are continuous.

Step 1 (first variation). By the first-variation formula,

0=δJ[y;h]=∫ab(P h+Q h′) dxfor all h∈C01[a,b].0 = \delta J[y; h] = \int_a^b \bigl(P\,h + Q\,h'\bigr)\,dx \qquad\text{for all } h \in C^1_0[a,b] .

Step 2 (move the derivative onto hh). Let Φ(x)=∫axP(t) dt\Phi(x) = \int_a^x P(t)\,dt, a C1C^1 function with Φ′=P\Phi' = P by the fundamental theorem of calculus. Integrating by parts and using h(a)=h(b)=0h(a) = h(b) = 0,

∫abP h dx=[Φh]ab−∫abΦ h′ dx=−∫abΦ h′ dx.\int_a^b P\,h\,dx = \bigl[\Phi h\bigr]_a^b - \int_a^b \Phi\,h'\,dx = -\int_a^b \Phi\,h'\,dx .

So Step 1 becomes ∫ab(Q−Φ) h′ dx=0\int_a^b (Q - \Phi)\,h'\,dx = 0 for all h∈C01[a,b]h \in C^1_0[a,b].

Step 3 (lemma of du Bois-Reymond: such a function is constant). Let g=Q−Φg = Q - \Phi, which is continuous, and let c=1b−a∫abg dxc = \frac{1}{b-a}\int_a^b g\,dx be its mean. The function h∗(x)=∫ax(g(t)−c) dth_*(x) = \int_a^x \bigl(g(t) - c\bigr)\,dt is C1C^1, has h∗(a)=0h_*(a) = 0, and has h∗(b)=0h_*(b) = 0 by the choice of cc; so it is an admissible test function, with h∗′=g−ch_*' = g - c. Using it,

∫ab(g−c)2 dx=∫ab(g−c) h∗′ dx=∫abg h∗′ dx−c (h∗(b)−h∗(a))=0−0.\int_a^b (g - c)^2\,dx = \int_a^b (g - c)\,h_*'\,dx = \int_a^b g\,h_*'\,dx - c\,\bigl(h_*(b) - h_*(a)\bigr) = 0 - 0 .

A continuous non-negative function with zero integral vanishes identically, so g≡cg \equiv c.

Step 4 (conclusion of part 1). Hence Q=Φ+cQ = \Phi + c. The right side is C1C^1 with derivative PP, so QQ is C1C^1 and Q′=PQ' = P, which is the Euler-Lagrange equation.

Step 5 (regularity at an interior point). Now let FF have continuous second derivatives and Fy′y′≠0F_{y'y'} \ne 0 at (x0,y(x0),y′(x0))(x_0, y(x_0), y'(x_0)), and suppose first that x0∈(a,b)x_0 \in (a,b). Consider

G(x,p)=Fy′(x,y(x),p)−Q(x),x∈(a,b), p∈R.G(x, p) = F_{y'}\bigl(x, y(x), p\bigr) - Q(x), \qquad x \in (a,b),\ p \in \mathbb{R} .

GG is C1C^1 in (x,p)(x,p) on the open set (a,b)×R(a,b)\times\mathbb{R}, because Fy′F_{y'} is C1C^1, yy is C1C^1, and QQ is C1C^1 by Step 4. We have G(x0,y′(x0))=0G(x_0, y'(x_0)) = 0 and ∂G/∂p=Fy′y′≠0\partial G/\partial p = F_{y'y'} \ne 0 there. By the implicit function theorem, there are open intervals U∋x0U \ni x_0, U⊂(a,b)U \subset (a,b), and V∋y′(x0)V \ni y'(x_0) and a C1C^1 function ψ\psi on UU such that, for x∈Ux \in U, the only p∈Vp \in V with G(x,p)=0G(x, p) = 0 is p=ψ(x)p = \psi(x). Since y′y' is continuous, y′(x)∈Vy'(x) \in V for xx near x0x_0, and G(x,y′(x))=0G(x, y'(x)) = 0 by definition of QQ. Hence y′=ψy' = \psi near x0x_0, so y′y' is C1C^1 there. Now that y′′y'' exists, the chain rule expands Q′=PQ' = P into the displayed second-order form, which we may solve for y′′y'':

y′′=Fy−Fy′x−Fy′y y′Fy′y′(∗)y'' = \frac{F_y - F_{y'x} - F_{y'y}\,y'}{F_{y'y'}} \tag{$\ast$}

at every interior point where Fy′y′≠0F_{y'y'} \ne 0 along the curve.

Step 6 (regularity up to an endpoint). Let x0=ax_0 = a; the case x0=bx_0 = b is symmetric. The function x↦Fy′y′(x,y(x),y′(x))x \mapsto F_{y'y'}(x, y(x), y'(x)) is continuous and nonzero at aa, so it is nonzero on [a,a+δ][a, a+\delta] for some δ>0\delta > 0 with a+δ<ba + \delta < b, and the right-hand side R(x)R(x) of (∗)(\ast), built from the continuous functions FyF_y, Fy′xF_{y'x}, Fy′yF_{y'y}, Fy′y′F_{y'y'} along the curve and y′y', is continuous there. By Step 5, y′y' is differentiable on (a,a+δ)(a, a+\delta) with y′′=Ry'' = R. Since y′y' is continuous on [a,a+δ][a, a+\delta], the mean value theorem gives, for each x∈(a,a+δ)x \in (a, a+\delta), a point ξx∈(a,x)\xi_x \in (a,x) with (y′(x)−y′(a))/(x−a)=y′′(ξx)=R(ξx)(y'(x) - y'(a))/(x - a) = y''(\xi_x) = R(\xi_x); letting x→a+x \to a^+ and using the continuity of RR at aa, the right derivative of y′y' at aa exists and equals R(a)R(a). So y′′=Ry'' = R on all of [a,a+δ][a, a+\delta] and is continuous there. □\square

RemarkOriginal

Where the hypotheses are used.

  • Only y∈C1y \in C^1 is assumed. The usual derivation integrates Q h′Q\,h' by parts, which presupposes that QQ is differentiable, and in practice that y∈C2y \in C^2. Steps 2 to 4 avoid this. The extra smoothness is then proved in Steps 5 and 6, but only where Fy′y′≠0F_{y'y'} \ne 0.
  • Fy′y′≠0F_{y'y'} \ne 0 cannot be dropped in Step 5. Take F=(p2−4x2)2F = (p^2 - 4x^2)^2 on [−1,1][-1, 1] with y(−1)=−1y(-1) = -1, y(1)=1y(1) = 1. Then J≥0J \ge 0, and y(x)=x ∣x∣y(x) = x\,|x| satisfies y′=2∣x∣y' = 2|x|, so F=0F = 0 along it and it is a global minimum. Along this curve Fy′=4y′(y′2−4x2)=0F_{y'} = 4y'(y'^2 - 4x^2) = 0 and Fy=0F_y = 0, so the Euler-Lagrange equation holds, yet y′′y'' jumps from −2-2 to 22 at x=0x = 0. Consistently, Fy′y′=4(3y′2−4x2)=32x2F_{y'y'} = 4(3y'^2 - 4x^2) = 32x^2 vanishes exactly there.
  • Strict convexity in the slope is not enough. It does not imply Fy′y′≠0F_{y'y'} \ne 0. Take F=14p4−xpF = \frac14 p^4 - xp on [−1,1][-1,1] with y(±1)=34y(\pm 1) = \frac34: p↦Fp \mapsto F is strictly convex, yet Fy′y′=3p2F_{y'y'} = 3p^2 vanishes at p=0p = 0. Here y=34∣x∣4/3y = \frac34|x|^{4/3} has y′=x1/3y' = x^{1/3}, so Fy′=y′3−x=0F_{y'} = y'^3 - x = 0 and Fy=0F_y = 0: it is a C1C^1 extremal, and it minimises the integrand pointwise (for fixed xx the minimum of 14p4−xp\frac14p^4 - xp is at p=x1/3p = x^{1/3}), hence is the global minimum. But y′=x1/3y' = x^{1/3} is not differentiable at 00.
  • Fixed endpoints are used in Step 2 to drop the boundary term [Φh]ab[\Phi h]_a^b and in Step 3 to make h∗h_* admissible. If an endpoint is free, an extra boundary condition appears (see natural boundary conditions).
  • The equation is necessary, not sufficient. For J[y]=∫02π(y′2−y2) dxJ[y] = \int_0^{2\pi}(y'^2 - y^2)\,dx with y(0)=y(2π)=0y(0) = y(2\pi) = 0, the function y=0y = 0 is an extremal. But J[sin⁡(x/2)]=−3π4<0J[\sin(x/2)] = -\frac{3\pi}{4} < 0 and J[sin⁡2x]=3π>0J[\sin 2x] = 3\pi > 0, so it is neither a minimum nor a maximum. Deciding between them is the job of the second variation.
Example(Geodesics in the plane)AdaptedAdapted from Arfken, Weber & Harris (2013), Example 22.1.1, p. 1086

The length of the graph of y∈C1[a,b]y \in C^1[a,b] is J[y]=∫ab1+y′2 dxJ[y] = \int_a^b \sqrt{1 + y'^2}\,dx, so F=1+p2F = \sqrt{1 + p^2}, with Fy=0F_y = 0 and Fy′=p/1+p2F_{y'} = p/\sqrt{1 + p^2}.

  1. Euler-Lagrange equation. It reads ddx(y′/1+y′2)=0\frac{d}{dx}\bigl(y'/\sqrt{1 + y'^2}\bigr) = 0, so y′/1+y′2=ky'/\sqrt{1 + y'^2} = k is constant, with ∣k∣<1|k| < 1.
  2. Solve. The map p↦p/1+p2p \mapsto p/\sqrt{1+p^2} is strictly increasing, so y′=k/1−k2=my' = k/\sqrt{1 - k^2} = m is constant and y=mx+ny = mx + n: the extremals are straight lines. With y(a)=Ay(a) = A, y(b)=By(b) = B there is exactly one, with m=(B−A)/(b−a)m = (B - A)/(b - a).
  3. It is a minimum. The function p↦1+p2p \mapsto \sqrt{1 + p^2} is convex, so it lies above its tangent at mm: 1+p2≥1+m2+m1+m2(p−m)\sqrt{1 + p^2} \ge \sqrt{1 + m^2} + \frac{m}{\sqrt{1 + m^2}}(p - m). Put p=y′(x)p = y'(x) for any admissible yy and integrate. Since ∫ab(y′−m) dx=(B−A)−m(b−a)=0\int_a^b (y' - m)\,dx = (B - A) - m(b - a) = 0, this gives J[y]≥(b−a)1+m2J[y] \ge (b - a)\sqrt{1 + m^2}, which is the length of the segment.
  4. Numbers. From (0,1)(0, 1) to (3,5)(3, 5): m=43m = \frac43 and the minimal length is 31+16/9=53\sqrt{1 + 16/9} = 5. The admissible competitor y=1+43x+12x(3−x)y = 1 + \frac43 x + \frac12 x(3 - x) has length 5.30625.3062 (numerical quadrature), larger as it must be.
ExampleOriginal

Minimise J[y]=∫01(y′2+y2) dxJ[y] = \int_0^1 \bigl(y'^2 + y^2\bigr)\,dx with y(0)=0y(0) = 0, y(1)=1y(1) = 1.

  1. F=p2+y2F = p^2 + y^2, so Fy′=2y′F_{y'} = 2y', Fy=2yF_y = 2y, and Fy′y′=2≠0F_{y'y'} = 2 \ne 0; by part 2 every extremal is C2C^2, and the equation is y′′=yy'' = y.
  2. The general solution is y=αcosh⁡x+βsinh⁡xy = \alpha\cosh x + \beta\sinh x. The conditions give α=0\alpha = 0 and β=1/sinh⁡1\beta = 1/\sinh 1, so y=sinh⁡x/sinh⁡1y = \sinh x/\sinh 1.
  3. Value. Integrate y′2y'^2 by parts and use y′′=yy'' = y: ∫01(y′2+y2) dx=[y y′]01−∫01y (y′′−y) dx=y(1) y′(1)=coth⁡1≈1.3130\int_0^1 (y'^2 + y^2)\,dx = [y\,y']_0^1 - \int_0^1 y\,(y'' - y)\,dx = y(1)\,y'(1) = \coth 1 \approx 1.3130.
  4. Comparison. The straight line y=xy = x gives J=1+13≈1.3333J = 1 + \frac13 \approx 1.3333, slightly more. The extremal is in fact the global minimum: for admissible y+hy + h, J[y+h]−J[y]=∫01(h′2+h2) dx≥0J[y + h] - J[y] = \int_0^1 (h'^2 + h^2)\,dx \ge 0, because the cross term 2∫01(y′h′+yh) dx2\int_0^1 (y'h' + yh)\,dx is the first variation, which vanishes.
ApplicationOriginal

A string under tension TT, with weight ww per unit length and small sag y(x)y(x) between supports at equal height, has potential energy ∫0L(T2y′2+w y) dx\int_0^L \bigl(\tfrac{T}{2}y'^2 + w\,y\bigr)\,dx to leading order. The Euler-Lagrange equation Ty′′=wT y'' = w shows that the sag profile is a parabola, the familiar shallow-cable approximation used for power lines and suspension-bridge decks. The same equation, read as a statement about the action, gives Newton's law for a particle (see Hamilton's principle). Fermat's principle gives the equation of light rays in a stratified atmosphere, the basis of refraction corrections in astronomy and radio propagation.

Method

First integrals and the Beltrami identity

Adapted

When the integrand does not involve the unknown function or the independent variable, the second-order Euler-Lagrange equation reduces to a first-order equation, which solves the brachistochrone and the minimal surface of revolution in closed form.

Prerequisites: The Euler-Lagrange equation

MethodAdaptedAdapted from Gelfand & Fomin (1963), Ch. 1, §4.2, pp. 18–19; Riley, Hobson & Bence (2006), §22.2, pp. 777–779

Let F(x,y,p)F(x, y, p) have continuous first partial derivatives, and let yy be an extremal of J[y]=∫abF(x,y,y′) dxJ[y] = \int_a^b F(x, y, y')\,dx, that is, ddxFy′=Fy\frac{d}{dx}F_{y'} = F_y along yy.

  1. No yy in the integrand. If F=F(x,p)F = F(x, p), then Fy′(x,y′(x))=CF_{y'}\bigl(x, y'(x)\bigr) = C for a constant CC.

  2. No xx in the integrand (Beltrami identity). If the extremal yy is C2C^2, then F−y′Fy′F - y'F_{y'} is differentiable along yy and

    ddx(F−y′Fy′)=Fx−y′(ddxFy′−Fy)=Fx,\frac{d}{dx}\Bigl(F - y'F_{y'}\Bigr) = F_x - y'\Bigl(\frac{d}{dx}F_{y'} - F_y\Bigr) = F_x ,

    the last step because yy is an extremal. Hence if F=F(y,p)F = F(y, p) carries no explicit xx, then F(y,y′)−y′ Fy′(y,y′)=CF(y, y') - y'\,F_{y'}(y, y') = C for a constant CC. Both hypotheses are needed: the identity differentiates y′y' and Fy′F_{y'} along the curve, and for a C2C^2 curve that is not an extremal the derivative ddxFy′\frac{d}{dx}F_{y'} need not exist when FF is merely C1C^1. For instance F=23∣p∣3/2F = \tfrac23|p|^{3/2} has continuous first partial derivatives, but along y=x2/2y = x^2/2 it gives Fy′=sgn(x)∣x∣F_{y'} = \mathrm{sgn}(x)\sqrt{|x|}, which is not differentiable at 00.

  3. No y′y' in the integrand. If F=F(x,y)F = F(x, y), the Euler-Lagrange equation is the algebraic relation Fy(x,y)=0F_y(x, y) = 0, which has no free constants and in general cannot meet two prescribed end values.

The constant CC in cases 1 and 2 is called a first integral of the Euler-Lagrange equation.

ProofAdaptedAdapted from Riley, Hobson & Bence (2006), §22.2.2, p. 779

Case 1: Fy=0F_y = 0, so the Euler-Lagrange equation says that Fy′F_{y'} has zero derivative on [a,b][a,b]; it is therefore constant. Case 3 is the Euler-Lagrange equation with Fy′=0F_{y'} = 0.

Case 2: since yy is C2C^2, the chain rule gives ddxF(x,y,y′)=Fx+Fy y′+Fy′ y′′\frac{d}{dx}F(x, y, y') = F_x + F_y\,y' + F_{y'}\,y''. By the product rule, ddx(y′Fy′)=y′′Fy′+y′ddxFy′\frac{d}{dx}\bigl(y'F_{y'}\bigr) = y''F_{y'} + y'\frac{d}{dx}F_{y'}; the last derivative exists because yy is an extremal, which by the Euler-Lagrange theorem makes Fy′F_{y'} along the curve a C1C^1 function of xx with derivative FyF_y. Subtracting, the y′′Fy′y''F_{y'} terms cancel and the identity follows. If Fx=0F_x = 0 and yy is an extremal, the right-hand side is zero, so F−y′Fy′F - y'F_{y'} is constant. □\square

MethodOriginal

To solve J[y]=∫abF dx→J[y] = \int_a^b F\,dx \to stationary, y(a)=Ay(a) = A, y(b)=By(b) = B:

  1. Check which variable is missing from FF. If yy is missing, use Fy′=CF_{y'} = C. If xx is missing, use F−y′Fy′=CF - y'F_{y'} = C. To use the Beltrami identity you need the extremal to be C2C^2: if FF has continuous second partial derivatives and Fy′y′≠0F_{y'y'} \ne 0 along the expected solution, the regularity part of the Euler-Lagrange theorem supplies that smoothness.
  2. Solve the first-order equation for y′y' and separate variables. A substitution adapted to the square roots that appear (a trigonometric or hyperbolic one) usually makes the integral elementary. Parametric solutions x(θ)x(\theta), y(θ)y(\theta) are acceptable.
  3. Fix the remaining constant and CC from the two end conditions. Expect zero, one or several solutions; the end conditions are not an initial value problem.
  4. Discard spurious solutions. The Beltrami identity is implied by the Euler-Lagrange equation but not conversely: by the identity, a C2C^2 solution of F−y′Fy′=CF - y'F_{y'} = C satisfies y′ (Fy−ddxFy′)=0y'\,(F_y - \frac{d}{dx}F_{y'}) = 0, so the Euler-Lagrange equation follows at every point where y′≠0y' \ne 0, while at a point with y′=0y'= 0 the identity says nothing about it. So a solution of the first-order equation with y′≠0y' \ne 0 throughout is an extremal; curves with y′=0y' = 0 somewhere — constant solutions in particular — must be checked in the full equation.
  5. Compare the values of JJ among the surviving extremals and with any limiting configurations (curves that leave the admissible class), since the equation is only a necessary condition.
Example(The brachistochrone)AdaptedAdapted from Riley, Hobson & Bence (2006), pp. 784–785; Gelfand & Fomin (1963), p. 26

A bead slides without friction from rest at the origin to the point BB that lies 22 m to the side and 11 m below, along a wire y=y(x)y = y(x). Here yy is measured downward and g=9.81 m s−2g = 9.81\ \mathrm{m\,s^{-2}}. Which wire is fastest?

  1. Functional. Energy conservation gives speed v=2gyv = \sqrt{2gy}, and dt=ds/vdt = ds/v, so

    T[y]=∫021+y′22g y  dx,y(0)=0, y(2)=1.T[y] = \int_0^2 \sqrt{\frac{1 + y'^2}{2g\,y}}\;dx ,\qquad y(0) = 0,\ y(2) = 1 .

    The integrand is singular at y=0y = 0. On every subinterval [δ,2][\delta, 2] where y>0y > 0 it is smooth, and a fastest curve is also fastest between any two of its own points, so it is an extremal there.

  2. First integral. xx is missing. With F=(1+p2)/(2gy)F = \sqrt{(1 + p^2)/(2gy)} we have Fpp=(2gy)−1/2(1+p2)−3/2>0F_{pp} = (2gy)^{-1/2}(1 + p^2)^{-3/2} > 0 wherever y>0y > 0, so by step 1 of the method the extremal is C2C^2 there and the Beltrami identity applies. Since F−pFp=1/2gy(1+p2)F - pF_p = 1/\sqrt{2gy(1 + p^2)}, it gives y (1+y′2)=2Ry\,(1 + y'^2) = 2R for a constant R>0R > 0.

  3. Solve. Substitute y=R(1−cos⁡θ)y = R(1 - \cos\theta). Then 1+y′2=2/(1−cos⁡θ)1 + y'^2 = 2/(1 - \cos\theta), so y′2=cot⁡2(θ/2)y'^2 = \cot^2(\theta/2). Take dy/dx=cot⁡(θ/2)dy/dx = \cot(\theta/2), positive while the bead descends. Then dx=dy tan⁡(θ/2)=2Rsin⁡2(θ/2) dθdx = dy\,\tan(\theta/2) = 2R\sin^2(\theta/2)\,d\theta, and with x=0x = 0 at θ=0\theta = 0,

    x=R(θ−sin⁡θ),y=R(1−cos⁡θ):x = R(\theta - \sin\theta), \qquad y = R(1 - \cos\theta):

    an inverted cycloid, generated by a circle of radius RR rolling along the horizontal through the start.

  4. End condition. At BB the ratio x/y=(θ−sin⁡θ)/(1−cos⁡θ)x/y = (\theta - \sin\theta)/(1 - \cos\theta) must equal 22. Solving numerically gives θ1=3.5084\theta_1 = 3.5084, and then R=1/(1−cos⁡θ1)=0.51720R = 1/(1 - \cos\theta_1) = 0.51720 m. Since θ1>π\theta_1 > \pi, the bead passes the cycloid's lowest point, 2R=1.03442R = 1.0344 m deep at x=πR=1.6248x = \pi R = 1.6248 m, and climbs the last 3.43.4 cm to BB.

  5. Travel time. Along the cycloid ds=2Rsin⁡(θ/2) dθds = 2R\sin(\theta/2)\,d\theta and v=2gR sin⁡(θ/2)v = 2\sqrt{gR}\,\sin(\theta/2), so dt=R/g dθdt = \sqrt{R/g}\,d\theta and

    T=θ1R/g=3.50840.51720/9.81=0.8056 s.T = \theta_1\sqrt{R/g} = 3.5084\sqrt{0.51720/9.81} = 0.8056\ \mathrm{s}.

    The straight chute has length 5\sqrt5 m and acceleration g/5g/\sqrt5, so it takes 2⋅5/g=1.0096\sqrt{2\cdot 5/g} = 1.0096 s, about 25%25\% longer.

Example(Minimal surface of revolution)AdaptedAdapted from Gelfand & Fomin (1963), Example 2, pp. 20–21; Arfken, Weber & Harris (2013), Example 22.1.3, pp. 1088–1092

A soap film spans two coaxial rings of radius 11 placed at x=±0.4x = \pm 0.4. Rotating y(x)>0y(x) > 0 about the xx-axis gives the area

A[y]=2π∫−0.40.4y1+y′2 dx,y(±0.4)=1.A[y] = 2\pi\int_{-0.4}^{0.4} y\sqrt{1 + y'^2}\,dx ,\qquad y(\pm 0.4) = 1 .
  1. First integral. F=y1+p2F = y\sqrt{1 + p^2} has no xx, and F−pFp=y/1+p2F - pF_p = y/\sqrt{1 + p^2}. So y/1+y′2=cy/\sqrt{1 + y'^2} = c with 0<c≤y0 < c \le y. Also Fpp=y(1+p2)−3/2>0F_{pp} = y(1 + p^2)^{-3/2} > 0, so extremals are C2C^2.
  2. Solve. y′=±y2/c2−1y' = \pm\sqrt{y^2/c^2 - 1}. Separating variables with y=ccosh⁡uy = c\cosh u gives y=ccosh⁡((x−x0)/c)y = c\cosh\bigl((x - x_0)/c\bigr), a catenary.
  3. Spurious solution. The constant y=cy = c also satisfies step 1 (the cylinder), but the full Euler-Lagrange equation ddx(yy′/1+y′2)=1+y′2\frac{d}{dx}\bigl(yy'/\sqrt{1 + y'^2}\bigr) = \sqrt{1 + y'^2} fails there: the left side is 00 and the right side is 11. So the cylinder is not stationary, as step 4 of the method warns.
  4. End conditions. Equal end values force x0=0x_0 = 0, and then ccosh⁡(0.4/c)=1c\cosh(0.4/c) = 1. This equation has two roots, c=0.91074c = 0.91074 and c=0.15796c = 0.15796.
  5. Areas. Since 1+y′2=cosh⁡(x/c)\sqrt{1 + y'^2} = \cosh(x/c), we have A=2πc∫−0.40.4cosh⁡2(x/c) dx=πc(0.8+csinh⁡(0.8/c))A = 2\pi c\int_{-0.4}^{0.4}\cosh^2(x/c)\,dx = \pi c\bigl(0.8 + c\sinh(0.8/c)\bigr). The shallow catenary gives A=4.8838A = 4.8838; the deep one gives A=6.6013A = 6.6013.
  6. Comparison. If the film breaks into two flat discs, its area is 2π=6.28322\pi = 6.2832. That configuration is not the graph of a C1C^1 function, but it is a limit of admissible ones. The shallow catenoid beats it; the deep one does not, and it is not even a local minimum. Numerically, ccosh⁡(d/c)=1c\cosh(d/c) = 1 has a solution only if the half-separation is d≤0.6627d \le 0.6627. Beyond that there is no catenoid, and the film snaps to the two discs.
RemarkOriginal

Where the hypotheses are used. The Beltrami identity differentiates F(y,y′)F(y, y') and y′Fy′y'F_{y'} along the curve, so it needs two things: y∈C2y \in C^2, and the existence of ddxFy′\frac{d}{dx}F_{y'} along the curve. The second is automatic along an extremal but can fail for a general C2C^2 curve when FF has only continuous first partials, as the example in case 2 shows; assuming F∈C2F \in C^2 also removes the difficulty. The first-integral relation itself makes sense for C1C^1 curves, but deriving it this way does not. Case 1 needs only the Euler-Lagrange equation. Each first integral reflects a symmetry: no yy means invariance under y↦y+consty \mapsto y + \text{const}, and no xx means invariance under x↦x+constx \mapsto x + \text{const}. This is the one-dimensional form of Noether's theorem.

ApplicationOriginal

In mechanics, with time as the independent variable, a Lagrangian with no explicit time dependence has the Beltrami first integral q˙ Lq˙−L\dot q\,L_{\dot q} - L, the energy. A Lagrangian with no explicit qq conserves the momentum Lq˙L_{\dot q}. In optics a medium stratified in the xx-direction, with refractive index n(x)n(x) constant on the planes x=constx = \text{const}, gives travel time proportional to ∫n(x)1+y′2 dx\int n(x)\sqrt{1 + y'^2}\,dx, with no yy. Case 1 then gives n(x) y′/1+y′2=Cn(x)\,y'/\sqrt{1 + y'^2} = C, that is, n(x)sin⁡ϕ=Cn(x)\sin\phi = C, where ϕ\phi is the angle between the ray and the normal to the layers. This is Snell's law, used in seismic ray tracing and in atmospheric refraction models.

Theorem

Several functions and higher derivatives

Adapted

A functional of several unknown functions gives one Euler-Lagrange equation per function, and an integrand containing derivatives up to order m gives the Euler-Poisson equation of order 2m.

Prerequisites: Functionals and the first variation, The Euler-Lagrange equation

TheoremAdaptedAdapted from Gelfand & Fomin (1963), §9 Theorem, p. 35 and §11, Eq. (22), p. 42

(a) Several unknown functions. Let F(x,y1,…,yn,p1,…,pn)F(x, y_1, \dots, y_n, p_1, \dots, p_n) have continuous first partial derivatives, and let y=(y1,…,yn)y = (y_1, \dots, y_n), with each yi∈C1[a,b]y_i \in C^1[a,b] and prescribed values yi(a)y_i(a), yi(b)y_i(b), be stationary for

J[y]=∫abF(x,y1,…,yn,y1′,…,yn′) dx,J[y] = \int_a^b F\bigl(x, y_1, \dots, y_n, y_1', \dots, y_n'\bigr)\,dx ,

that is, δJ[y;h]=0\delta J[y; h] = 0 for all h=(h1,…,hn)h = (h_1, \dots, h_n) with hi∈C1[a,b]h_i \in C^1[a,b] and hi(a)=hi(b)=0h_i(a) = h_i(b) = 0. Then each Fyi′F_{y_i'} is C1C^1 along yy and

ddxFyi′=Fyi,i=1,…,n.\frac{d}{dx}F_{y_i'} = F_{y_i}, \qquad i = 1, \dots, n .

(b) Higher derivatives (Euler-Poisson equation). Let m≥1m \ge 1, let F(x,y,p1,…,pm)F(x, y, p_1, \dots, p_m) have continuous partial derivatives of order up to m+1m + 1, and write Fy(k)F_{y^{(k)}} for ∂F/∂pk\partial F/\partial p_k (with Fy(0)=FyF_{y^{(0)}} = F_y). Let y∈C2m[a,b]y \in C^{2m}[a,b], with y,y′,…,y(m−1)y, y', \dots, y^{(m-1)} prescribed at both ends, be stationary for

J[y]=∫abF(x,y,y′,…,y(m)) dxJ[y] = \int_a^b F\bigl(x, y, y', \dots, y^{(m)}\bigr)\,dx

under all variations h∈Cm[a,b]h \in C^m[a,b] with h(j)(a)=h(j)(b)=0h^{(j)}(a) = h^{(j)}(b) = 0 for 0≤j≤m−10 \le j \le m - 1, that is, δJ[y;h]=0\delta J[y; h] = 0 for all such hh. Note the two classes: the curve yy is assumed to lie in the smaller class C2m[a,b]C^{2m}[a,b], while it is tested against the wider class of competitors y+εhy + \varepsilon h with h∈Cm[a,b]h \in C^m[a,b], which are only CmC^m. Then

∑k=0m(−1)kdkdxkFy(k)(x,y,…,y(m))=0,a≤x≤b.\sum_{k=0}^{m} (-1)^k \frac{d^k}{dx^k} F_{y^{(k)}}\bigl(x, y, \dots, y^{(m)}\bigr) = 0 , \qquad a \le x \le b .
Idea of the proofOriginal

For several functions, vary one component at a time: with all other components frozen, the problem is a one-function problem, and the single Euler-Lagrange equation applies to it. For higher derivatives, the first variation contains h,h′,…,h(m)h, h', \dots, h^{(m)}. Integrating the term with h(k)h^{(k)} by parts kk times moves every derivative onto the coefficient. The boundary terms vanish because the variation and its first m−1m - 1 derivatives vanish at the ends, and the fundamental lemma finishes the argument.

ProofAdaptedAdapted from Arfken, Weber & Harris (2013), p. 1097; Gelfand & Fomin (1963), pp. 35, 41–42

(a) Fix ii and take hh with hj=0h_j = 0 for j≠ij \ne i. Then ε↦J[y+εh]\varepsilon \mapsto J[y + \varepsilon h] involves only the ii-th component, and the computation of the first variation (whose proof works verbatim with more arguments) gives

0=δJ[y;h]=∫ab(Fyi hi+Fyi′ hi′) dxfor all hi∈C01[a,b],0 = \delta J[y; h] = \int_a^b \bigl(F_{y_i}\,h_i + F_{y_i'}\,h_i'\bigr)\,dx \qquad\text{for all } h_i \in C^1_0[a,b] ,

where FyiF_{y_i}, Fyi′F_{y_i'} are evaluated along yy and are continuous functions of xx. This is exactly the relation from which Steps 2 to 4 of the proof of the Euler-Lagrange theorem deduce that Fyi′F_{y_i'} is C1C^1 with derivative FyiF_{y_i}. That argument used nothing about where the two continuous coefficients came from.

(b) Step 1 (first variation). As in the one-derivative case, the mean value theorem and uniform continuity on a compact set give

δJ[y;h]=∫ab∑k=0mFy(k) h(k) dx=0.\delta J[y; h] = \int_a^b \sum_{k=0}^{m} F_{y^{(k)}}\,h^{(k)}\,dx = 0 .

Step 2 (regularity of the coefficients). Put ck(x)=Fy(k)(x,y(x),…,y(m)(x))c_k(x) = F_{y^{(k)}}(x, y(x), \dots, y^{(m)}(x)). Because FF has continuous derivatives of order m+1m + 1 and y∈C2my \in C^{2m}, the chain rule shows that ckc_k can be differentiated kk times with continuous result: each differentiation raises the order of the derivatives of yy that appear by one (at most to m+k≤2mm + k \le 2m) and the order of the derivatives of FF by one (at most to k+1≤m+1k + 1 \le m + 1).

Step 3 (integrate by parts kk times). For 1≤k≤m1 \le k \le m,

∫abck h(k) dx=[∑j=0k−1(−1)jck(j) h(k−1−j)]ab+(−1)k∫abck(k) h dx.\int_a^b c_k\,h^{(k)}\,dx = \Bigl[\sum_{j=0}^{k-1} (-1)^j c_k^{(j)}\,h^{(k-1-j)}\Bigr]_a^b + (-1)^k\int_a^b c_k^{(k)}\,h\,dx .

Every boundary term contains a derivative h(k−1−j)h^{(k-1-j)} of order at most k−1≤m−1k - 1 \le m - 1, which vanishes at aa and bb. Hence

∫ab(∑k=0m(−1)kck(k)) h dx=0.\int_a^b \Bigl(\sum_{k=0}^m (-1)^k c_k^{(k)}\Bigr)\,h\,dx = 0 .

Step 4 (fundamental lemma). The bracket is continuous. The test functions h∈Cmh \in C^m with h(j)(a)=h(j)(b)=0h^{(j)}(a) = h^{(j)}(b) = 0 for j<mj < m include the bumps ((x−c)(d−x))m+1\bigl((x - c)(d - x)\bigr)^{m+1} used in the fundamental lemma, since these vanish to order m+1m + 1 at cc and dd. That proof therefore applies and the bracket vanishes identically. □\square

RemarkAdaptedAdapted from Gelfand & Fomin (1963), §9 Remarks 1–2, p. 36; Gelfand & Fomin (1963), §11 Remark, p. 42

Where the hypotheses are used.

  • In (a), the components hih_i can be varied independently. This fails when the yiy_i are tied together by a constraint, and then multipliers are needed (see pointwise constraints).
  • In (b), y∈C2my \in C^{2m} and F∈Cm+1F \in C^{m+1} are used only in Step 2, to make the repeated integration by parts legitimate. As in the one-derivative case, a generalised du Bois-Reymond lemma shows that a stationary y∈Cmy \in C^m automatically has the needed smoothness of the combinations ckc_k, but we do not prove that here.
  • The 2m2m end conditions on y,…,y(m−1)y, \dots, y^{(m-1)} are used in Step 3. If some of them are dropped, the corresponding boundary terms survive and become natural boundary conditions (see free endpoints).
  • Different integrands, same equations. If Φ(x,y1,…,yn)\Phi(x, y_1, \dots, y_n) is C2C^2, then adding ddxΦ=Φx+∑iΦyiyi′\frac{d}{dx}\Phi = \Phi_x + \sum_i \Phi_{y_i}y_i' to FF changes JJ only by Φ(b,y(b))−Φ(a,y(a))\Phi(b, y(b)) - \Phi(a, y(a)), which is the same for all admissible curves. So the Euler-Lagrange equations do not change. Such total derivatives are called null Lagrangians. The same holds when FF is multiplied by a nonzero constant.
Example(A coupled system)Original

Find the extremal of J[y,z]=∫01(y′2+z′2+2yz) dxJ[y, z] = \int_0^1 \bigl(y'^2 + z'^2 + 2yz\bigr)\,dx with y(0)=0y(0) = 0, y(1)=1y(1) = 1, z(0)=z(1)=0z(0) = z(1) = 0.

  1. Equations. Fy′=2y′F_{y'} = 2y', Fy=2zF_y = 2z, Fz′=2z′F_{z'} = 2z', Fz=2yF_z = 2y. Part (a) gives y′′=zy'' = z and z′′=yz'' = y.

  2. Decouple. With u=y+zu = y + z and v=y−zv = y - z we get u′′=uu'' = u, v′′=−vv'' = -v, with u(0)=v(0)=0u(0) = v(0) = 0 and u(1)=v(1)=1u(1) = v(1) = 1. So u=sinh⁡x/sinh⁡1u = \sinh x/\sinh 1, v=sin⁡x/sin⁡1v = \sin x/\sin 1, and

    y=12(sinh⁡xsinh⁡1+sin⁡xsin⁡1),z=12(sinh⁡xsinh⁡1−sin⁡xsin⁡1).y = \frac12\Bigl(\frac{\sinh x}{\sinh 1} + \frac{\sin x}{\sin 1}\Bigr), \qquad z = \frac12\Bigl(\frac{\sinh x}{\sinh 1} - \frac{\sin x}{\sin 1}\Bigr).
  3. Values. y(12)=0.50658y(\tfrac12) = 0.50658 and z(12)=−0.06317z(\tfrac12) = -0.06317.

  4. Value of JJ. Integrating y′2+z′2y'^2 + z'^2 by parts and using the equations, the integral reduces to the boundary term [ yy′+zz′ ]01=y′(1)=12(coth⁡1+cot⁡1)=0.97756[\,yy' + zz'\,]_0^1 = y'(1) = \frac12(\coth 1 + \cot 1) = 0.97756. The competitor y=xy = x, z=0z = 0 gives J=1J = 1.

Example(Clamped beam)Original

A beam of length L=2L = 2 m and bending stiffness EI=1000 N m2EI = 1000\ \mathrm{N\,m^2}, clamped horizontally at both ends, carries a uniform load q=600 N/mq = 600\ \mathrm{N/m}. Its deflection w(x)w(x) (positive downward) minimises the potential energy

J[w]=∫0L(EI2 w′′2−q w) dx,w(0)=w′(0)=w(L)=w′(L)=0.J[w] = \int_0^L \Bigl(\frac{EI}{2}\,w''^2 - q\,w\Bigr)\,dx , \qquad w(0) = w'(0) = w(L) = w'(L) = 0 .
  1. Euler-Poisson equation (m=2m = 2): Fw=−qF_w = -q, Fw′=0F_{w'} = 0, Fw′′=EI w′′F_{w''} = EI\,w'', so −q+d2dx2(EI w′′)=0-q + \frac{d^2}{dx^2}\bigl(EI\,w''\bigr) = 0, that is, EI w′′′′=qEI\,w'''' = q.
  2. Solve. Integrating four times and imposing the four clamping conditions gives w=q24 EI x2(L−x)2w = \dfrac{q}{24\,EI}\,x^2(L - x)^2. Check: x2(L−x)2=x4−2Lx3+L2x2x^2(L - x)^2 = x^4 - 2Lx^3 + L^2x^2 has fourth derivative 2424, and ww and w′w' vanish at both ends because of the double roots.
  3. Number. The largest deflection is at mid-span: w(1)=60024⋅1000⋅1⋅1=0.025w(1) = \dfrac{600}{24\cdot 1000}\cdot 1 \cdot 1 = 0.025 m, which agrees with the textbook formula qL4/(384 EI)qL^4/(384\,EI).
ApplicationOriginal

Part (a) is the mathematical core of Lagrangian mechanics with several degrees of freedom (see Hamilton's principle). It also gives ray equations in three-dimensional inhomogeneous media, where y(x)y(x) and z(x)z(x) describe the ray. Part (b) governs every energy that penalises curvature: Euler-Bernoulli beams and plates in structural engineering, smoothing splines in data analysis (minimising ∫f′′2\int f''^2 plus a misfit gives piecewise cubics), and the bending energy of lipid membranes and DNA in biophysics.

Theorem

Several independent variables

Adapted

A function of several variables that makes a multiple-integral functional stationary under fixed boundary values satisfies a second-order partial differential equation in divergence form, which gives the minimal-surface equation and the field equations of a Lagrangian density.

Prerequisites: The Euler-Lagrange equation, The divergence theorem

TheoremAdaptedAdapted from Gelfand & Fomin (1963), §5, pp. 22–24; Evans (2010), §8.1.2, Eq. (9), p. 429

Let Ω⊂Rn\Omega \subset \mathbb{R}^n be a bounded open set whose boundary is regular enough for the divergence theorem (for example piecewise C1C^1). Let F(x,u,p)F(x, u, p), with x∈Ω‾x \in \overline\Omega, u∈Ru \in \mathbb{R}, p=(p1,…,pn)∈Rnp = (p_1, \dots, p_n) \in \mathbb{R}^n, have continuous second partial derivatives, and consider

J[u]=∫ΩF(x,u(x),∇u(x)) dx,u=g on ∂Ω.J[u] = \int_\Omega F\bigl(x, u(x), \nabla u(x)\bigr)\,dx , \qquad u = g \ \text{on } \partial\Omega .

If u∈C2(Ω‾)u \in C^2(\overline\Omega) is stationary, that is, ddεJ[u+εh]∣ε=0=0\frac{d}{d\varepsilon}J[u + \varepsilon h]\big|_{\varepsilon=0} = 0 for every h∈C1(Ω‾)h \in C^1(\overline\Omega) with h=0h = 0 on ∂Ω\partial\Omega, then

Fu(x,u,∇u)−∑i=1n∂∂xi[Fpi(x,u,∇u)]=0in Ω.F_u\bigl(x, u, \nabla u\bigr) - \sum_{i=1}^n \frac{\partial}{\partial x_i}\Bigl[F_{p_i}\bigl(x, u, \nabla u\bigr)\Bigr] = 0 \qquad\text{in } \Omega .

The derivative ∂/∂xi\partial/\partial x_i is the total one: it acts on xix_i both directly and through uu and ∇u\nabla u. For several unknown fields u1,…,uNu_1, \dots, u_N and F(x,u1,…,uN,∇u1,…,∇uN)F(x, u_1, \dots, u_N, \nabla u_1, \dots, \nabla u_N), the same holds for each field:

∂F∂uα−∑i=1n∂∂xi∂F∂(∂iuα)=0,α=1,…,N.\frac{\partial F}{\partial u_\alpha} - \sum_{i=1}^n \frac{\partial}{\partial x_i}\frac{\partial F}{\partial(\partial_i u_\alpha)} = 0, \qquad \alpha = 1, \dots, N .
Idea of the proofOriginal

The argument is the one-variable argument with the divergence theorem in place of integration by parts. The first variation is ∫(Fuh+Fp⋅∇h)\int (F_u h + F_p\cdot\nabla h). The second term is the integral of div⁡(hFp)\operatorname{div}(h F_p) minus hdiv⁡Fph\operatorname{div}F_p, and the divergence part becomes a boundary integral that vanishes because h=0h = 0 there. What remains is ∫(Fu−div⁡Fp) h\int(F_u - \operatorname{div}F_p)\,h, and a ball-shaped bump function shows that the bracket must be zero.

ProofAdaptedAdapted from Evans (2010), pp. 428–429; Gelfand & Fomin (1963), pp. 22–24

Step 1 (first variation). Fix an admissible hh. On the compact set Ω‾×[−1,1]\overline\Omega \times [-1, 1] the function ε↦F(x,u+εh,∇u+ε∇h)\varepsilon \mapsto F(x, u + \varepsilon h, \nabla u + \varepsilon\nabla h) has a derivative in ε\varepsilon that is continuous in (x,ε)(x, \varepsilon). The argument of the first variation (mean value theorem plus uniform continuity) therefore gives

0=δJ[u;h]=∫Ω(Fu h+∑i=1nFpi ∂h∂xi) dx,0 = \delta J[u; h] = \int_\Omega \Bigl(F_u\,h + \sum_{i=1}^n F_{p_i}\,\frac{\partial h}{\partial x_i}\Bigr)\,dx ,

with FuF_u, FpiF_{p_i} evaluated at (x,u(x),∇u(x))(x, u(x), \nabla u(x)).

Step 2 (divergence theorem). Let V(x)V(x) be the vector field with components Vi=Fpi(x,u,∇u)V_i = F_{p_i}(x, u, \nabla u). Because FF is C2C^2 and uu is C2C^2, VV is C1C^1 on Ω‾\overline\Omega. The product rule gives div⁡(hV)=∇h⋅V+hdiv⁡V\operatorname{div}(hV) = \nabla h\cdot V + h\operatorname{div}V, and the divergence theorem gives ∫Ωdiv⁡(hV) dx=∫∂Ωh V⋅ν dS=0\int_\Omega \operatorname{div}(hV)\,dx = \int_{\partial\Omega} h\,V\cdot\nu\,dS = 0, since h=0h = 0 on ∂Ω\partial\Omega. Hence

∫Ω∇h⋅V dx=−∫Ωhdiv⁡V dx,so∫Ω(Fu−div⁡V) h dx=0.\int_\Omega \nabla h\cdot V\,dx = -\int_\Omega h\operatorname{div}V\,dx, \qquad\text{so}\qquad \int_\Omega \bigl(F_u - \operatorname{div}V\bigr)\,h\,dx = 0 .

Step 3 (fundamental lemma in Ω\Omega). The function G=Fu−div⁡VG = F_u - \operatorname{div}V is continuous. Suppose G(x0)>0G(x_0) > 0 at some x0∈Ωx_0 \in \Omega (otherwise replace GG by −G-G). Then G>0G > 0 on a closed ball B‾={∣x−x0∣≤r}⊂Ω\overline{B} = \{|x - x_0| \le r\} \subset \Omega. Let h(x)=(r2−∣x−x0∣2)2h(x) = (r^2 - |x - x_0|^2)^2 on B‾\overline B and h=0h = 0 elsewhere. This hh is C1C^1, because both hh and its gradient −4(r2−∣x−x0∣2)(x−x0)-4(r^2 - |x - x_0|^2)(x - x_0) vanish on the sphere ∣x−x0∣=r|x - x_0| = r. It also vanishes on ∂Ω\partial\Omega and is positive inside BB. Then ∫ΩGh dx>0\int_\Omega G h\,dx > 0, a contradiction. So G≡0G \equiv 0 in Ω\Omega, which is the stated equation.

Several fields. Vary one field uαu_\alpha at a time, keeping the others fixed, and repeat Steps 1 to 3. □\square

RemarkOriginal

Where the hypotheses are used.

  • u∈C2u \in C^2 and F∈C2F \in C^2 are used in Step 2, to make V=Fp(x,u,∇u)V = F_p(x, u, \nabla u) continuously differentiable so that the divergence theorem applies. In several variables there is no du Bois-Reymond shortcut. Proving that a minimiser in a larger class (a Sobolev space) is smooth is a deep matter. For uniformly convex FF it is the De Giorgi-Nash-Moser theory, and it can fail for systems.
  • The boundary condition h=0h = 0 on ∂Ω\partial\Omega kills the boundary integral in Step 2. If uu is not prescribed on part of the boundary, stationarity also forces V⋅ν=Fp⋅ν=0V\cdot\nu = F_p\cdot\nu = 0 there, the multi-dimensional natural boundary condition. For the Dirichlet integral below it is the Neumann condition ∂u/∂ν=0\partial u/\partial\nu = 0.
  • Stationary, not minimal. The theorem uses only δJ=0\delta J = 0, so it applies equally to actions such as ∬(ρut2−Tux2) dx dt\iint(\rho u_t^2 - T u_x^2)\,dx\,dt, whose solutions are saddle points. The Euler-Lagrange equation of that action is the wave equation ρutt=Tuxx\rho u_{tt} = T u_{xx}.
Example(Minimal surfaces)AdaptedAdapted from Gelfand & Fomin (1963), Example, p. 24; Evans (2010), Example 4, pp. 430–431

A soap film spanning a wire whose projection bounds Ω⊂R2\Omega \subset \mathbb{R}^2, written as a height function u(x,y)u(x,y), has area ∫Ω1+ux2+uy2 dx dy\int_\Omega \sqrt{1 + u_x^2 + u_y^2}\,dx\,dy. With F=1+∣p∣2F = \sqrt{1 + |p|^2} we have Fu=0F_u = 0 and Fp=p/1+∣p∣2F_{p} = p/\sqrt{1 + |p|^2}. The stationarity condition, called the minimal surface equation, therefore reads

div⁡∇u1+∣∇u∣2=0⟺(1+uy2) uxx−2uxuy uxy+(1+ux2) uyy=0.\operatorname{div}\frac{\nabla u}{\sqrt{1 + |\nabla u|^2}} = 0 \quad\Longleftrightarrow\quad (1 + u_y^2)\,u_{xx} - 2u_xu_y\,u_{xy} + (1 + u_x^2)\,u_{yy} = 0 .

The second form follows from the first by carrying out the divergence and clearing the factor (1+∣∇u∣2)−3/2(1 + |\nabla u|^2)^{-3/2}. Geometrically, its left side equals 2(1+∣∇u∣2)3/2H2(1 + |\nabla u|^2)^{3/2}H, where HH is the mean curvature; a stationary film is therefore a surface with H=0H = 0 everywhere (see surface curvature).

Check on Scherk's surface u=ln⁡(cos⁡y/cos⁡x)u = \ln(\cos y/\cos x) on ∣x∣,∣y∣<π/2|x|, |y| < \pi/2. We have ux=tan⁡xu_x = \tan x, uy=−tan⁡yu_y = -\tan y, uxx=sec⁡2xu_{xx} = \sec^2 x, uyy=−sec⁡2yu_{yy} = -\sec^2 y and uxy=0u_{xy} = 0. Then

(1+tan⁡2y)sec⁡2x+(1+tan⁡2x)(−sec⁡2y)=sec⁡2ysec⁡2x−sec⁡2xsec⁡2y=0,(1 + \tan^2 y)\sec^2 x + (1 + \tan^2 x)(-\sec^2 y) = \sec^2 y\sec^2 x - \sec^2 x\sec^2 y = 0 ,

so the equation holds exactly.

Example(Poisson's equation on the disc)Original

Minimise J[u]=∫D(12∣∇u∣2−u) dx dyJ[u] = \int_D \bigl(\tfrac12|\nabla u|^2 - u\bigr)\,dx\,dy over the unit disc DD with u=0u = 0 on the circle.

  1. Equation. F=12∣p∣2−uF = \tfrac12|p|^2 - u, so Fu=−1F_u = -1 and Fp=pF_p = p. The Euler-Lagrange equation −1−div⁡∇u=0-1 - \operatorname{div}\nabla u = 0 is −Δu=1-\Delta u = 1.
  2. Solution. The radial function u=(1−r2)/4u = (1 - r^2)/4 has Δu=urr+ur/r=−12−12=−1\Delta u = u_{rr} + u_r/r = -\tfrac12 - \tfrac12 = -1 and vanishes at r=1r = 1.
  3. Value. Multiply −Δu=1-\Delta u = 1 by uu and use Green's identity (the divergence theorem with u=0u = 0 on the boundary): ∫D∣∇u∣2=∫Du\int_D |\nabla u|^2 = \int_D u. So J[u]=−12∫Du=−12⋅2π∫011−r24 r dr=−π16≈−0.19635J[u] = -\tfrac12\int_D u = -\tfrac12\cdot 2\pi\int_0^1 \tfrac{1 - r^2}{4}\,r\,dr = -\tfrac{\pi}{16} \approx -0.19635.
  4. A trial function. Among v=ccos⁡(πr/2)v = c\cos(\pi r/2), the energy is a quadratic in cc. Its minimum is at c=32(π−2)/(π2(π2+4))≈0.26687c = 32(\pi - 2)/\bigl(\pi^2(\pi^2 + 4)\bigr) \approx 0.26687 (compare u(0)=0.25u(0) = 0.25), with value J≈−0.19395J \approx -0.19395. This lies above −π/16-\pi/16, as it must, since uu is the minimiser. Indeed J[u+h]−J[u]=12∫D∣∇h∣2≥0J[u + h] - J[u] = \tfrac12\int_D|\nabla h|^2 \ge 0.
ApplicationOriginal

In field theory a Lagrangian density L(ϕ,∂μϕ)\mathcal L(\phi, \partial_\mu\phi) on space-time gives the field equations ∂L/∂ϕ−∑μ∂μ(∂L/∂(∂μϕ))=0\partial\mathcal L/\partial\phi - \sum_\mu \partial_\mu\bigl(\partial\mathcal L/\partial(\partial_\mu\phi)\bigr) = 0. For L=12ϕt2−12∣∇ϕ∣2−12m2ϕ2\mathcal L = \tfrac12\phi_t^2 - \tfrac12|\nabla\phi|^2 - \tfrac12 m^2\phi^2 this is the Klein-Gordon equation ϕtt−Δϕ+m2ϕ=0\phi_{tt} - \Delta\phi + m^2\phi = 0. Maxwell's equations and the equations of linear elasticity arise the same way from their densities. In engineering, writing a boundary value problem as the minimisation of an energy is the starting point of the finite element method, and the equation in this unit is what that energy minimisation solves. In image processing, total-variation denoising minimises ∫(∣∇u∣+μ2(u−f)2)\int\bigl(|\nabla u| + \tfrac{\mu}{2}(u - f)^2\bigr), whose Euler-Lagrange equation is a nonlinear diffusion equation.

Boundary conditions and constraints

3

Theorem

Free endpoints and natural boundary conditions

Adapted

When an endpoint value is not prescribed, a stationary curve must satisfy an extra boundary condition, F_{y'} = 0 at a free end and the transversality condition when the endpoint slides along a given curve, so the problem still has as many conditions as constants.

Prerequisites: The Euler-Lagrange equation, Implicit and inverse function theorems, Differentiation under the integral sign

TheoremAdaptedAdapted from Gelfand & Fomin (1963), §6, p. 26 and §14, p. 60

Let F(x,y,p)F(x, y, p) have continuous first partial derivatives and let J[y]=∫F(x,y,y′) dxJ[y] = \int F(x, y, y')\,dx.

  1. Free end values (natural boundary conditions). Let y∈C1[a,b]y \in C^1[a,b], and let the admissible variations be

    H={ h∈C1[a,b]:h(a)=0 }\mathcal{H} = \bigl\{\,h \in C^1[a,b] : h(a) = 0\,\bigr\}

    when y(a)=Ay(a) = A is prescribed and y(b)y(b) is free, and H=C1[a,b]\mathcal{H} = C^1[a,b] when both end values are free. If δJ[y;h]=0\delta J[y; h] = 0 for every h∈Hh \in \mathcal{H}, then yy satisfies the Euler-Lagrange equation on [a,b][a,b] and

    Fy′(b,y(b),y′(b))=0;F_{y'}\bigl(b, y(b), y'(b)\bigr) = 0 ;

    in the second case also Fy′(a,y(a),y′(a))=0F_{y'}\bigl(a, y(a), y'(a)\bigr) = 0.

  2. End sliding on a curve (transversality condition). Let x1>ax_1 > a and δ>0\delta > 0, let FF have continuous first partial derivatives on [a,x1+δ]×R×R[a, x_1 + \delta]\times\mathbb{R}\times\mathbb{R}, and let ψ\psi be C1C^1 on a neighbourhood of x1x_1. Let y∈C1[a,x1]y \in C^1[a, x_1] satisfy y(a)=Ay(a) = A and y(x1)=ψ(x1)y(x_1) = \psi(x_1), let y~∈C1[a,x1+δ]\tilde y \in C^1[a, x_1 + \delta] be an extension of yy, and assume y′(x1)≠ψ′(x1)y'(x_1) \ne \psi'(x_1), so the curve is not tangent to the target curve Y=ψ(X)Y = \psi(X). For h∈C1[a,x1+δ]h \in C^1[a, x_1+\delta] with h(a)=0h(a) = 0 and ∣ε∣|\varepsilon| small, the varied curve y~+εh\tilde y + \varepsilon h meets the target at a unique abscissa s(ε)s(\varepsilon) near x1x_1, with s(0)=x1s(0) = x_1 (Step 1 of the proof), so its restriction to [a,s(ε)][a, s(\varepsilon)] is an admissible competitor; write

    φh(ε)=∫as(ε)F(x,y~+εh,y~′+εh′) dx.\varphi_h(\varepsilon) = \int_a^{s(\varepsilon)} F\bigl(x, \tilde y + \varepsilon h, \tilde y' + \varepsilon h'\bigr)\,dx .

    Suppose yy is stationary in the sense that φh′(0)=0\varphi_h'(0) = 0 for every such hh. Then yy is an extremal on [a,x1][a, x_1] and

    [F+(ψ′−y′)Fy′]x=x1=0.\Bigl[F + \bigl(\psi' - y'\bigr)F_{y'}\Bigr]_{x = x_1} = 0 .

    For integrands F=f(x,y)1+p2F = f(x, y)\sqrt{1 + p^2} with f≠0f \ne 0, this reduces to y′(x1) ψ′(x1)=−1y'(x_1)\,\psi'(x_1) = -1: the extremal meets the target curve at a right angle.

Idea of the proofOriginal

Allowing more competitors gives more information. The variations that vanish at both ends still give the Euler-Lagrange equation. Once that equation holds, the first variation reduces to the boundary terms. A variation that does not vanish at a free end then forces the coefficient of hh there to vanish. When the end slides along a curve, moving the end changes both the integration range and the end value. The two first-order effects must cancel, and the resulting condition is transversality.

ProofAdaptedAdapted from Gelfand & Fomin (1963), §6, pp. 25–26 and §§13–14, pp. 55–60; Riley, Hobson & Bence (2006), pp. 782–784

Part 1. In both cases the variations with h(a)=h(b)=0h(a) = h(b) = 0 belong to H\mathcal{H}, so by the Euler-Lagrange theorem the function Q(x)=Fy′(x,y,y′)Q(x) = F_{y'}(x, y, y') is C1C^1 and Q′=FyQ' = F_y. For any h∈Hh \in \mathcal{H} we may now integrate by parts and use Q′=FyQ' = F_y:

0=δJ[y;h]=∫ab(Fy h+Q h′) dx=∫ab(Fy−Q′) h dx+Q(b) h(b)−Q(a) h(a)=Q(b) h(b)−Q(a) h(a).0 = \delta J[y;h] = \int_a^b \bigl(F_y\,h + Q\,h'\bigr)\,dx = \int_a^b\bigl(F_y - Q'\bigr)\,h\,dx + Q(b)\,h(b) - Q(a)\,h(a) = Q(b)\,h(b) - Q(a)\,h(a) .

If y(a)=Ay(a) = A is prescribed, every h∈Hh \in \mathcal{H} has h(a)=0h(a) = 0, and the choice h(x)=(x−a)/(b−a)h(x) = (x - a)/(b - a), which lies in H\mathcal{H} and has h(b)=1h(b) = 1, gives Q(b)=0Q(b) = 0. If both end values are free, then H=C1[a,b]\mathcal{H} = C^1[a,b]: the same hh still gives Q(b)=0Q(b) = 0, and h(x)=(b−x)/(b−a)h(x) = (b - x)/(b - a), now admissible because no condition at aa is imposed, gives Q(a)=0Q(a) = 0.

Part 2. Fix the extension y~∈C1[a,x1+δ]\tilde y \in C^1[a, x_1+\delta] of the hypothesis.

Step 1 (a family of admissible curves). Take any h∈C1[a,x1+δ]h \in C^1[a, x_1 + \delta] with h(a)=0h(a) = 0. We want to know where the curve y~+εh\tilde y + \varepsilon h meets the target. Let G(s,ε)=y~(s)+εh(s)−ψ(s)G(s, \varepsilon) = \tilde y(s) + \varepsilon h(s) - \psi(s). Then G(x1,0)=0G(x_1, 0) = 0 and ∂G/∂s (x1,0)=y′(x1)−ψ′(x1)≠0\partial G/\partial s\,(x_1, 0) = y'(x_1) - \psi'(x_1) \ne 0 by the non-tangency assumption. The implicit function theorem gives a C1C^1 function s(ε)s(\varepsilon) with s(0)=x1s(0) = x_1 and G(s(ε),ε)=0G(s(\varepsilon), \varepsilon) = 0, unique near x1x_1, and

s′(0)=−∂G/∂ε∂G/∂s∣(x1,0)=h(x1)ψ′(x1)−y′(x1).s'(0) = -\frac{\partial G/\partial\varepsilon}{\partial G/\partial s}\Big|_{(x_1, 0)} = \frac{h(x_1)}{\psi'(x_1) - y'(x_1)} .

So y~+εh\tilde y + \varepsilon h restricted to [a,s(ε)][a, s(\varepsilon)] is admissible, and it tends to yy as ε→0\varepsilon \to 0.

Step 2 (differentiate). The integrand of φh\varphi_h is C1C^1 in (x,ε)(x, \varepsilon), because FF is C1C^1 on [a,x1+δ]×R×R[a, x_1+\delta]\times\mathbb{R}\times\mathbb{R}, and the upper limit ss is C1C^1 by Step 1. So by the Leibniz rule with a variable upper limit φh\varphi_h is differentiable at 00, and the stationarity hypothesis gives

0=φh′(0)=F(x1,y,y′) s′(0)+∫ax1(Fy h+Fy′ h′) dx.0 = \varphi_h'(0) = F\bigl(x_1, y, y'\bigr)\,s'(0) + \int_a^{x_1}\bigl(F_y\,h + F_{y'}\,h'\bigr)\,dx .

Step 3 (Euler-Lagrange equation). Let k∈C1[a,x1]k \in C^1[a, x_1] with k(a)=k(x1)=0k(a) = k(x_1) = 0, and extend it to h∈C1[a,x1+δ]h \in C^1[a, x_1 + \delta] by its tangent line at x1x_1, h(x)=k′(x1)(x−x1)h(x) = k'(x_1)(x - x_1) for x>x1x > x_1; this hh is C1C^1 because k(x1)=0k(x_1) = 0, and h(a)=0h(a) = 0. Since h(x1)=0h(x_1) = 0 we have s′(0)=0s'(0) = 0 by the formula of Step 1, so Step 2 leaves ∫ax1(Fy k+Fy′ k′) dx=0\int_a^{x_1}(F_y\,k + F_{y'}\,k')\,dx = 0. These are exactly the variations with fixed ends on [a,x1][a, x_1], so by the Euler-Lagrange theorem yy is an extremal on [a,x1][a, x_1] and Q=Fy′(x,y,y′)Q = F_{y'}(x, y, y') is C1C^1 there with Q′=FyQ' = F_y.

Step 4 (boundary terms). For general hh, integrate by parts as in Part 1. The integral reduces to Fy′(x1) h(x1)F_{y'}(x_1)\,h(x_1), and Step 2 becomes

0=h(x1)[Fψ′−y′+Fy′]x=x1.0 = h(x_1)\Bigl[\frac{F}{\psi' - y'} + F_{y'}\Bigr]_{x = x_1} .

Choose hh with h(x1)≠0h(x_1) \ne 0 and multiply by ψ′−y′≠0\psi' - y' \ne 0 to get the transversality condition.

Step 5 (orthogonality). For F=f1+p2F = f\sqrt{1 + p^2} we have Fy′=f p/1+p2F_{y'} = f\,p/\sqrt{1 + p^2}, so

F+(ψ′−p)Fy′=f1+p2(1+p2+ψ′p−p2)=f (1+p ψ′)1+p2.F + (\psi' - p)F_{y'} = \frac{f}{\sqrt{1 + p^2}}\Bigl(1 + p^2 + \psi' p - p^2\Bigr) = \frac{f\,(1 + p\,\psi')}{\sqrt{1 + p^2}} .

Since f≠0f \ne 0, this vanishes exactly when p ψ′=−1p\,\psi' = -1. □\square

RemarkOriginal

Where the hypotheses are used.

  • Counting conditions. A second-order Euler-Lagrange equation has two free constants. In Part 1 the lost condition y(b)=By(b) = B is replaced by Fy′=0F_{y'} = 0. In Part 2 there is a third unknown, x1x_1, and two conditions at that end, y(x1)=ψ(x1)y(x_1) = \psi(x_1) and transversality. Conditions imposed on the admissible class, such as y(a)=Ay(a) = A, are called essential. Conditions that come out of stationarity, such as Fy′(b)=0F_{y'}(b) = 0, are called natural. A minimiser satisfies the natural conditions automatically, which is why finite-element codes never impose them explicitly.
  • Non-tangency y′(x1)≠ψ′(x1)y'(x_1) \ne \psi'(x_1) is used in Step 1 of Part 2 to apply the implicit function theorem. Without it, the end of a varied curve need not move smoothly along the target.
  • Stationarity, not a weak extremum, in Part 2. The competitors there are defined on intervals [a,s(ε)][a, s(\varepsilon)] with different right endpoints, so the C1C^1-norm notion of a weak local extremum, which compares functions on one fixed interval, does not apply to them. Gelfand and Fomin measure the distance between two curves with different end abscissae by the C1C^1 distance of extensions to a common interval plus the Euclidean distances between the two pairs of endpoints (Gelfand & Fomin (1963), §13, Eq. (3), p. 54). In that distance each family of Step 1 converges to yy, because s(ε)→x1s(\varepsilon) \to x_1 and y~+εh→y~\tilde y + \varepsilon h \to \tilde y in C1[a,x1+δ]C^1[a, x_1 + \delta]. Hence a curve that minimises or maximises JJ among the admissible curves within some such distance of it makes every φh\varphi_h have a local extremum at ε=0\varepsilon = 0, and φh′(0)=0\varphi_h'(0) = 0 follows because φh\varphi_h is differentiable there (Step 2). Part 2 assumes only this stationarity, which is all the proof uses.
  • Special targets. For a vertical line x=bx = b the endpoint cannot move horizontally, and Part 1 applies with Fy′=0F_{y'} = 0. For a horizontal target ψ=const\psi = \text{const} the condition reads F−y′Fy′=0F - y'F_{y'} = 0.
  • The same bookkeeping gives the natural conditions for higher derivatives and for several independent variables. In the latter case Fp⋅ν=0F_p\cdot\nu = 0 on the free part of the boundary.
Example(A free right end)Original

Minimise J[u]=∫01(12u′2−u) dxJ[u] = \int_0^1\bigl(\tfrac12 u'^2 - u\bigr)\,dx with u(0)=0u(0) = 0 and u(1)u(1) free.

  1. Euler-Lagrange equation: Fu=−1F_u = -1 and Fu′=u′F_{u'} = u', so u′′=−1u'' = -1.
  2. Natural condition: Fu′(1)=u′(1)=0F_{u'}(1) = u'(1) = 0.
  3. Solve: u=−12x2+αx+βu = -\tfrac12 x^2 + \alpha x + \beta, with β=0\beta = 0 from u(0)=0u(0) = 0 and α=1\alpha = 1 from u′(1)=0u'(1) = 0. So u=x−12x2u = x - \tfrac12 x^2, with u(1)=12u(1) = \tfrac12.
  4. Value: J[u]=∫01(12(1−x)2−x+12x2)dx=16−12+16=−16J[u] = \int_0^1\bigl(\tfrac12(1 - x)^2 - x + \tfrac12 x^2\bigr)dx = \tfrac16 - \tfrac12 + \tfrac16 = -\tfrac16. The best straight line u=axu = ax has J=a2/2−a/2J = a^2/2 - a/2, minimised at a=12a = \tfrac12 with J=−18>−16J = -\tfrac18 > -\tfrac16, consistent with uu being the minimiser.

Physically, uu is the deflection of a string fixed at x=0x = 0, attached at x=1x = 1 to a ring sliding freely on a vertical rod, and loaded uniformly. At the free end the string must leave the rod horizontally.

Example(Shortest distance to a parabola)Original

Find the shortest graph from P=(0,3)P = (0, 3) to the parabola Y=X2Y = X^2.

  1. Functional and extremals. J=∫0x11+y′2 dxJ = \int_0^{x_1}\sqrt{1 + y'^2}\,dx with y(0)=3y(0) = 3 and y(x1)=x12y(x_1) = x_1^2. As shown in the Euler-Lagrange unit, the extremals are straight lines.
  2. Transversality. Here f=1f = 1, so the line must meet the parabola at a right angle. A line from (0,3)(0, 3) to (t,t2)(t, t^2) has direction (t,t2−3)(t, t^2 - 3) and the parabola has tangent (1,2t)(1, 2t). Orthogonality gives t+2t(t2−3)=t (2t2−5)=0t + 2t(t^2 - 3) = t\,(2t^2 - 5) = 0.
  3. Candidates. The root t=0t = 0 gives a vertical segment, which is not a graph y(x)y(x), so the theorem does not apply to it; it is in fact the longest of the stationary segments. The root t=5/2t = \sqrt{5/2} gives the foot point (1.5811,2.5)(1.5811, 2.5); the root t=−5/2t = -\sqrt{5/2} has x1<0=ax_1 < 0 = a, so it falls outside the set-up J=∫ax1J = \int_a^{x_1} with x1>ax_1 > a, and it is the mirror image of the first solution, found by running the same computation to the left. At the foot point the line has slope −0.5/1.5811=−0.31623-0.5/1.5811 = -0.31623 and the parabola has slope 3.16233.1623, whose product is −1-1.
  4. Distance: 5/2+(5/2−3)2=11/2≈1.6583\sqrt{5/2 + (5/2 - 3)^2} = \sqrt{11}/2 \approx 1.6583, shorter than the vertical distance 33.
Example(Freeing an end lowers the minimum)Original

Minimise J[y]=∫01(y′2+y2) dxJ[y] = \int_0^1\bigl(y'^2 + y^2\bigr)\,dx with y(0)=1y(0) = 1, first with y(1)y(1) free and then with y(1)=0y(1) = 0 imposed.

  1. Equations. Fy=2yF_y = 2y and Fy′=2y′F_{y'} = 2y', so the Euler-Lagrange equation is y′′=yy'' = y in both problems; Fy′y′=2≠0F_{y'y'} = 2 \ne 0, so the extremals are C2C^2.
  2. Free end. The natural condition is Fy′(1)=2y′(1)=0F_{y'}(1) = 2y'(1) = 0. With y=αcosh⁡x+βsinh⁡xy = \alpha\cosh x + \beta\sinh x, the conditions y(0)=1y(0) = 1 and y′(1)=0y'(1) = 0 give y=cosh⁡(1−x)/cosh⁡1y = \cosh(1 - x)/\cosh 1.
  3. Its value. Integrating by parts and using y′′=yy'' = y, J[y]=[y y′]01=y(1)y′(1)−y(0)y′(0)=tanh⁡1=0.76159J[y] = [y\,y']_0^1 = y(1)y'(1) - y(0)y'(0) = \tanh 1 = 0.76159. It is the global minimum: for admissible y+hy + h (so h(0)=0h(0) = 0, h(1)h(1) unrestricted) the cross term is 2[y′h]01−2∫01(y′′−y)h dx=02[y'h]_0^1 - 2\int_0^1(y'' - y)h\,dx = 0, because y′(1)=0y'(1) = 0 and h(0)=0h(0) = 0, so J[y+h]−J[y]=∫01(h′2+h2) dx≥0J[y+h] - J[y] = \int_0^1(h'^2 + h^2)\,dx \ge 0.
  4. Fixed end. Imposing y(1)=0y(1) = 0 instead gives y=sinh⁡(1−x)/sinh⁡1y = \sinh(1 - x)/\sinh 1 and, by the same boundary-term computation, J=−y(0)y′(0)=coth⁡1=1.31304J = -y(0)y'(0) = \coth 1 = 1.31304.
  5. Comparison. The free-end minimum is the smaller, as it must be: its competitors include all the curves of the fixed-end problem. The natural condition y′(1)=0y'(1) = 0 is what the free-end minimiser does of its own accord instead of meeting a prescribed value.
ApplicationOriginal

Natural boundary conditions are the free-edge conditions of continuum mechanics. A cantilever beam with energy ∫(EI2w′′2−qw)\int\bigl(\tfrac{EI}{2}w''^2 - qw\bigr) is clamped at one end (w=w′=0w = w' = 0, essential) and free at the other. There stationarity yields w′′=0w'' = 0 (no bending moment) and w′′′=0w''' = 0 (no shear force). For a membrane or a heat-conducting body with a free or insulated edge, the natural condition is ∂u/∂ν=0\partial u/\partial\nu = 0. In optimal control and in optics, transversality conditions fix the free terminal time or position: a ray leaving a point and ending on a mirror surface of its choice must meet that surface at right angles.

Method

Isoperimetric problems

Adapted

To make one integral stationary while another integral is held fixed, add a constant Lagrange multiplier times the constraint integrand and solve the Euler-Lagrange equation of the sum; this gives the circular arc of Dido's problem and the catenary of a hanging chain.

Prerequisites: The Euler-Lagrange equation, Lagrange multipliers

MethodAdaptedAdapted from Gelfand & Fomin (1963), Ch. 2, §12.1, Thm 1, p. 43

Let F(x,y,p)F(x, y, p) and G(x,y,p)G(x, y, p) have continuous first partial derivatives. Among y∈C1[a,b]y \in C^1[a,b] with y(a)=Ay(a) = A, y(b)=By(b) = B and

K[y]=∫abG(x,y,y′) dx=ℓ,K[y] = \int_a^b G(x, y, y')\,dx = \ell ,

suppose yy gives a weak local extremum of J[y]=∫abF(x,y,y′) dxJ[y] = \int_a^b F(x, y, y')\,dx. Assume that yy is not an extremal of KK, that is, δK[y;h2]≠0\delta K[y; h_2] \ne 0 for some h2∈C01[a,b]h_2 \in C^1_0[a,b]. Then there is a constant λ\lambda such that yy is an extremal of J+λKJ + \lambda K:

ddx(F+λG)y′=(F+λG)yon [a,b].\frac{d}{dx}\bigl(F + \lambda G\bigr)_{y'} = \bigl(F + \lambda G\bigr)_y \qquad\text{on } [a,b] .

With several constraints Kj[y]=ℓjK_j[y] = \ell_j (j=1,…,kj = 1, \dots, k), the same conclusion holds for F+∑jλjGjF + \sum_j\lambda_j G_j, provided the linear map h↦(δK1[y;h],…,δKk[y;h])h \mapsto \bigl(\delta K_1[y;h], \dots, \delta K_k[y;h]\bigr) from C01[a,b]C^1_0[a,b] onto Rk\mathbb{R}^k is surjective.

Idea of the proofOriginal

A variation in an arbitrary direction h1h_1 would usually spoil the constraint. We repair it with a second, fixed direction h2h_2 that does change KK. In the two-parameter family y+sh1+th2y + s h_1 + t h_2, the condition K=ℓK = \ell cuts out a curve through the origin of the (s,t)(s,t)-plane. Along that curve JJ has an extremum at the origin. This is an ordinary two-variable problem with one constraint, and the finite-dimensional Lagrange multiplier rule gives a multiplier. The multiplier comes out as a ratio computed from h2h_2 alone, so it is the same for every h1h_1.

ProofAdaptedAdapted from Gelfand & Fomin (1963), proof of Thm 1, pp. 43–45

Step 1 (two-parameter family). Fix h2h_2 as in the hypothesis and let h1∈C01[a,b]h_1 \in C^1_0[a,b] be arbitrary. Define

Φ(s,t)=J[y+sh1+th2],Ψ(s,t)=K[y+sh1+th2].\Phi(s,t) = J[y + s h_1 + t h_2], \qquad \Psi(s,t) = K[y + s h_1 + t h_2] .

The argument of the first variation, applied along each coordinate direction, shows that Φ\Phi and Ψ\Psi have partial derivatives in ss and tt given by integrals with continuous integrands; these depend continuously on (s,t)(s, t), so Φ,Ψ\Phi, \Psi are C1C^1 near (0,0)(0,0). At the origin,

Φs=δJ[y;h1],Φt=δJ[y;h2],Ψs=δK[y;h1],Ψt=δK[y;h2]≠0.\Phi_s = \delta J[y; h_1],\quad \Phi_t = \delta J[y; h_2],\quad \Psi_s = \delta K[y; h_1],\quad \Psi_t = \delta K[y; h_2] \ne 0 .

Step 2 (finite-dimensional extremum). For (s,t)(s, t) near the origin with Ψ(s,t)=ℓ\Psi(s,t) = \ell, the function y+sh1+th2y + s h_1 + t h_2 has the right end values, satisfies the constraint and lies within ∣s∣ ∥h1∥1+∣t∣ ∥h2∥1|s|\,\|h_1\|_1 + |t|\,\|h_2\|_1 of yy in the C1C^1 norm. So Φ\Phi restricted to the level set {Ψ=ℓ}\{\Psi = \ell\} has a local extremum at (0,0)(0, 0), and ∇Ψ(0,0)≠0\nabla\Psi(0,0) \ne 0 because Ψt≠0\Psi_t \ne 0.

Step 3 (multiplier). By the Lagrange multiplier rule there is μ\mu with ∇Φ(0,0)=μ ∇Ψ(0,0)\nabla\Phi(0,0) = \mu\,\nabla\Psi(0,0). The tt-component gives μ=δJ[y;h2]/δK[y;h2]\mu = \delta J[y;h_2]/\delta K[y;h_2], which does not depend on h1h_1. Put λ=−μ\lambda = -\mu. The ss-component then reads

δJ[y;h1]+λ δK[y;h1]=0for every h1∈C01[a,b].\delta J[y; h_1] + \lambda\,\delta K[y; h_1] = 0 \qquad\text{for every } h_1 \in C^1_0[a,b] .

Step 4 (Euler-Lagrange equation). The left side is the first variation of the functional with integrand F+λGF + \lambda G, which has continuous first derivatives. So yy is stationary for it, and the Euler-Lagrange theorem gives the equation. □\square

For kk constraints the same proof works with kk repairing directions h2,…,hk+1h_2, \dots, h_{k+1} chosen so that the k×kk \times k matrix (δKj[y;hi+1])\bigl(\delta K_j[y; h_{i+1}]\bigr) is invertible, which is possible by the surjectivity hypothesis. We do not write it out.

MethodAdaptedAdapted from Riley, Hobson & Bence (2006), §22.4, pp. 785–786; Gelfand & Fomin (1963), p. 45

To make J[y]=∫abF dxJ[y] = \int_a^b F\,dx stationary subject to y(a)=Ay(a) = A, y(b)=By(b) = B, ∫abG dx=ℓ\int_a^b G\,dx = \ell:

  1. Form F∗=F+λGF^* = F + \lambda G with an unknown constant λ\lambda.
  2. Write the Euler-Lagrange equation of F∗F^*. If F∗F^* has no xx, use the Beltrami first integral F∗−y′Fy′∗=CF^* - y'F^*_{y'} = C.
  3. Solve. The general solution contains two constants of integration and λ\lambda.
  4. Determine all three from the two end conditions and the constraint ∫G dx=ℓ\int G\,dx = \ell.
  5. Check the non-degeneracy hypothesis (the solution must not also be an extremal of KK), and compare values of JJ among the candidates.

The multiplier usually has a physical meaning: with the convention F+λGF + \lambda G, the number −λ-\lambda is the rate of change of the optimal value of JJ with respect to ℓ\ell. In the examples below it is a radius and a tension.

Example(Dido's problem)AdaptedAdapted from Gelfand & Fomin (1963), Example 1, p. 49

A rope of length ℓ=2.5\ell = 2.5 is tied to the points (±1,0)(\pm 1, 0) on a straight shore. Which curve y(x)≥0y(x) \ge 0 encloses the largest area with the shore?

  1. Set-up. Maximise J=∫−11y dxJ = \int_{-1}^1 y\,dx subject to K=∫−111+y′2 dx=2.5K = \int_{-1}^1\sqrt{1 + y'^2}\,dx = 2.5 and y(±1)=0y(\pm 1) = 0. So F∗=y+λ1+y′2F^* = y + \lambda\sqrt{1 + y'^2}.
  2. Equation. Fy∗=1F^*_y = 1 and Fy′∗=λy′/1+y′2F^*_{y'} = \lambda y'/\sqrt{1 + y'^2}, so ddx(λy′/1+y′2)=1\frac{d}{dx}\bigl(\lambda y'/\sqrt{1 + y'^2}\bigr) = 1. Integrating, λy′/1+y′2=x−x0\lambda y'/\sqrt{1 + y'^2} = x - x_0.
  3. Solve. Solving for y′y' and integrating once more gives (x−x0)2+(y−y0)2=λ2(x - x_0)^2 + (y - y_0)^2 = \lambda^2: an arc of a circle of radius ∣λ∣|\lambda|. Symmetry of the end conditions gives x0=0x_0 = 0.
  4. Constants. Let the arc subtend the angle 2α2\alpha at its centre (0,y0)(0, y_0), with radius rr. The chord gives rsin⁡α=1r\sin\alpha = 1 and the length gives 2rα=2.52r\alpha = 2.5. Hence sin⁡α/α=0.8\sin\alpha/\alpha = 0.8, so α=1.13110\alpha = 1.13110 and r=1.10512r = 1.10512. The centre lies at depth rcos⁡α=0.47041r\cos\alpha = 0.47041 below the shore, and the arc rises 0.634710.63471 above it.
  5. Area. A circular segment has area 12r2(2α−sin⁡2α)=0.91099\tfrac12 r^2(2\alpha - \sin 2\alpha) = 0.91099. For comparison, the parabola y=k(1−x2)y = k(1 - x^2) of the same length has k=0.67406k = 0.67406 and area 43k=0.89875\tfrac43 k = 0.89875, which is smaller.
  6. Non-degeneracy. The arc is not a straight segment, so it is not an extremal of length, and the theorem applies. For ℓ>π\ell > \pi the optimal arc would exceed a semicircle and could not be written as a graph over the shore; a parametric formulation is needed then.
Example(The hanging chain)AdaptedAdapted from Riley, Hobson & Bence (2006), pp. 786–787

A uniform chain of length 33 hangs from the points (±1,0)(\pm 1, 0), with yy measured upward. Its shape minimises the potential energy, proportional to ∫y ds\int y\,ds, at fixed length.

  1. Set-up. J=∫−11y1+y′2 dxJ = \int_{-1}^1 y\sqrt{1 + y'^2}\,dx, K=∫−111+y′2 dx=3K = \int_{-1}^1\sqrt{1 + y'^2}\,dx = 3, y(±1)=0y(\pm 1) = 0. So F∗=(y+λ)1+y′2F^* = (y + \lambda)\sqrt{1 + y'^2}.
  2. First integral. F∗F^* has no xx, and F∗−y′Fy′∗=(y+λ)/1+y′2=cF^* - y'F^*_{y'} = (y + \lambda)/\sqrt{1 + y'^2} = c.
  3. Solve. This is the equation of the minimal surface of revolution for Y=y+λY = y + \lambda, so y+λ=ccosh⁡((x−x0)/c)y + \lambda = c\cosh\bigl((x - x_0)/c\bigr). Symmetry gives x0=0x_0 = 0.
  4. Constants. The length is ∫−11cosh⁡(x/c) dx=2csinh⁡(1/c)=3\int_{-1}^1\cosh(x/c)\,dx = 2c\sinh(1/c) = 3, so c=0.61647c = 0.61647. The end condition gives λ=ccosh⁡(1/c)=1.62174\lambda = c\cosh(1/c) = 1.62174.
  5. Shape. The lowest point is y(0)=c−λ=−1.00527y(0) = c - \lambda = -1.00527, so the chain sags 1.00531.0053 below its supports. The multiplier λ\lambda is the height of the supports above the "directrix" y=−λy = -\lambda. Physically, the tension at a point at height yy equals the weight per unit length times y+λy + \lambda.
RemarkOriginal

Where the hypotheses are used. The non-degeneracy assumption δK[y;h2]≠0\delta K[y; h_2] \ne 0 is used in Step 2 to make ∇Ψ≠0\nabla\Psi \ne 0, so that the finite-dimensional multiplier rule applies. It cannot be dropped. Take K[y]=∫011+y′2 dx=1K[y] = \int_0^1\sqrt{1 + y'^2}\,dx = 1 with y(0)=y(1)=0y(0) = y(1) = 0. The only admissible curve is y=0y = 0, which is therefore an extremum of J=∫01y dxJ = \int_0^1 y\,dx. But the Euler-Lagrange equation of y+λ1+y′2y + \lambda\sqrt{1 + y'^2} along y=0y = 0 reads 0=10 = 1, false for every λ\lambda. Here y=0y = 0 is an extremal of KK (a straight line), so the theorem does not apply. In such degenerate cases one can only assert the weaker rule that λ0F+λG\lambda_0 F + \lambda G is stationary for some (λ0,λ)≠(0,0)(\lambda_0, \lambda) \ne (0, 0).

ApplicationOriginal

In statistical mechanics and information theory, maximising the entropy −∫fln⁡f dx-\int f\ln f\,dx of a probability density subject to ∫f dx=1\int f\,dx = 1 and ∫x2f dx=σ2\int x^2 f\,dx = \sigma^2 gives −ln⁡f−1+λ0+λ1x2=0-\ln f - 1 + \lambda_0 + \lambda_1 x^2 = 0 (no derivatives appear, so the Euler-Lagrange equation is algebraic). Hence ff is a Gaussian, with λ1=−1/(2σ2)\lambda_1 = -1/(2\sigma^2) and λ0−1\lambda_0 - 1 the logarithm of the normalising constant. With an energy constraint in place of the variance this gives the Boltzmann distribution, where the multiplier is −1/(kBT)-1/(k_BT). Minimising ∫p y′2+q y2\int p\,y'^2 + q\,y^2 subject to ∫w y2=1\int w\,y^2 = 1 gives a Sturm-Liouville equation whose multiplier is an eigenvalue (see variational eigenvalues). This is also how a normalised quantum ground state is computed.

Method

Pointwise constraints

Adapted

To make an integral stationary over curves forced to lie on a surface g = 0, add to the integrand g times a multiplier that is a function of the independent variable; for arc length this shows that geodesics are the curves whose acceleration is normal to the surface, such as great circles on a sphere and helices on a cylinder.

Prerequisites: Several functions and higher derivatives, Lagrange multipliers, Implicit and inverse function theorems

MethodAdaptedAdapted from Gelfand & Fomin (1963), Ch. 2, §12.2, Thm 2, p. 46

Let q=(q1,…,qn)q = (q_1, \dots, q_n) be the unknown functions of t∈[t0,t1]t \in [t_0, t_1], with n≥2n \ge 2. Let F(t,q,p)F(t, q, p) be C2C^2 on an open set U⊂R×Rn×RnU \subset \mathbb{R}\times\mathbb{R}^n\times\mathbb{R}^n, and let g(t,q)g(t, q) be C2C^2. Consider

J[q]=∫t0t1F(t,q,q′) dtJ[q] = \int_{t_0}^{t_1} F\bigl(t, q, q'\bigr)\,dt

over C1C^1 curves with (t,q,q′)∈U(t, q, q') \in U, prescribed q(t0)q(t_0), q(t1)q(t_1), and the pointwise (holonomic) constraint

g(t,q(t))=0for every t∈[t0,t1].g\bigl(t, q(t)\bigr) = 0 \qquad\text{for every } t \in [t_0, t_1] .

Suppose q∈C2[t0,t1]q \in C^2[t_0, t_1] is a weak local extremum and that the gradient ∇qg=(gq1,…,gqn)\nabla_q g = (g_{q_1}, \dots, g_{q_n}) does not vanish at any point (t,q(t))(t, q(t)). Then there is a continuous function λ(t)\lambda(t) such that

ddtFqi′−Fqi=λ(t) gqi(t,q(t)),i=1,…,n,\frac{d}{dt}F_{q_i'} - F_{q_i} = \lambda(t)\,g_{q_i}\bigl(t, q(t)\bigr), \qquad i = 1, \dots, n ,

that is, qq is an extremal of ∫(F+λ(t) g) dt\int\bigl(F + \lambda(t)\,g\bigr)\,dt, treated as a functional of qq with λ\lambda fixed. Explicitly, λ=−(E⋅∇qg)/∣∇qg∣2\lambda = -\bigl(E\cdot\nabla_q g\bigr)/|\nabla_q g|^2, where Ei=Fqi−ddtFqi′E_i = F_{q_i} - \frac{d}{dt}F_{q_i'}.

Idea of the proofOriginal

Near any point of the curve, the constraint can be solved for one coordinate in terms of the others. That turns the problem locally into an unconstrained one in the remaining coordinates. Varying those coordinates freely shows that the vector EE of Euler-Lagrange expressions has no component along the surface: it is parallel to ∇qg\nabla_q g at every tt. The proportionality factor is the multiplier. Unlike the isoperimetric case, there is one constraint for every tt, so the multiplier is a function of tt rather than a single number.

ProofAdaptedAdapted from Gelfand & Fomin (1963), proof of Thm 2, pp. 46–48

Write gi=gqi(t,q(t))g_i = g_{q_i}(t, q(t)) and Ei(t)=Fqi−ddtFqi′E_i(t) = F_{q_i} - \frac{d}{dt}F_{q_i'}, evaluated along the curve. Because FF is C2C^2 and qq is C2C^2, each Fqi′(t,q,q′)F_{q_i'}(t, q, q') is C1C^1, so EiE_i is continuous. It suffices to show that EE is parallel to ∇qg\nabla_q g at every tt. Then E=−λ∇qgE = -\lambda\nabla_q g with λ=−(E⋅∇qg)/∣∇qg∣2\lambda = -(E\cdot\nabla_q g)/|\nabla_q g|^2, which is continuous because ∇qg≠0\nabla_q g \ne 0, and this is the claim.

Step 1 (local solution of the constraint). Fix t∗∈[t0,t1]t_* \in [t_0, t_1] and choose kk with gk(t∗)≠0g_k(t_*) \ne 0. Write q^\hat q for the coordinates other than qkq_k. By the implicit function theorem, there are a neighbourhood NN of (t∗,q^(t∗))(t_*, \hat q(t_*)), an interval W∋qk(t∗)W \ni q_k(t_*) and a C2C^2 function ϕ\phi on NN such that, for (t,q^)∈N(t, \hat q) \in N and qk∈Wq_k \in W, g(t,q)=0g(t, q) = 0 holds exactly when qk=ϕ(t,q^)q_k = \phi(t, \hat q). Moreover ϕqi=−gqi/gqk\phi_{q_i} = -g_{q_i}/g_{q_k} for i≠ki \ne k. By continuity there is an interval I∋t∗I \ni t_*, open relative to [t0,t1][t_0, t_1], on which (t,q^(t))∈N(t, \hat q(t)) \in N and qk(t)∈Wq_k(t) \in W. On II, therefore, qk(t)=ϕ(t,q^(t))q_k(t) = \phi(t, \hat q(t)).

Step 2 (admissible variations). Fix i≠ki \ne k and a C2C^2 function η\eta whose support is a compact subset of I∩(t0,t1)I \cap (t_0, t_1). Define the varied curve to agree with qq outside II, and on II to have q^+εη ei\hat q + \varepsilon\eta\,e_i in the q^\hat q-slots and ϕ(t,q^+εη ei)\phi(t, \hat q + \varepsilon\eta\,e_i) in the kk-th slot. For small ∣ε∣|\varepsilon| this curve is C2C^2, lies on the surface, has the same endpoints, and tends to qq in the C1C^1 norm as ε→0\varepsilon \to 0. Its kk-th component changes at first order by

ζ(t)=ϕqi(t,q^(t)) η(t)=−gigk η(t),\zeta(t) = \phi_{q_i}\bigl(t, \hat q(t)\bigr)\,\eta(t) = -\frac{g_i}{g_k}\,\eta(t),

a C1C^1 function with the same support as η\eta.

Step 3 (first variation). The derivative of the integrand in ε\varepsilon is continuous in (t,ε)(t, \varepsilon), since ϕ\phi is C2C^2. Differentiating under the integral sign, as in the case of several functions, gives

0=∫(Fqi η+Fqi′ η′+Fqk ζ+Fqk′ ζ′) dt=∫(Ei η+Ek ζ) dt=∫(Ei−Ekgigk)η dt.0 = \int\Bigl(F_{q_i}\,\eta + F_{q_i'}\,\eta' + F_{q_k}\,\zeta + F_{q_k'}\,\zeta'\Bigr)\,dt = \int\bigl(E_i\,\eta + E_k\,\zeta\bigr)\,dt = \int\Bigl(E_i - E_k\frac{g_i}{g_k}\Bigr)\eta\,dt .

Here we integrated the η′\eta' and ζ′\zeta' terms by parts; the boundary terms vanish because η\eta and ζ\zeta vanish near the ends of their support. The bracket is continuous on II. By the fundamental lemma on subintervals of II, Ei gk=Ek giE_i\,g_k = E_k\,g_i on II, for every i≠ki \ne k, and trivially for i=ki = k.

Step 4 (conclusion). On II, then, E=(Ek/gk) ∇qgE = (E_k/g_k)\,\nabla_q g is parallel to ∇qg\nabla_q g. Since t∗t_* was arbitrary, this holds on all of [t0,t1][t_0, t_1]. □\square

MethodOriginal

To make ∫F(t,q,q′) dt\int F(t, q, q')\,dt stationary over curves on g(t,q)=0g(t, q) = 0 with fixed ends:

  1. Form F+λ(t) g(t,q)F + \lambda(t)\,g(t, q) with an unknown function λ\lambda.
  2. Write the nn Euler-Lagrange equations in qq (no equation for λ\lambda). Together with g=0g = 0 these are n+1n + 1 equations for n+1n + 1 unknown functions.
  3. Eliminate λ\lambda. Either take the components of the equations tangent to the surface, or solve one equation for λ\lambda and substitute.
  4. Fix the 2n2n constants of integration by the end conditions. Check that ∇qg≠0\nabla_q g \ne 0 along the solution.
  5. Alternatively, parametrise the surface and solve an unconstrained problem in the parameters. That avoids λ\lambda but loses its interpretation as a constraint force.

With several constraints g1=⋯=gm=0g_1 = \dots = g_m = 0 (m<nm < n) one uses F+∑jλj(t) gjF + \sum_j\lambda_j(t)\,g_j. The analogous theorem needs the gradients ∇qgj\nabla_q g_j to be linearly independent along the curve; we state it without proof.

Example(Geodesics on a sphere)AdaptedAdapted from Gelfand & Fomin (1963), Example 2, pp. 49–50

Find the shortest curve on the unit sphere g=x2+y2+z2−1=0g = x^2 + y^2 + z^2 - 1 = 0 from P=(1,0,0)P = (1, 0, 0) to Q=(12,12,12)Q = (\tfrac12, \tfrac12, \tfrac1{\sqrt2}).

  1. Functional. Length is ∫∣r′(t)∣ dt\int|r'(t)|\,dt, with F=∣p∣F = |p|, which is C2C^2 away from p=0p = 0; so we work with regular curves. Length does not depend on the parametrisation, so we may parametrise the extremal by arc length ss, making ∣r′∣=1|r'| = 1.
  2. Equations. Fq=0F_q = 0 and Fp=p/∣p∣F_{p} = p/|p|, so with ∣r′∣=1|r'| = 1 the equations read ddsr′=λ∇g\frac{d}{ds}r' = \lambda\nabla g, that is, r′′=2λ rr'' = 2\lambda\,r: the acceleration is normal to the sphere.
  3. Solve. dds(r×r′)=r′×r′+r×r′′=0\frac{d}{ds}(r\times r') = r'\times r' + r\times r'' = 0, so r×r′=Nr\times r' = N is a constant vector. It is nonzero, since r⊥r′r \perp r' (differentiate ∣r∣2=1|r|^2 = 1) and ∣r∣=∣r′∣=1|r| = |r'| = 1. Then r⋅N=0r\cdot N = 0: the curve lies in the plane through the origin with normal NN, so it is an arc of a great circle.
  4. Multiplier. Differentiating r⋅r′=0r\cdot r' = 0 gives 1+r⋅r′′=01 + r\cdot r'' = 0, and r⋅r′′=2λr\cdot r'' = 2\lambda, so λ=−12\lambda = -\tfrac12 is constant.
  5. Numbers. P⋅Q=12P\cdot Q = \tfrac12, so the shorter great-circle arc has length arccos⁡12=π/3≈1.0472\arccos\tfrac12 = \pi/3 \approx 1.0472. Explicitly r(s)=cos⁡s P+sin⁡s ur(s) = \cos s\,P + \sin s\,u with u=(0,1/3,2/3)u = (0, 1/\sqrt3, \sqrt2/\sqrt3), and r(π/3)=Qr(\pi/3) = Q. The complementary arc, of length 5π/3≈5.23605\pi/3 \approx 5.2360, satisfies the same equations but is not the shortest: the method yields necessary conditions only.
Example(Geodesics on a cylinder)AdaptedAdapted from do Carmo (2016), Example 4, pp. 249–250

On g=x2+y2−1=0g = x^2 + y^2 - 1 = 0, write a unit-speed curve as r(s)=(cos⁡θ(s),sin⁡θ(s),z(s))r(s) = (\cos\theta(s), \sin\theta(s), z(s)).

  1. Equations. As above, r′′=λ∇g=2λ(s) (cos⁡θ,sin⁡θ,0)r'' = \lambda\nabla g = 2\lambda(s)\,(\cos\theta, \sin\theta, 0). Computing directly, r′′=(−θ′′sin⁡θ−θ′2cos⁡θ, θ′′cos⁡θ−θ′2sin⁡θ, z′′)r'' = \bigl(-\theta''\sin\theta - \theta'^2\cos\theta,\ \theta''\cos\theta - \theta'^2\sin\theta,\ z''\bigr).
  2. Tangential components. The zz-component gives z′′=0z'' = 0. Dotting with (−sin⁡θ,cos⁡θ,0)(-\sin\theta, \cos\theta, 0), which is tangent to the cylinder and orthogonal to the right side, gives θ′′=0\theta'' = 0. So θ\theta and zz are linear in ss: the geodesics are helices, including horizontal circles and vertical lines as limiting cases. The normal component gives −θ′2=2λ-\theta'^2 = 2\lambda, so λ=−θ′2/2\lambda = -\theta'^2/2.
  3. Numbers. From (1,0,0)(1, 0, 0) to (−1,0,π)(-1, 0, \pi), θ\theta may run from 00 to π\pi, to −π-\pi, to 3π3\pi, and so on, while zz runs from 00 to π\pi. The lengths are (Δθ)2+π2\sqrt{(\Delta\theta)^2 + \pi^2}: π2≈4.4429\pi\sqrt2 \approx 4.4429 for Δθ=±π\Delta\theta = \pm\pi (two shortest helices) and π10≈9.9346\pi\sqrt{10} \approx 9.9346 for Δθ=3π\Delta\theta = 3\pi. On the shortest ones, θ′=π/(π2)=1/2\theta' = \pi/(\pi\sqrt2) = 1/\sqrt2, so λ=−14\lambda = -\tfrac14.
RemarkOriginal

Where the hypotheses are used.

  • ∇qg≠0\nabla_q g \ne 0 is used in Step 1 to solve the constraint locally, and again to define λ\lambda. It cannot be dropped. The function g~=(x2+y2−1)2\tilde g = (x^2 + y^2 - 1)^2 describes the same cylinder, but ∇g~=0\nabla\tilde g = 0 on it. With g~\tilde g, the multiplier equations would say r′′=0r'' = 0, which the shortest helices violate.
  • C2C^2 smoothness of FF, gg and qq makes EiE_i continuous and ϕ\phi twice differentiable, as needed for differentiating under the integral and for the fundamental lemma.
  • Reparametrisation in the examples relies on the length integrand being positively homogeneous of degree one in pp. For other integrands the parameter cannot be changed freely.
  • The conclusion for arc length, that the acceleration of a unit-speed geodesic is normal to the surface, is the standard characterisation of geodesics in differential geometry (see geodesics).
ApplicationOriginal

In mechanics, Hamilton's principle with a holonomic constraint gives equations of motion of the form m r¨=−∇V+λ(t)∇gm\,\ddot r = -\nabla V + \lambda(t)\nabla g (see Hamilton's principle). The term λ∇g\lambda\nabla g is the force of constraint: the tension in a pendulum rod, or the normal force of a surface on a sliding particle. Computing λ\lambda tells an engineer when a particle leaves a surface or how strong a rod must be. Constrained molecular-dynamics algorithms such as SHAKE and RATTLE fix bond lengths in exactly this way, by solving for the multipliers at every time step. In general relativity, geodesics of space-time are the extremals of the analogous length or action integral.