Algorithm Search⌘K

Theoremcore

Euler-Lagrange equation

Also called Euler-Lagrange equation of the calculus of variations.

A necessary condition for a curve to extremize an integral of a Lagrangian, the root of the calculus of variations.

The Euler-Lagrange equation is the first-order necessary condition of the calculus of variations. If a curve y(x)y(x) with fixed end points minimizes or maximizes the integral ∫abL(x,y,y′) dx\int_a^b L(x, y, y')\, dx, then ddxLy′=Ly\frac{d}{dx} L_{y'} = L_y along the curve. It plays the role that ∇F=0\nabla F = 0 plays for a function of finitely many variables. In optimal control it is the special case x˙=u\dot x = u with no constraint on uu of the Pontryagin maximum principle.

Statement

Let L:[a,b]×Rn×Rn→RL : [a, b] \times \mathbb{R}^n \times \mathbb{R}^n \to \mathbb{R}, (x,y,z)↦L(x,y,z)(x, y, z) \mapsto L(x, y, z), be C1C^1. Write LyL_y and Ly′L_{y'} for the gradients of LL in its second and third arguments. For y∈C1([a,b];Rn)y \in C^1([a, b]; \mathbb{R}^n) let

J(y)=∫abL(x,y(x),y′(x)) dx.J(y) = \int_a^b L(x, y(x), y'(x))\, dx.

Fix A,B∈RnA, B \in \mathbb{R}^n. Suppose yy is C1C^1, y(a)=Ay(a) = A, y(b)=By(b) = B, and yy is a weak local minimizer: there is ε>0\varepsilon > 0 such that J(y)≤J(y^)J(y) \le J(\hat y) for every C1C^1 curve y^\hat y with the same end points and max⁡x∣y^(x)−y(x)∣+max⁡x∣y^′(x)−y′(x)∣<ε\max_x |\hat y(x) - y(x)| + \max_x |\hat y'(x) - y'(x)| < \varepsilon.

Then the function x↦Ly′(x,y(x),y′(x))x \mapsto L_{y'}(x, y(x), y'(x)) is C1C^1 on [a,b][a, b], and

ddxLy′(x,y(x),y′(x))=Ly(x,y(x),y′(x))for all x∈[a,b].\frac{d}{dx} L_{y'}(x, y(x), y'(x)) = L_y(x, y(x), y'(x)) \quad \text{for all } x \in [a, b].

The same holds for a weak local maximizer. A curve that satisfies the equation is an extremal.

In plain words

Take a curve between two fixed points, and a rule that gives each curve a number, such as the time a bead needs to slide along it. Bend the curve a little, keeping the ends in place. If the curve is the best one, no small bend can make the number smaller, so the first-order change of the number must be zero for every bend. Writing this out gives one differential equation that the best curve must satisfy. It is a necessary condition only: a curve can satisfy it and still not be the best, and in some problems no best curve exists.

Proof

Step 1: the first variation is zero. Let η∈C1([a,b];Rn)\eta \in C^1([a, b]; \mathbb{R}^n) with η(a)=η(b)=0\eta(a) = \eta(b) = 0. For small ∣s∣|s|, the curve y+sηy + s\eta has the same end points and lies in the ε\varepsilon neighborhood, so g(s)=J(y+sη)g(s) = J(y + s\eta) has a local minimum at s=0s = 0. Because LL is C1C^1 and the integrand is continuous on a compact set, we may differentiate under the integral sign:

0=g′(0)=∫ab(LyTη+Ly′Tη′)dx,0 = g'(0) = \int_a^b \left( L_y^T \eta + L_{y'}^T \eta' \right) dx,

where LyL_y and Ly′L_{y'} are evaluated along (x,y(x),y′(x))(x, y(x), y'(x)), so they are continuous functions of xx.

Step 2: remove η\eta. Let G(x)=∫axLy dξG(x) = \int_a^x L_y\, d\xi. Then GG is C1C^1 with G′=LyG' = L_y. Integration by parts, with η(a)=η(b)=0\eta(a) = \eta(b) = 0, gives ∫abLyTη dx=−∫abGTη′ dx\int_a^b L_y^T \eta\, dx = -\int_a^b G^T \eta'\, dx. So with h=Ly′−Gh = L_{y'} - G, a continuous function,

∫abh(x)Tη′(x) dx=0for every admissible η.\int_a^b h(x)^T \eta'(x)\, dx = 0 \quad \text{for every admissible } \eta.

Step 3: the lemma of du Bois-Reymond. A continuous hh with this property is constant. Proof: let c=1b−a∫abh dxc = \frac{1}{b - a} \int_a^b h\, dx and η(x)=∫ax(h−c) dξ\eta(x) = \int_a^x (h - c)\, d\xi. Then η\eta is C1C^1, η(a)=0\eta(a) = 0, and η(b)=∫abh dx−(b−a)c=0\eta(b) = \int_a^b h\, dx - (b - a) c = 0, so η\eta is admissible. Then

∫ab∣h−c∣2dx=∫ab(h−c)Tη′ dx=∫abhTη′ dx−cT(η(b)−η(a))=0.\int_a^b |h - c|^2 dx = \int_a^b (h - c)^T \eta'\, dx = \int_a^b h^T \eta'\, dx - c^T (\eta(b) - \eta(a)) = 0.

Since h−ch - c is continuous, h=ch = c everywhere.

Step 4: conclusion. So Ly′=G+cL_{y'} = G + c. The right side is C1C^1, hence so is the left side, and differentiating gives ddxLy′=G′=Ly\frac{d}{dx} L_{y'} = G' = L_y. For a maximizer, apply the result to −L-L. ■\blacksquare

The proof does not assume that yy has a second derivative. The integrated form Ly′=∫axLy dξ+cL_{y'} = \int_a^x L_y\, d\xi + c of Step 4 is the du Bois-Reymond form of the equation.

Consequences

Second-order form. If LL is C2C^2 and yy is C2C^2, the chain rule gives

Ly′x+Ly′y y′+Ly′y′ y′′=Ly,L_{y'x} + L_{y'y}\, y' + L_{y'y'}\, y'' = L_y,

a second-order differential equation. Where the matrix Ly′y′L_{y'y'} is invertible it can be solved for y′′y'', and the two end conditions y(a)=Ay(a) = A, y(b)=By(b) = B make it a two-point boundary value problem.

A hand example. Minimize J(y)=∫01(y′2+y2) dxJ(y) = \int_0^1 (y'^2 + y^2)\, dx with y(0)=0y(0) = 0, y(1)=1y(1) = 1. The equation is 2y′′=2y2 y'' = 2 y, and the extremal with these end values is y=sinh⁡x/sinh⁡1y = \sinh x / \sinh 1. Integration by parts gives ∫01y′2dx=y(1)y′(1)−∫01yy′′ dx\int_0^1 y'^2 dx = y(1) y'(1) - \int_0^1 y y''\, dx, and y′′=yy'' = y, so J(y)=y(1)y′(1)=coth⁡1≈1.31304J(y) = y(1) y'(1) = \coth 1 \approx 1.31304. The straight line y=xy = x gives J=1+1/3=4/3≈1.33333J = 1 + 1/3 = 4/3 \approx 1.33333, which is larger. Here LL is convex in (y,y′)(y, y'), so the extremal is the global minimizer.

Beltrami identity. If LL does not depend on xx and yy is C2C^2, then

ddx(L−y′TLy′)=y′T(Ly−ddxLy′)=0,\frac{d}{dx}\left( L - y'^T L_{y'} \right) = y'^T \left( L_y - \frac{d}{dx} L_{y'} \right) = 0,

so L−y′TLy′L - y'^T L_{y'} is constant along every extremal. This is a first integral, and it reduces the order of the equation by one.

The brachistochrone. A bead slides without friction from the origin to a lower point under gravity gg. Measure yy downward. The speed at depth yy is 2gy\sqrt{2 g y}, so the travel time is

T(y)=∫0x11+y′22gy dx.T(y) = \int_0^{x_1} \sqrt{\frac{1 + y'^2}{2 g y}}\, dx.

The Lagrangian does not depend on xx, and the Beltrami identity gives 1/2gy(1+y′2)=const1/\sqrt{2 g y (1 + y'^2)} = \text{const}, that is, y(1+y′2)=2ay (1 + y'^2) = 2 a for a constant a>0a > 0. The cycloid x=a(θ−sin⁡θ)x = a(\theta - \sin\theta), y=a(1−cos⁡θ)y = a(1 - \cos\theta) solves it: y′=sin⁡θ/(1−cos⁡θ)y' = \sin\theta / (1 - \cos\theta), so 1+y′2=2/(1−cos⁡θ)1 + y'^2 = 2/(1 - \cos\theta) and y(1+y′2)=2ay(1 + y'^2) = 2a. Along the cycloid ds=a2(1−cos⁡θ) dθds = a\sqrt{2(1 - \cos\theta)}\, d\theta and the speed is 2ga(1−cos⁡θ)\sqrt{2 g a (1 - \cos\theta)}, so dt=a/g dθdt = \sqrt{a/g}\, d\theta. To reach (π,2)(\pi, 2) metres, take a=1a = 1 and θ\theta from 0 to π\pi. The time is π/g≈1.0030\pi / \sqrt{g} \approx 1.0030 s for g=9.81g = 9.81 m/s². On the straight line the acceleration along the line is constant, and the time is π2+4/g≈1.1890\sqrt{\pi^2 + 4} / \sqrt{g} \approx 1.1890 s.

Free end point. If y(b)y(b) is free, the same proof with η(b)\eta(b) arbitrary gives the natural boundary condition Ly′(b,y(b),y′(b))=0L_{y'}(b, y(b), y'(b)) = 0, a first example of the transversality conditions.

Hamiltonian form. With p=Ly′p = L_{y'} and, where y′y' can be written as a function of pp, H(x,y,p)=pTy′−LH(x, y, p) = p^T y' - L, the equation becomes the pair y′=Hpy' = H_p, p′=−Hyp' = -H_y of a Hamiltonian system.

Link to optimal control. Take x˙=u\dot x = u, u∈Rnu \in \mathbb{R}^n, and the running cost L(t,x,u)L(t, x, u). The control Hamiltonian is H=L+λTuH = L + \lambda^T u. The minimum condition gives Hu=Lu+λ=0H_u = L_u + \lambda = 0, so λ=−Lx˙\lambda = -L_{\dot x}, and the costate equation λ˙=−Hx=−Lx\dot\lambda = -H_x = -L_x is the Euler-Lagrange equation. The maximum principle also gives the Weierstrass condition and works for a constrained uu, where the Euler-Lagrange equation does not apply.

Constraints. An integral constraint ∫abM(x,y,y′) dx=c\int_a^b M(x, y, y')\, dx = c (an isoperimetric problem) gives the Euler-Lagrange equation of L+μML + \mu M for a constant Lagrange multiplier μ\mu, if yy is not an extremal of the constraint itself.

Tightness

Necessary, not sufficient. Take J(y)=∫0T(y′2−y2) dxJ(y) = \int_0^T (y'^2 - y^2)\, dx with y(0)=y(T)=0y(0) = y(T) = 0. The curve y=0y = 0 satisfies the equation y′′+y=0y'' + y = 0 for every TT. For T>πT > \pi, the curve η=sin⁡(πx/T)\eta = \sin(\pi x / T) gives J(η)=T2(π2/T2−1)<0=J(0)J(\eta) = \frac{T}{2}(\pi^2 / T^2 - 1) < 0 = J(0), so y=0y = 0 is not a minimizer. For T<πT < \pi it is one. The second-order tests, the Legendre condition Ly′y′≥0L_{y'y'} \ge 0 along a minimizer and the Jacobi condition on conjugate points, separate the two cases.

A minimizer need not exist. Weierstrass's example: J(y)=∫−11x2y′2 dxJ(y) = \int_{-1}^{1} x^2 y'^2\, dx with y(−1)=−1y(-1) = -1, y(1)=1y(1) = 1. The curves yε=arctan⁡(x/ε)/arctan⁡(1/ε)y_\varepsilon = \arctan(x/\varepsilon) / \arctan(1/\varepsilon) give J(yε)→0J(y_\varepsilon) \to 0 as ε→0\varepsilon \to 0. But J(y)=0J(y) = 0 forces y′=0y' = 0 away from x=0x = 0, which is not possible with these end values. The equation gives x2y′=cx^2 y' = c, so y=−c/x+dy = -c/x + d, and no such curve is C1C^1 on [−1,1][-1, 1] and meets both end conditions. The theorem says nothing here, because it starts from a minimizer.

The C1C^1 hypothesis. Minimize ∫−11y2(1−y′)2 dx\int_{-1}^{1} y^2 (1 - y')^2\, dx with y(−1)=0y(-1) = 0, y(1)=1y(1) = 1. The curve that is 00 for x≤0x \le 0 and xx for x≥0x \ge 0 gives J=0J = 0, the smallest possible value, but it has a corner at x=0x = 0. No C1C^1 curve gives J=0J = 0, so the minimum over C1C^1 curves is not attained. For piecewise C1C^1 curves, the equation holds between corners, and the du Bois-Reymond form shows that Ly′L_{y'} is continuous across a corner (the first Weierstrass-Erdmann condition).

History

Johann Bernoulli posed the brachistochrone problem in 1696, and several solutions, all giving the cycloid, appeared in 1697. Euler derived the general equation in his book Methodus inveniendi of 1744, by replacing the curve with a polygon and letting the number of sides grow. In a letter to Euler of 12 August 1755, the young Lagrange gave a direct method: vary the whole curve by δy\delta y and integrate by parts. Euler adopted it and named the subject the calculus of variations. Legendre, Jacobi and Weierstrass later added the second-order conditions and the rigorous theory. Gelfand and Fomin (1963) and Liberzon (2012, Chapter 2) give modern treatments.

References

  1. I. M. Gelfand and S. V. Fomin, Calculus of Variations, Prentice-Hall, 1963 (Dover reprint, 2000), Chapter 1 (the simplest variational problem and Euler's equation)
  2. Daniel Liberzon, Calculus of Variations and Optimal Control Theory, A Concise Introduction, Princeton University Press, 2012, Section 2.3.1 (the Euler-Lagrange equation), Section 2.3.2 (historical remarks), Section 2.6.1 (the Legendre condition) and Section 3.1.1 (the Weierstrass-Erdmann corner conditions)
  3. Leonhard Euler, Methodus inveniendi lineas curvas maximi minimive proprietate gaudentes, Bousquet, Lausanne and Geneva, 1744

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/ES9AKE/text.yaml