2024-05-29
Funcational Analysis
00

Contents

§0 History
§1 Introduction: Stationary Values of Integrals
§1.1 A Little Basic Calculus
§2 Euler-Lagrange Equations
§3 Classical Examples and Basic Theorems
§3.1 An “Ignorable Coordinate”
§3.2 The Same Problem from Another Reference Point
§4 Extension to Several Variables and Hamilton's Principle
§4.1 Hamilton's Principle
§5 Further Examples in Physics and Geometry
§5.1 More Geodesics
§6 Generalization to Several Independent Variables and Higher-Order Derivatives
§6.1 Several Independent Variables
§6.2 Higher-Order Derivatives
§7 Extremals with Integral Constraints
A Freely Hanging Chain—the Catenary
Dido's Problem
Constraints and Prices Revisited
§8 Application to Sturm-Liouville Equations
§8.1 Motivation from Quantum Mechanics
§8.2 Sturm-Liouville Equations
§8.3 Examples
§8.4 Eigenfunction Expansions
§8.5 The Rayleigh-Ritz Approximation Method

§0 History

The calculus of variations may be said to have begun with Newton's problem of minimal resistance, proposed in 1687, followed by the brachistochrone problem proposed by Johann Bernoulli in 1696. The subject immediately attracted the attention of Jacob Bernoulli and Marquis de l'Hôpital, but it was Leonhard Euler who began to develop it systematically in 1733. Lagrange, influenced by Euler's work, made major contributions to the theory. After Euler saw the work published in 1755 by the nineteen-year-old Lagrange, he abandoned part of his own geometric approach in favor of Lagrange's purely analytic method and renamed the subject in his 1756 lectures Elementa Calculi Variationum.

Legendre proposed a method in 1786 for distinguishing maxima from minima, although it was not entirely satisfactory. Isaac Newton and Gottfried Leibniz had also given some early attention to the subject. Other contributors included Vincenzo Brunacci (1810), Carl Friedrich Gauss (1829), Siméon Poisson (1831), Mikhail Ostrogradsky (1834), and Carl Jacobi (1837). An important work by Sarrus (1842) was simplified and improved by Cauchy (1844). Other significant papers and treatises include those of Strauch (1849), Jellett (1850), Otto Hesse (1857), Alfred Clebsch (1858), and Lewis Buffett Carll (1885), but perhaps the most important work of the century was that of Weierstrass. His celebrated course on the theory was epoch-making, and he may be regarded as the first person to place the calculus of variations on a firm and indisputable foundation. Hilbert's 20th and 23rd problems, published in 1900, further stimulated the development of the subject.

In the twentieth century, David Hilbert, Oskar Bolza, Gilbert Ames Bliss, Emmy Noether, Leonida Tonelli, Henri Lebesgue, and Jacques Hadamard all made important contributions to the calculus of variations. Marston Morse applied variational methods to what is now known as Morse theory. Lev Pontryagin, Ralph Rockafellar, and F. H. Clarke developed new mathematical tools in optimal control theory. Richard Bellman's dynamic programming provides an alternative approach to the calculus of variations.

§1 Introduction: Stationary Values of Integrals

First, let us recall the basic principle from calculus for finding maxima and minima of functions of one variable:

Principle (a maximum is a stationary point). Let f(x)f(x) be a “good” function. Then a maximum or minimum of ff occurs where

f(x)=0.f^{\prime}(x)=0.

Here “good” means continuously differentiable. In this article we will not carefully distinguish every possible exceptional case. We will usually assume that the functions under consideration are sufficiently smooth that differentiability causes no difficulty.

The calculus of variations is a collection of techniques in which, instead of looking for maxima or minima of a function of one variable, we look for extrema of a functional—a function of functions. That is, we choose a function so as to minimize some quantity. Problems of this kind occur frequently in physics.

Example 1 (Shortest Path Between Two Points) Given two points

(x1,y1)and(x2,y2)(x_1,y_1) \quad\text{and}\quad (x_2,y_2)

in two-dimensional space, what is the shortest path between them?

By rotating the plane, which does not change the distance between the two points, we may assume

y1=y2.y_1=y_2.

Let us imagine that the path is described by a suitable “good,” continuously differentiable function y(x)y(x). Then the length of the path is

I[y]=x1x21+y(x)2dx.I[y]=\int_{x_1}^{x_2}\sqrt{1+y^{\prime}(x)^2}\mathrm{d}x.

The only constraint on y(x)y(x) is

y(x1)=y(x2)=y1.y(x_1)=y(x_2)=y_1.

Since

y(x)20,y^{\prime}(x)^2\geqslant0,

we can see that the integral is minimized when

y(x)=0,y^{\prime}(x)=0,

and hence the straight-line path minimizes the distance.

Intuitively, any path can be approximated arbitrarily well by smooth paths, so considering only smooth paths is sufficient. This is not the main point here, because throughout this article we will often assume, without rigorous justification, that we may restrict ourselves to sufficiently good functions.

Notice that we have derived a local rule about what happens at a point from a global criterion involving variations among all possible paths. This is the basic idea of the calculus of variations. We will generalize it considerably and apply it to a wide variety of problems.

One of the simplest ideas in physics is that light travels in straight lines. This idea becomes much more powerful when expressed as follows: light travels in straight lines because a straight-line segment is the shortest distance between two points. This may sound like a trivial restatement, but it remains one of the basic ideas underlying Einstein's general relativity and is closely connected with the modern quantum-electrodynamic understanding of light, so it should be taken seriously.

Example 2 (The Biathlon Problem) A group of athletes travel from point AA to point BB. They must first cross a field, running at speed c1c_1, and then cross a river, swimming at speed c2c_2. Which path from AA to BB takes the least time?

Clearly, the athlete should run in a straight line from AA to some point PP on the riverbank and then swim in a straight line from PP to BB, because straight lines minimize distance.

If c1c2c_1\geqslant c_2, consider the final point PP at which the athlete is still in the field. The fastest way to get from AA to PP is to run along a straight line. After that, the fastest way to reach BB is to swim along a straight line.

Let

A=(xA,yA),B=(xB,yB),P=(xP,yP).A=(x_A,y_A),\qquad B=(x_B,y_B),\qquad P=(x_P,y_P).

We want to choose yPy_P so that the total time is minimized. At the optimal value of yPy_P,

ddyP((xAxP)2+(yAyP)2c1+(xBxP)2+(yByP)2c2)=0.\frac{\mathrm{d}}{\mathrm{d}y_P} \left( \frac{\sqrt{(x_A-x_P)^2+(y_A-y_P)^2}}{c_1} + \frac{\sqrt{(x_B-x_P)^2+(y_B-y_P)^2}}{c_2} \right) =0.

Thus

(yAyP)c1(xAxP)2+(yAyP)2=(yByP)c2(xBxP)2+(yByP)2.\frac{(y_A-y_P)} {c_1\sqrt{(x_A-x_P)^2+(y_A-y_P)^2}} = \frac{(y_B-y_P)} {c_2\sqrt{(x_B-x_P)^2+(y_B-y_P)^2}}.

Therefore the optimal position of PP is such that the angles ψ1,ψ2\psi_1,\psi_2 satisfy

sinψ1c1=sinψ2c2.(1)\frac{\sin\psi_1}{c_1} = \frac{\sin\psi_2}{c_2}. \tag{1}

You may recognize (1) as Snell's law, which describes the refraction of light passing from one medium into another, provided that the refractive index of the medium is proportional to the inverse of the speed. Fermat observed that Snell's law follows from a principle of least time, although the principle was not understood from the perspective of quantum physics and relativity until the twentieth century.

We can now solve a slightly more general problem. Suppose someone runs through muddy terrain for x>0x>0, with speed proportional to c(x)c(x), where c(x)c(x) is some smooth function depending only on the xx-coordinate. Equivalently, we have an optical medium whose continuously varying refractive index is proportional to (c(x))1(c(x))^{-1}. What path gives the shortest travel time between two points?

We can think about the problem as follows. Divide the muddy region into strips of thickness δx\delta x, so that in the strip from xx to x+δxx+\delta x, the speed is treated as the constant c(x)c(x).

Repeatedly applying Snell's law (1), we obtain

sinψ(x)c(x) is constant along the path.(2)\frac{\sin\psi(x)}{c(x)} \text{ is constant along the path}. \tag{2}

Now take the limit

δx0.\delta x\to0.

The same law remains valid.

§1.1 A Little Basic Calculus

The angle ψ=ψ(x)\psi=\psi(x) between the path and the xx-axis satisfies

tanψ=dydx=y.\tan\psi = \frac{\mathrm{d}y}{\mathrm{d}x} = y^{\prime}.

We also have the definition of arc length

ds2=dx2+dy2.\mathrm{d}s^2 = \mathrm{d}x^2+\mathrm{d}y^2.

Putting these together,

sinψ=y1+y2=dyds,cosψ=11+y2=dxds.\sin\psi = \frac{y^{\prime}} {\sqrt{1+y^{\prime2}}} = \frac{\mathrm{d}y}{\mathrm{d}s}, \quad \cos\psi = \frac{1}{\sqrt{1+y^{\prime2}}} = \frac{\mathrm{d}x}{\mathrm{d}s}. \tag*{}

From this we can also derive

κ=dψds=y(1+y2)3/2,\kappa = \frac{\mathrm{d}\psi}{\mathrm{d}s} = \frac{y^{\prime\prime}} {(1+y^{\prime2})^{3/2}},

where κ\kappa is the curvature of the path, defined in a way that is invariant under rotations of the coordinate axes.

Example 3 (Shortest Paths on a “Muddy Field”) As a particularly interesting example, take the case where c(x)c(x) is linear in xx. In fact, suppose

c(x)=x.c(x)=x.

Then

sinψ(x)x=constant.(3)\frac{\sin\psi(x)}{x} = \text{constant}. \tag{3}

Thus Snell's law can be reformulated as the statement that y=y(x)y=y(x) is a solution of

y1+y2=Ax.(4)\frac{y^{\prime}} {\sqrt{1+y^{\prime2}}} = Ax. \tag{4}

If A=0A=0, this gives the line

y=constant.y=\text{constant}.

For A0A\neq0, we obtain

x2+(yy0)2=A2.(5)x^2+(y-y_0)^2 = A^{-2}. \tag{5}

That is, the solutions form a family of circles whose centers lie on x=0x=0.

This completely solves the problem of finding the shortest-time path for a runner between any two points in the region. We will return to this beautiful geometric fact later.

Clearly, we could now consider the more general problem in which

c=c(x,y).c=c(x,y).

Instead, we will change our point of view and reformulate the problem in more general terms.

We regard the time required to traverse a path as a functional of that path. That is, it is a function on a space of possible paths, and the possible paths themselves are functions.

More specifically, in the problem we have been considering, define a functional I[y]I[y] on functions y=y(x)y=y(x) by

I[y]=ab1+y(x)2c(x)dx.(6)I[y] = \int_a^b \frac{\sqrt{1+y^{\prime}(x)^2}}{c(x)} \mathrm{d}x. \tag{6}

We then seek a minimum of I[y]I[y] as y(x)y(x) ranges over all possible paths. A function y(x)y(x) at which such a minimum is attained is called an extremal.

In this case, it is clear that we are looking for a minimum of the integral, but this is too restrictive in general. We therefore use the term stationary value. This will mean, in a sense still to be defined, that the first derivative of I[y]I[y] vanishes. This allows several possibilities: a minimum, a maximum, something analogous to a saddle point, or more complicated cases in which higher derivatives also vanish.

We now regard this as a special case of the more general problem of finding stationary values of the functional

I[y]=abF(x,y(x),y(x))dx.(7)I[y] = \int_a^b F(x,y(x),y^{\prime}(x)) \mathrm{d}x. \tag{7}

Here

F(x1,x2,x3)F(x_1,x_2,x_3)

is a specified function.

For simplicity, we write

I[y]=abF(x,y,y)dx.I[y] = \int_a^b F(x,y,y^{\prime}) \mathrm{d}x.

The remarkable discovery, due in principle to Euler and Lagrange, is that there is a single method for treating all such problems. The method can also be generalized further, to multiple dimensions, higher derivatives, and constraints.

Even more remarkably, problems that look nothing like least-time problems can be reformulated in this way. The trajectories of dynamical systems can be regarded as solutions of stationary-value problems—not problems of shortest distance or least time, but of least action, as we will explain.

This is an extremely useful description of physical problems, partly because the notion of a stationary value does not depend on the coordinates used to describe it.

Modern theoretical physics is rooted in the idea of stationary values of functionals of fields. The present Standard Model of particles and forces is defined by writing down a principle of least action, as are string and superstring theories.

Thus part of the motivation for the calculus of variations comes from the deepest properties of the physical world, properties revealed only through the transformative power of creative mathematics.

§2 Euler-Lagrange Equations

We now consider, in general, the problem of finding a function y(x)y(x) that gives a stationary value of the functional

I[y]=abF(x,y(x),y(x))dx.(8)I[y] = \int_a^b F(x,y(x),y^{\prime}(x)) \mathrm{d}x. \tag{8}

When proving Picard's theorem in Differential Equations 1, we sometimes regarded FF as a function of three independent variables x,u,vx,u,v, and sometimes, after substituting

u=y(x),v=y(x),u=y(x), \qquad v=y^{\prime}(x),

regarded it simply as a function of xx.

For example, the chain rule gives

ddxF(x,y(x),y(x))=Fx+Fydydx+Fyd2ydx2=Fx+yFy+yFy.(9)\frac{\mathrm{d}}{\mathrm{d}x} F(x,y(x),y^{\prime}(x)) = \frac{\partial F}{\partial x} + \frac{\partial F}{\partial y} \frac{\mathrm{d}y}{\mathrm{d}x} + \frac{\partial F}{\partial y^{\prime}} \frac{\mathrm{d}^2y}{\mathrm{d}x^2} = \frac{\partial F}{\partial x} + y^{\prime} \frac{\partial F}{\partial y} + y^{\prime\prime} \frac{\partial F}{\partial y^{\prime}}. \tag{9}

Here

Fy\frac{\partial F}{\partial y^{\prime}}

means the partial derivative of F(x,u,v)F(x,u,v) with respect to its third variable vv, evaluated at

u=y(x),v=y(x).u=y(x), \qquad v=y^{\prime}(x).

From a completely rigorous point of view, we would need to specify the exact class of functions y(x)y(x) on which the functional is to have a stationary value: differentiable functions, functions with continuously differentiable derivatives, functions differentiable to all orders, and so on.

We would also need some notion of what it means to change a function to a “nearby” function, by putting a metric, or at least a topology, on the class of functions.

In this article we assume that all functions are sufficiently differentiable for the problem at hand.

We generally state results for smooth, infinitely differentiable functions, because most situations arising in the real world are smooth, or can be approximated arbitrarily well by smooth functions.

To justify this approach, we use bump functions.

Lemma 2.1 (Bump Function) There exists a function B(x)B(x) with the following properties:

(1) B(x)B(x) is infinitely differentiable;

(2) B(x)=0B(x)=0 unless

x[0,1];x\in[0,1];

(3)

0<B(x)10<B(x)\leqslant1

if

x(0,1).x\in(0,1).

Proof: Let

B(x)={0,x0,exp(x1(1x)1),0<x<1,0,x1.B(x) = \left\{ \begin{aligned} &0,&&x\leqslant0,\\ &\exp(-x^{-1}(1-x)^{-1}),&&0<x<1,\\ &0,&&x\geqslant1. \end{aligned} \right.

Then for every nn,

B(n)(x)0B^{(n)}(x)\to0

as

x0orx1,x\downarrow0 \quad\text{or}\quad x\uparrow1,

because exponential decay dominates polynomial growth.

Thus ff is infinitely differentiable at 00 and 11, and hence everywhere.

Clearly,

0B(x)1,0\leqslant B(x)\leqslant1,

and

B(x)>0B(x)>0

if and only if

x(0,1).x\in(0,1).
 ~\tag*{$\square$}

By considering

B(xaba),B\left(\frac{x-a}{b-a}\right),

we can define a bump function on any interval [a,b][a,b].

By rescaling, we may also assume that it takes the value 11 at the midpoint, where it attains its maximum. This will sometimes be convenient.

Thus a function can always be varied inside any interval, by adding a bump function, without affecting its differentiability, and the precise degree of differentiability being discussed is not important.

Lemma 2.2 (Test Function Lemma I) Let y(x)y(x) be continuous on [a,b][a,b] and suppose

aby(x)η(x)dx=0(10)\int_a^b y(x)\eta(x)\mathrm{d}x = 0 \tag{10}

for every smooth function η(x)\eta(x) satisfying

η(a)=η(b)=0.\eta(a)=\eta(b)=0.

Then

y(x)=0y(x)=0

for every

x[a,b].x\in[a,b].

Proof: Suppose, for contradiction, that for some

x0(a,b),x_0\in(a,b),
y(x0)0.y(x_0)\neq0.

Without loss of generality, suppose

y(x0)>0.y(x_0)>0.

Then there must be some interval [c,d][c,d] containing x0x_0, with

a<c<d<b,a<c<d<b,

such that

y(x)>0y(x)>0

throughout [c,d][c,d], since yy is continuous.

Now choose a bump function b(x)b(x) supported on [c,d][c,d].

By assumption,

aby(x)b(x)dx=0.\int_a^b y(x)b(x)\mathrm{d}x = 0.

Since

b(x)=0b(x)=0

unless

x[c,d],x\in[c,d],

this means

cdy(x)b(x)dx=0.\int_c^d y(x)b(x)\mathrm{d}x = 0.

But this is impossible, because

y(x)b(x)y(x)b(x)

is positive and continuous on this interval.

This contradiction shows that

y(x)=0y(x)=0

on [a,b][a,b].

 ~\tag*{$\square$}

A small variation of this theorem is the following.

Lemma 2.3 (Test Function Lemma II) Let y(x)y(x) be continuous on [a,b][a,b], and let c1,c2c_1,c_2 be constants such that, for every smooth function η(x)\eta(x),

c1η(a)+c2η(b)+aby(x)η(x)dx=0.(11)c_1\eta(a) + c_2\eta(b) + \int_a^b y(x)\eta(x)\mathrm{d}x = 0. \tag{11}

Then

c1=c2=0c_1=c_2=0

and

y(x)=0y(x)=0

for all

x[a,b].x\in[a,b].

Proof: Suppose first that

c10.c_1\neq0.

Without loss of generality, assume

c1>0.c_1>0.

Let η(x)\eta(x) be a bump function on

[aϵ,a+ϵ],[a-\epsilon,a+\epsilon],

so that

η(a)=1,\eta(a)=1,
η(x)=0\eta(x)=0

for

x>a+ϵ,x>a+\epsilon,

and

η(x)[0,1].\eta(x)\in[0,1].

For sufficiently small ϵ\epsilon,

0=c1η(a)+c2η(b)+aby(x)η(x)dxc10a+ϵy(x)dx>0.0 = c_1\eta(a) + c_2\eta(b) + \int_a^b y(x)\eta(x)\mathrm{d}x \geqslant c_1 - \int_0^{a+\epsilon} |y(x)|\mathrm{d}x > 0.

This is a contradiction.

Therefore,

c1=0.c_1=0.

The same argument gives

c2=0.c_2=0.

Then Lemma 2.2 gives

y(x)=0,y(x)=0,

as required.

 ~\tag*{$\square$}

We now begin the analysis of stationary values of the functional I[y]I[y].

We might be tempted to try to vary I[y]I[y] using some infinitesimal function δ(x)\delta(x), but there are infinitely many possible functions, which would create many difficulties.

Instead, to avoid worrying about all these possibilities at once, we focus on a single one-dimensional family of variations.

Fix a function η(x)\eta(x) and consider

y(x)+αη(x),(12)y(x)+\alpha\eta(x), \tag{12}

where α\alpha is a real parameter.

This allows us to consider

I[y+αη]=abF(x,y+αη,y+αη)dx.(13)I[y+\alpha\eta] = \int_a^b F(x,y+\alpha\eta,y^{\prime}+\alpha\eta^{\prime}) \mathrm{d}x. \tag{13}

In particular, we have the following lemma.

Lemma 2.4 (A Minimum Gives a Stationary Value) Let y(x)y(x) give a minimum of I[y]I[y], and let η(x)\eta(x) be a smooth function. Then

ddαI[y+αη]α=0.(14)\left. \frac{\mathrm{d}}{\mathrm{d}\alpha} I[y+\alpha\eta] \right|_{\alpha=0}. \tag{14}

Proof: This is really just another form of the standard minimum criterion from elementary calculus.

If y(x)y(x) gives a minimum of II, then for all α\alpha in a neighborhood of zero,

I[y+αη]I[y].I[y+\alpha\eta] \geqslant I[y].

Thus

f(α)=I[y+αη]f(\alpha) = I[y+\alpha\eta]

has a minimum at

α=0.\alpha=0.

Therefore

f(0)=0,f^{\prime}(0)=0,

which is precisely the statement of the lemma.

 ~\tag*{$\square$}

Lemma 2.5 (A Constrained Minimum Gives a Stationary Value) Let y(x)y(x) give a minimum of I[y]I[y] subject to

y(a)=c1,y(b)=c2,y(a)=c_1, \qquad y(b)=c_2,

and let η(x)\eta(x) be a smooth function satisfying

η(a)=η(b)=0.\eta(a)=\eta(b)=0.

Then

ddαI[y+αη]α=0=0.\left. \frac{\mathrm{d}}{\mathrm{d}\alpha} I[y+\alpha\eta] \right|_{\alpha=0} = 0.

Proof: The proof is the same as before. Observe that if

η(a)=η(b)=0,\eta(a)=\eta(b)=0,

then

y+αηy+\alpha\eta

still satisfies

y(a)=c1,y(b)=c2.y(a)=c_1, \qquad y(b)=c_2.
 ~\tag*{$\square$}

Theorem 2.6 (Euler-Lagrange Equation with Natural Boundary Conditions) Let

I[y]:=abF(x,y,y)dxI[y] := \int_a^b F(x,y,y^{\prime}) \mathrm{d}x

for some smooth function FF.

Then a minimizing function y(x)y(x) satisfies

ddxFyFy=0(15)\frac{\mathrm{d}}{\mathrm{d}x} \frac{\partial F}{\partial y^{\prime}} - \frac{\partial F}{\partial y} = 0 \tag{15}

and

Fyx=a=Fyx=b=0.(16)\left. \frac{\partial F}{\partial y^{\prime}} \right|_{x=a} = \left. \frac{\partial F}{\partial y^{\prime}} \right|_{x=b} = 0. \tag{16}

Proof: Let

y=y(x)y=y(x)

minimize I[y]I[y], and let

η=η(x)\eta=\eta(x)

be a smooth function.

By Lemma 2.4,

ddαI[y+αη]α=0=0.\left. \frac{\mathrm{d}}{\mathrm{d}\alpha} I[y+\alpha\eta] \right|_{\alpha=0} = 0.

Applying the chain rule,

ddαI[y+αη]α=0=ab(η(x)yF(x,y,y)+η(x)yF(x,y,y))dx.\left. \frac{\mathrm{d}}{\mathrm{d}\alpha} I[y+\alpha\eta] \right|_{\alpha=0} = \int_a^b \left( \eta(x)\frac{\partial}{\partial y}F(x,y,y^{\prime}) + \eta^{\prime}(x) \frac{\partial}{\partial y^{\prime}} F(x,y,y^{\prime}) \right) \mathrm{d}x.

Here, by

yF(x,y,y),\frac{\partial}{\partial y^{\prime}} F(x,y,y^{\prime}),

we mean

F3(x,y,y),F_3(x,y,y^{\prime}),

where

F3(x,y,z)=zF(x,y,z).F_3(x,y,z) = \frac{\partial}{\partial z}F(x,y,z).

The next key step is integration by parts, which removes η(x)\eta^{\prime}(x).

First observe that

ddx(ηyF(x,y,y))=ηyF(x,y,y)+ηddxyF(x,y,y).\frac{\mathrm{d}}{\mathrm{d}x} \left( \eta \frac{\partial}{\partial y^{\prime}} F(x,y,y^{\prime}) \right) = \eta^{\prime} \frac{\partial}{\partial y^{\prime}} F(x,y,y^{\prime}) + \eta \frac{\mathrm{d}}{\mathrm{d}x} \frac{\partial}{\partial y^{\prime}} F(x,y,y^{\prime}).

Hence

abη(x)yF(x,y,y)dx=[ηyF(x,y,y)]ababη(x)ddxyF(x,y,y)dx.\int_a^b \eta^{\prime}(x) \frac{\partial}{\partial y^{\prime}} F(x,y,y^{\prime}) \mathrm{d}x = \left[ \eta \frac{\partial}{\partial y^{\prime}} F(x,y,y^{\prime}) \right]_a^b - \int_a^b \eta(x) \frac{\mathrm{d}}{\mathrm{d}x} \frac{\partial}{\partial y^{\prime}} F(x,y,y^{\prime}) \mathrm{d}x.

Here

ddx\frac{\mathrm{d}}{\mathrm{d}x}

denotes the total derivative, acting on every explicit or implicit appearance of xx, including those through yy and yy^{\prime}.

Therefore,

ddαI[y+αη]α=0=[ηFy]ab+abη(x)(FyddxFy)dx.\left. \frac{\mathrm{d}}{\mathrm{d}\alpha} I[y+\alpha\eta] \right|_{\alpha=0} = \left[ \eta \frac{\partial F}{\partial y^{\prime}} \right]_a^b + \int_a^b \eta(x) \left( \frac{\partial F}{\partial y} - \frac{\mathrm{d}}{\mathrm{d}x} \frac{\partial F}{\partial y^{\prime}} \right) \mathrm{d}x.

For yy to be an extremal, the left-hand side must vanish for every choice of η\eta.

Hence the right-hand side must vanish for every η(x)\eta(x).

By Lemma 2.3, this implies

ddxFyFy=0\frac{\mathrm{d}}{\mathrm{d}x} \frac{\partial F}{\partial y^{\prime}} - \frac{\partial F}{\partial y} = 0

and

yFx=a=yFx=b=0,\left. \frac{\partial}{\partial y^{\prime}}F \right|_{x=a} = \left. \frac{\partial}{\partial y^{\prime}}F \right|_{x=b} = 0,

as required.

 ~\tag*{$\square$}

Theorem 2.7 (Euler-Lagrange Equation with Fixed Endpoint Boundary Conditions) Let

I[y]:=abF(x,y,y)dxI[y] := \int_a^b F(x,y,y^{\prime}) \mathrm{d}x

for some smooth function FF.

If y(x)y(x) minimizes II subject to

y(a)=c1,y(b)=c2,y(a)=c_1, \qquad y(b)=c_2,

then

ddxFyFy=0.(17)\frac{\mathrm{d}}{\mathrm{d}x} \frac{\partial F}{\partial y^{\prime}} - \frac{\partial F}{\partial y} = 0. \tag{17}

Proof: The proof is essentially the same as before.

By Lemma 2.5, we consider only functions η\eta satisfying

η(a)=η(b)=0.\eta(a)=\eta(b)=0.

For all such functions,

0=ddαI[y+αη]α=0=[ηFy]ab+abη(x)(FyddxFy)dx=abη(x)(FyddxFy)dx.\begin{aligned} 0 = \left. \frac{\mathrm{d}}{\mathrm{d}\alpha} I[y+\alpha\eta] \right|_{\alpha=0} &= \left[ \eta \frac{\partial F}{\partial y^{\prime}} \right]_a^b + \int_a^b \eta(x) \left( \frac{\partial F}{\partial y} - \frac{\mathrm{d}}{\mathrm{d}x} \frac{\partial F}{\partial y^{\prime}} \right) \mathrm{d}x\\ &= \int_a^b \eta(x) \left( \frac{\partial F}{\partial y} - \frac{\mathrm{d}}{\mathrm{d}x} \frac{\partial F}{\partial y^{\prime}} \right) \mathrm{d}x. \end{aligned}

The term

[ηFy]ab\left[ \eta \frac{\partial F}{\partial y^{\prime}} \right]_a^b

vanishes because

η(a)=η(b)=0.\eta(a)=\eta(b)=0.

By Lemma 2.2,

ddxFyFy=0,\frac{\mathrm{d}}{\mathrm{d}x} \frac{\partial F}{\partial y^{\prime}} - \frac{\partial F}{\partial y} = 0,

as required.

 ~\tag*{$\square$}

Note that finding an extremal or stationary value is not the same thing as finding a maximum or minimum.

Additional information is needed to determine whether an extremal is a local maximum, a local minimum, or neither.

However, maxima and minima must be extremals.

§3 Classical Examples and Basic Theorems

We now return to the first two examples from the point of view of the Euler-Lagrange equation.

Example 4 (Shortest Distance in the Euclidean Plane) Minimizing the distance of a path y=y(x)y=y(x) between

(x1,y1)and(x2,y2)(x_1,y_1) \quad\text{and}\quad (x_2,y_2)

is equivalent to minimizing

I[y]=abF(x,y,y)dx,I[y] = \int_a^b F(x,y,y^{\prime}) \mathrm{d}x,

subject to

y(x1)=y1,y(x2)=y2,y(x_1)=y_1, \qquad y(x_2)=y_2,

where

F(x,y,y)=1+y2.(18)F(x,y,y^{\prime}) = \sqrt{1+y^{\prime2}}. \tag{18}

Since

Fy=0,\frac{\partial F}{\partial y} = 0,

the Euler-Lagrange equation becomes

ddxFy=ddxy1+y2=0.(19)\frac{\mathrm{d}}{\mathrm{d}x} \frac{\partial F}{\partial y^{\prime}} = \frac{\mathrm{d}}{\mathrm{d}x} \frac{y^{\prime}} {\sqrt{1+y^{\prime2}}} = 0. \tag{19}

Since

y1+y2\frac{y^{\prime}} {\sqrt{1+y^{\prime2}}}

is constant, yy^{\prime} is constant, and therefore the solution is a straight line.

Example 5 (Shortest Path on the “Muddy Field”) Next, we verify that the paths in the muddy-field problem of §1 are circles.

We take

F(x,y,y)=1+y2x.(20)F(x,y,y^{\prime}) = \frac{\sqrt{1+y^{\prime2}}}{x}. \tag{20}

The Euler-Lagrange equation is

ddxFy=ddxyx1+y2=Fy=0.(21)\frac{\mathrm{d}}{\mathrm{d}x} \frac{\partial F}{\partial y^{\prime}} = \frac{\mathrm{d}}{\mathrm{d}x} \frac{y^{\prime}} {x\sqrt{1+y^{\prime2}}} = \frac{\partial F}{\partial y} = 0. \tag{21}

Integrating,

yx1+y2=c.(22)\frac{y^{\prime}} {x\sqrt{1+y^{\prime2}}} = c. \tag{22}

This is the same equation as (4), which we derived from the generalized Snell's law.

To remind you, the solutions are circles whose centers lie on the yy-axis.

Again, one should also consider both fixed-point and natural boundary conditions. You can check that these make the solutions meaningful.

§3.1 An “Ignorable Coordinate”

You should pay particular attention to the way these problems reduce from second-order ODEs to first-order ODEs.

The reason is that the particular function

F(x,y,y)F(x,y,y^{\prime})

does not depend explicitly on yy:

Fy=0.\frac{\partial F}{\partial y}=0.

This is extremely important, especially in applications to mathematical physics.

In this situation, the dependent variable yy is called ignorable.

We can state a general theorem.

Theorem 3.1 (A Special Case of the Euler-Lagrange Equation) Let

F(x1,x2,x3)F(x_1,x_2,x_3)

be a smooth function such that

x2F(x1,x2,x3)=0.\frac{\partial}{\partial x_2} F(x_1,x_2,x_3) = 0.

Let y=y(x)y=y(x) be a minimizer of the functional

I[y]:=abF(x,y,y)dx.I[y] := \int_a^b F(x,y,y^{\prime}) \mathrm{d}x.

Then

yF(x,y,y)\frac{\partial}{\partial y^{\prime}} F(x,y,y^{\prime})

is constant.

§3.2 The Same Problem from Another Reference Point

Suppose instead that we consider stationary values of the functional I[y]I[y] with

F(x,y,y)=1+y2y.(23)F(x,y,y^{\prime}) = \frac{\sqrt{1+y^{\prime2}}}{y}. \tag{23}

The geometric interpretation immediately tells us that the extremals must be circles whose centers lie on the xx-axis.

However, this is not obvious from the Euler-Lagrange equation

ddx(yy1+y2)+1+y2y2=0,(24)\frac{\mathrm{d}}{\mathrm{d}x} \left( \frac{y^{\prime}} {y\sqrt{1+y^{\prime2}}} \right) + \frac{\sqrt{1+y^{\prime2}}}{y^2} = 0, \tag{24}

which appears to be a complicated second-order ODE.

The key is to notice that when FF does not depend explicitly on xx, a more general result is available: Beltrami's identity.

This is also extremely important.

Theorem 3.2 (Bletrami's Identity) Let

F(x1,x2,x3)F(x_1,x_2,x_3)

be a smooth function such that

x1F(x1,x2,x3)=0.\frac{\partial}{\partial x_1} F(x_1,x_2,x_3) = 0.

Let y=y(x)y=y(x) be an extremal of

I[y]=abF(x,y,y)dx.I[y] = \int_a^b F(x,y,y^{\prime}) \mathrm{d}x.

Then

ddx(yFyF)=0.(25)\frac{\mathrm{d}}{\mathrm{d}x} \left( y^{\prime} \frac{\partial F}{\partial y^{\prime}} - F \right) = 0. \tag{25}

That is,

H=yFyF=constant.(26)H = y^{\prime} \frac{\partial F}{\partial y^{\prime}} - F = \text{constant}. \tag{26}

Proof: Since

F(x1,x2,x3)x1=0,\frac{\partial F(x_1,x_2,x_3)} {\partial x_1} = 0,

we have

ddxF(x,y,y)=0+yyF(x,y,y)+yyF(x,y,y).\frac{\mathrm{d}}{\mathrm{d}x} F(x,y,y^{\prime}) = 0 + y^{\prime} \frac{\partial}{\partial y} F(x,y,y^{\prime}) + y^{\prime\prime} \frac{\partial}{\partial y^{\prime}} F(x,y,y^{\prime}).

By the Euler-Lagrange equation, this is

yddxyF(x,y,y)+yyF(x,y,y)=ddx(yyF(x,y,y)).y^{\prime} \frac{\mathrm{d}}{\mathrm{d}x} \frac{\partial}{\partial y^{\prime}} F(x,y,y^{\prime}) + y^{\prime\prime} \frac{\partial}{\partial y^{\prime}} F(x,y,y^{\prime}) = \frac{\mathrm{d}}{\mathrm{d}x} \left( y^{\prime} \frac{\partial}{\partial y^{\prime}} F(x,y,y^{\prime}) \right).

This proves the result.

 ~\tag*{$\square$}

Alternative proof:

Although the preceding proof is easy, it does not explain why this first integral exists.

The following argument explains the reason: it is really just a special case of an ignorable coordinate.

We simply interchange the roles of xx and yy and regard the curve as a function

x(y)x(y)

rather than

y(x).y(x).

In the particular problem under consideration, this is obviously a very natural idea.

Write

x=dxdy,x^{\prime} = \frac{\mathrm{d}x}{\mathrm{d}y},

so that

y=(x)1.y^{\prime} = (x^{\prime})^{-1}.

The integral

abF(x,y,y)dx,y(a)=c,y(b)=d(27)\int_a^b F(x,y,y^{\prime}) \mathrm{d}x, \quad y(a)=c, \quad y(b)=d \tag{27}

becomes

cdF(x,y,(x)1)xdy,x(c)=a,x(d)=b.(28)\int_c^d F\left( x,y,(x^{\prime})^{-1} \right) x^{\prime} \mathrm{d}y, \quad x(c)=a, \quad x(d)=b. \tag{28}

Now xx is an ignorable coordinate, so the Euler-Lagrange equation becomes

x(F(x,y,(x)1)x)=constant.\frac{\partial}{\partial x^{\prime}} \left( F(x,y,(x^{\prime})^{-1}) x^{\prime} \right) = \text{constant}.

Taking the partial derivative carefully, remembering how expressions such as

yF(x,y,y)\frac{\partial}{\partial y^{\prime}} F(x,y,y^{\prime})

are properly defined, gives

(x)2F3(x,y,(x)1)x+F(x,y,(x)1)=constant.-(x^{\prime})^{-2} F_3\left( x,y,(x^{\prime})^{-1} \right)x^{\prime} + F\left( x,y,(x^{\prime})^{-1} \right) = \text{constant}.

Here

F3(x1,x2,x3)=F(x1,x2,x3)x3.F_3(x_1,x_2,x_3) = \frac{\partial F(x_1,x_2,x_3)} {\partial x_3}.

Therefore,

yF3(x,y,y)+F(x,y,y)=constant,-y^{\prime} F_3(x,y,y^{\prime}) + F(x,y,y^{\prime}) = \text{constant},

which is equivalent to Beltrami's identity.

 ~\tag*{$\square$}

Applied to the muddy-field problem, we obtain

H=1y1+y2=constant.(29)H = \frac{-1} {y\sqrt{1+y^{\prime2}}} = \text{constant}. \tag{29}

The remaining integration can then be carried out directly, yielding circular paths.

In this case, there is no solution satisfying the natural boundary conditions.

This agrees with the fact that the integral has neither a minimum nor a maximum between x=ax=a and x=bx=b.

It can take any positive value, and its infimum 00 is never attained.

We will return to this shortest-path problem, or more generally the problem of geodesics, in Lecture 5.

It turns out that the “muddy field” is actually a way of representing the central mathematical structure of the hyperbolic plane.

Example 6 (The Brachistochrone Problem) Find a curve along which a particle released from rest at some point reaches a given lower point, not directly beneath the starting point, in the shortest possible time.

We assume gravity is a constant force gg.

This is one of the most famous stationary-integral problems solved by Newton, J. Bernoulli, and others in the seventeenth century.

The answer is not intuitive.

Some first-year mechanics is needed to obtain the relevant function

F(x,y,y).F(x,y,y^{\prime}).

In this problem, we use xx for horizontal distance and yy for vertically downward distance.

This convention is chosen simply so that the motion can begin at the origin without introducing expressions such as

y.\sqrt{-y}.

Suppose the particle is released at

t=0t=0

from

(x,y)=(0,0),(x,y)=(0,0),

and then moves along the curve

y=y(x),y=y(x),

which reaches

(x,y)=(a,h),(x,y)=(a,h),

where hh is the vertical drop and aa the horizontal distance.

Using the initial conditions and conservation of energy, at every point on the curve,

E=12m(x˙2+y˙2)mgy=0.E = \frac12m(\dot{x}^2+\dot{y}^2) - mgy = 0.

Hence

x˙2=2gy1+y2,\dot{x}^2 = \frac{2gy} {1+y^{\prime2}},

where

y=dydx.y^{\prime} = \frac{\mathrm{d}y}{\mathrm{d}x}.

Therefore,

dt=12g1+y2ydx.\mathrm{d}t = \frac{1}{\sqrt{2g}} \frac{\sqrt{1+y^{\prime2}}} {\sqrt{y}} \mathrm{d}x.

Thus the total time TT is a functional of the curve y(x)y(x):

T[y]=12g0a1+y2ydx.(30)T[y] = \frac{1}{\sqrt{2g}} \int_0^a \frac{\sqrt{1+y^{\prime2}}} {\sqrt{y}} \mathrm{d}x. \tag{30}

We seek a curve y(x)y(x) minimizing T[y]T[y] subject to fixed endpoint conditions through

(0,0)and(a,h).(0,0) \quad\text{and}\quad (a,h).

Notice that this may also be interpreted as a muddy-field problem in which the speed is proportional to

y.\sqrt{y}.

We could easily derive the Euler-Lagrange equation, but it is more efficient to use Beltrami's identity, since

F(x,y,y)F(x,y,y^{\prime})

depends only on yy and yy^{\prime}.

This gives

y1+y2=2c(31)\sqrt{y} \sqrt{1+y^{\prime2}} = \sqrt{2c} \tag{31}

for some constant 2c2c.

To solve this equation, make the substitution

y=2csin2(ϕ/2).y = 2c\sin^2(\phi/2).

Then

dxdϕ=2csin2(ϕ/2)=c(1cosϕ).\frac{\mathrm{d}x}{\mathrm{d}\phi} = 2c\sin^2(\phi/2) = c(1-\cos\phi).

Thus, using the initial conditions,

x=c(ϕsinϕ),y=c(1cosϕ).(32)x = c(\phi-\sin\phi), \qquad y = c(1-\cos\phi). \tag{32}

This is a cycloid.

See the figures below:

The ratio a/ha/h determines the portion of the cycloid that solves the problem.

If

a/h=π/2,a/h=\pi/2,

then the cycloid extends all the way to its lowest point

ϕ=π,\phi=\pi,

where

c=a/π.c=a/\pi.

If

a/h<π/2,a/h<\pi/2,

then the solution is a smaller segment of a cycloid, with cc chosen appropriately, and so on.

A few further details are worth adding.

One finds that

ϕ˙\dot{\phi}

is constant, namely

g/c.\sqrt{g/c}.

Thus the time required to reach the point with parameter ϕ\phi is

c/gϕ.\sqrt{c/g}\,\phi.

Suppose the horizontal distance aa is given, and we seek the path that reaches this horizontal distance most quickly among all possible hh.

The time is

c/gϕ,\sqrt{c/g}\,\phi,

where cc is determined implicitly by

a=c(ϕsinϕ).a = c(\phi-\sin\phi).

Thus finding the fastest way to reach aa is equivalent to minimizing

ϕϕsinϕ.\frac{\phi} {\sqrt{\phi-\sin\phi}}.

It can be checked that this is minimized at

ϕ=π.\phi=\pi.

This verifies the result

y=0y^{\prime}=0

at

x=ax=a

obtained from the natural boundary condition.

It selects the cycloid that reaches its lowest point at x=ax=a, namely

ϕ=π.\phi=\pi.

Example 7 (Soap Film) Consider the surface obtained by rotating the curve

y=y(x)y=y(x)

about the xx-axis between

x=x1andx=x2.x=x_1 \quad\text{and}\quad x=x_2.

Which curve gives the minimum area?

The objective in this problem is to minimize an area, but because the surface is a surface of revolution, the problem reduces to finding a curve.

You can imagine this as a soap film suspended between two circular wire loops at

x1andx2,x_1 \quad\text{and}\quad x_2,

with the assumption that the film reaches equilibrium at the position of minimum area.

The functional A[y]A[y] to be minimized is

A[y]=2πx1x2y1+y2dx.(33)A[y] = 2\pi \int_{x_1}^{x_2} y\sqrt{1+y^{\prime2}} \,\mathrm{d}x. \tag{33}

The integrand has no explicit dependence on xx, so Beltrami's identity gives a first integral:

y1+y2=c.\frac{y} {\sqrt{1+y^{\prime2}}} = c.

Its solution is

y=ccosh(xx0c).(34)y = c\cosh \left( \frac{x-x_0}{c} \right). \tag{34}

Filling in the details and fitting the initial conditions is a somewhat tedious process and is left as an exercise.

The hyperbolic cosine curve appears again in another problem: finding the shape of a freely hanging chain.

Because of this connection, it is called a catenary.

The surface we have found is a catenoid, which plays an important role in the geometry of surfaces.

Example 8 (A Typical Second-Order Ordinary Differential Equation Problem) Suppose

F(x,y,y)=12y212y2+yf(x),y(0)=0=y(1).(35)F(x,y,y^{\prime}) = \frac12y^{\prime2} - \frac12y^2 + yf(x), \qquad y(0)=0=y(1). \tag{35}

Then

Fy=y,Fy=y+f,\frac{\partial F}{\partial y^{\prime}} = y^{\prime}, \qquad \frac{\partial F}{\partial y} = -y+f,

and the Euler-Lagrange equation is

y+yf(x)=0.(36)y^{\prime\prime} + y - f(x) = 0. \tag{36}

In this case, there is no ignorable coordinate or Beltrami identity to help us.

However, we recognize this second-order ODE as a type studied extensively in differential-equations courses, with boundary conditions that can be handled using a Green function.

We will not investigate the solution of this equation further here.

Instead, we are more interested in the reverse question:

can differential equations that we have encountered previously be reformulated as problems of finding extremals?

§4 Extension to Several Variables and Hamilton's Principle

In this section, we explore applications of the calculus of variations to classical mechanics.

First, we need a modest generalization to allow several dependent variables.

It is convenient to change notation, because in mechanical applications time is usually the single independent variable, while the dependent variables represent the spatial coordinates of the mechanical system.

Thus, instead of y(x)y(x) and

F(x,y,y),F(x,y,y^{\prime}),

we first consider

q(t)q(t)

and

F(t,q,q˙),F(t,q,\dot q),

where qq is a typical spatial coordinate and tt is time.

There is a reason for using qq rather than xx for the dependent variable.

We do not want to restrict ourselves to Cartesian coordinates, and the letter xx might misleadingly suggest that we are doing so.

The variable qq could be an angle, a radial distance, or something else.

We then generalize to

q1(t),q2(t),,qn(t)q_1(t),q_2(t),\ldots,q_n(t)

and

F(t,q1,,qn,q˙1,,q˙n).F( t, q_1,\ldots,q_n, \dot q_1,\ldots,\dot q_n ).

Thus we consider stationary values of the functional

I[q1,,qn]=abF(t,q1,,qn,q˙1,,q˙n)dt.(37)I[q_1,\ldots,q_n] = \int_a^b F( t, q_1,\ldots,q_n, \dot q_1,\ldots,\dot q_n ) \mathrm{d}t. \tag{37}

Theorem 4.1 Let FF be a smooth function and define

I[q1,,qn]:=abF(t,q1,,qn,q˙1,,q˙n)dt.I[q_1,\ldots,q_n] := \int_a^b F( t, q_1,\ldots,q_n, \dot q_1,\ldots,\dot q_n ) \mathrm{d}t.

Then minimizing functions

q1=q1(t),,qn=qn(t)q_1=q_1(t),\ldots,q_n=q_n(t)

satisfy

ddtFq˙iFqi=0,i=1,,n,(38)\frac{\mathrm{d}}{\mathrm{d}t} \frac{\partial F}{\partial\dot q_i} - \frac{\partial F}{\partial q_i} = 0, \qquad i=1,\ldots,n, \tag{38}

together with the natural boundary conditions

[Fq˙i]ab=0,i=1,,n.(39)\left[ \frac{\partial F}{\partial\dot q_i} \right]_a^b = 0, \qquad i=1,\ldots,n. \tag{39}

Subject to the constraints

qi(a)=c1,i,qi(b)=c2,i,q_i(a)=c_{1,i}, \qquad q_i(b)=c_{2,i},

the minimizing functions of II satisfy equation (37) above, but need not satisfy equation (38).

Sketch of proof:

The method for finding these minimizing functions is the same as in the simplest case.

Choose an index ii and a test function ηi\eta_i, temporarily fix qjq_j for

ji,j\neq i,

and vary only qiq_i:

qi(t)qi(t)+αηi(t).q_i(t) \rightarrow q_i(t)+\alpha\eta_i(t).

Since all qjq_j with

jij\neq i

are temporarily fixed, the functional II has exactly the form already considered.

The Euler-Lagrange equation gives

ddtFq˙iFqi=0,\frac{\mathrm{d}}{\mathrm{d}t} \frac{\partial F}{\partial\dot q_i} - \frac{\partial F}{\partial q_i} = 0,

and the natural boundary condition is

[ηiFq˙i]ab=0.\left[ \eta_i \frac{\partial F}{\partial\dot q_i} \right]_a^b = 0.

Repeating this procedure for each index ii gives the result.

 ~\tag*{$\square$}

There are two important special cases:

  1. If some variable qiq_i does not appear in FF, then it is an ignorable coordinate:
Fqi=0impliesFq˙i is constant.(40)\frac{\partial F}{\partial q_i} = 0 \quad\text{implies}\quad \frac{\partial F}{\partial\dot q_i} \text{ is constant}. \tag{40}
  1. If FF is independent of time tt, then there is a generalized form of Beltrami's identity:
Ft=0impliesH=i=1nq˙iFq˙iF is constant.(41)\frac{\partial F}{\partial t} = 0 \quad\text{implies}\quad H = \sum_{i=1}^n \dot q_i \frac{\partial F}{\partial\dot q_i} - F \text{ is constant}. \tag{41}

§4.1 Hamilton's Principle

The following statement summarizes why classical mechanics can be reformulated as an extremal problem and solved using the calculus of variations.

Definition 1. If there is no friction in a mechanical system and a constraint does no work, the constraint is called a workless constraint.

If a constraint has the form

ϕ(qi,t)=0,\phi(q_i,t)=0,

where the qiq_i are coordinates and the constraint does not involve the velocities q˙i\dot q_i, then the constraint is called a holonomic constraint.

If a force is the gradient of a potential function VV, it is called a conservative force.

Principle (Hamilton's Principle). If a mechanical system is subject only to holonomic workless constraints and all forces are conservative, then according to Newton's laws the motion of the system is an extremal of the integral

I[q]=L(qi,q˙i,t)dt,(42)I[q] = \int L(q_i,\dot q_i,t) \mathrm{d}t, \tag{42}

where the coordinates qiq_i are arbitrary but unconstrained and

L=TV,L=T-V,

that is, the kinetic energy of the system minus the potential energy, expressed in these coordinates.

LL is called the Lagrangian.

This is Hamilton's principle, also known as the principle of least action, and the integral

I[q]I[q]

is called the action.

In this article, we take this as known without proof, meaning that it correctly encodes the physical laws.

In a classical-mechanics course, one proves that it is equivalent to Newton's laws.

Notice that the dimension of I[q]I[q] is energy multiplied by time.

“Action” is the name given to a physical quantity with these dimensions.

It turns out to be one of the most fundamental physical quantities; in particular, Planck's constant is a quantum of action.

Example 9 (Motion in Free Space with No External Forces) The simplest example is

L=T=12m(x˙2+y˙2+z˙2).L = T = \frac12m \left( \dot{x}^2+\dot{y}^2+\dot{z}^2 \right).

The Euler-Lagrange equations are

x¨=y¨=z¨=0,(43)\ddot{x} = \ddot{y} = \ddot{z} = 0, \tag{43}

which are Newton's equations of motion for a free particle.

Example 10 (Motion in Free Space under a Conservative Force) The next simplest example is

L=TV=12m(x˙2+y˙2+z˙2)mψ(x,y,z),L = T-V = \frac12m \left( \dot{x}^2+\dot{y}^2+\dot{z}^2 \right) - m\psi(x,y,z),

describing motion in free space under a conservative force with potential ψ\psi, typically Newtonian gravity.

The Euler-Lagrange equations become

x¨=ψx,y¨=ψy,z¨=ψz.\ddot{x} = -\frac{\partial\psi}{\partial x}, \qquad \ddot{y} = -\frac{\partial\psi}{\partial y}, \qquad \ddot{z} = -\frac{\partial\psi}{\partial z}.

The value of the stationary-integral formulation often becomes more obvious after changing coordinates.

For orbital problems with

ψ=k/r,\psi=-k/r,

Cartesian coordinates x,y,zx,y,z work, but are not especially useful.

Since the form of the Lagrangian does not care which coordinates we use, spherical polar coordinates are more convenient.

Example 11 (Orbital Problem with Potential ψ=k/r\psi=-k/r) In polar coordinates

(r,ϕ,θ),(r,\phi,\theta),

for motion in free space with potential

ψ=k/r,\psi=-k/r,

we have

L=TV=12m(r˙2+r2θ˙2+r2sin2θϕ˙2)+kmr.L = T-V = \frac12m \left( \dot r^2 + r^2\dot\theta^2 + r^2\sin^2\theta\,\dot\phi^2 \right) + \frac{km}{r}.

The θ\theta equation is

ddt(r2θ˙)r2sinθcosθϕ˙2=0.\frac{\mathrm{d}}{\mathrm{d}t} \left( r^2\dot\theta \right) - r^2 \sin\theta \cos\theta \dot\phi^2 = 0.

One solution is

θπ/2,\theta\equiv\pi/2,

meaning that the path remains in the equatorial plane.

Restricting attention to such paths, the remaining equations become

r¨rϕ˙2+kr2=0,ddt(r2ϕ˙)=0.\begin{gathered} \ddot r-r\dot\phi^2+\frac{k}{r^2}=0,\\ \frac{\mathrm{d}}{\mathrm{d}t} \left( r^2\dot\phi \right) = 0. \end{gathered}

The same equations are derived by a longer argument in elementary dynamics.

Clearly, the ϕ\phi equation integrates to

r2ϕ˙=h.r^2\dot\phi = h.

It is extremely important to notice that the simplicity of this step follows directly from the fact that ϕ\phi never appears in LL.

It is an ignorable coordinate.

Conservation of angular momentum is therefore a direct consequence of an ignorable coordinate in the Lagrangian formulation of Hamilton's principle.

Conservation of energy can be derived just as easily.

It corresponds to Beltrami's identity.

Since LL has no explicit dependence on tt,

H=i=1nq˙iLq˙iL(44)H = \sum_{i=1}^n \dot q_i \frac{\partial L}{\partial\dot q_i} - L \tag{44}

is constant along the trajectory.

From the original form of LL, before restricting to equatorial trajectories, it is immediately clear that in this case

H=T+V,H=T+V,

the total energy.

For an equatorial orbit this reduces to

12(r˙2+r2ϕ˙2)kr=E.(45)\frac12 \left( \dot r^2+r^2\dot\phi^2 \right) - \frac{k}{r} = E. \tag{45}

Thus the entire problem is reduced to a single integration, yielding the familiar conic-section solutions.

The two simplification theorems we have used—ignorable coordinates and Beltrami's identity—point toward a profound feature of physical theories.

There is a direct relationship between symmetry, meaning invariance under a family of transformations, and conservation laws.

Independence of the angle ϕ\phi means that the action is invariant under

ϕϕ+α,\phi\rightarrow\phi+\alpha,

and this is equivalent to conservation of angular momentum.

When xx is ignorable, so that the action is invariant under

xx+α,x\rightarrow x+\alpha,

the momentum in the xx-direction is conserved.

When

tt+αt\rightarrow t+\alpha

is a symmetry, energy is conserved.

Notice that

angle ×\times angular momentum,

length ×\times momentum,

and time ×\times energy

all have the dimensions of action.

These conjugate relationships become crucial in quantum mechanics and form the basis of the famous Heisenberg uncertainty principle.

The Euler-Lagrange equations must retain the same form under coordinate transformations because the notion of stationarity does not depend on which coordinate system is used to describe the problem.

Technically, this means that we can write TT and VV in whatever coordinates we like, without having to carry out complicated chain-rule transformations of the equations.

We illustrate this simplicity with several examples.

§5 Further Examples in Physics and Geometry

So far, we have not made use of the new freedom provided by imposing holonomic constraints.

A typical problem studied in elementary dynamics is that of a particle moving smoothly on a surface of revolution, such as the paraboloid

az=x2+y2.az=x^2+y^2.

Let us derive the equations of motion from Hamilton's principle.

Example 12 (Motion on a Paraboloid) At any instant, the position of the particle may be written as

(azcosθ,azsinθ,z).(\sqrt{az}\cos\theta, \sqrt{az}\sin\theta, z).

In other words, we have used the holonomic constraint supplied by the smooth surface to eliminate one of the three spatial dimensions, reducing the problem to two dimensions.

Here we use

z,θz,\theta

as the two required generalized coordinates qiq_i, although in principle we could use any coordinates we like.

It is a good idea to choose the angle θ\theta as one of the two coordinates because then it becomes ignorable in LL, producing a simple first integral.

Specifically,

L=TV=12[(1+a4z)z˙2+azθ˙2]gz.L = T-V = \frac12 \left[ \left( 1+\frac{a}{4z} \right)\dot z^2 + az\dot\theta^2 \right] - gz.

The fact that θ\theta is ignorable implies

θ˙=h/z\dot\theta = h/z

for some constant hh.

Since LL has no explicit dependence on tt and is quadratic in the velocities, it follows that

T+VT+V

is conserved.

Thus all the results of the elementary treatment can be obtained immediately, without eliminating reaction forces by taking dot and cross products with vectors.

Example 13 (Particle on a Rotating Wire) A particle moves smoothly along a straight wire inclined at an angle β\beta to the vertical, while the wire rotates about the vertical axis with constant angular velocity ω\omega.

In elementary dynamics, starting directly from Newton's second law requires eliminating the normal reaction force by taking the dot product of Newton's second law with a vector tangent to the wire.

Using Hamilton's principle, we may ignore the normal reaction force and work directly with the Lagrangian

L=TV.L=T-V.

Relative to an inertial frame, the particle position is

x=(ztanβcosωt,ztanβsinωt,z).\mathbf{x} = ( z\tan\beta\cos\omega t, z\tan\beta\sin\omega t, z ).

The mass of the particle is irrelevant, so we may set it equal to 11.

The kinetic and potential energies are

T=12x˙2=12{(zωtanβ)2+(z˙secβ)2},V=gz.T = \frac12|\dot{\mathbf{x}}|^2 = \frac12 \left\{ (z\omega\tan\beta)^2 + (\dot z\sec\beta)^2 \right\}, \qquad V=gz.

There is only one generalized coordinate, zz, and therefore only one Euler-Lagrange equation.

It immediately gives the equation of motion

z¨ω2sin2βz=gcos2β.\ddot z - \omega^2\sin^2\beta\,z = -g\cos^2\beta.

This is exactly the equation required by the problem.

One must also ask whether

E=T+VE=T+V

is conserved.

In fact it is not.

A torque must be applied to keep the wire rotating at constant angular velocity ω\omega, and therefore work must be done.

The Lagrange method does better.

It constructs a conserved Hamiltonian HH, but this Hamiltonian is not equal to the total energy:

H=z˙Lz˙L=12{(z˙secβ)2(zωtanβ)2}+gz.H = \dot z \frac{\partial L}{\partial\dot z} - L = \frac12 \left\{ (\dot z\sec\beta)^2 - (z\omega\tan\beta)^2 \right\} + gz.

The Hamiltonian differs from T+VT+V because TT is not a homogeneous quadratic polynomial in the velocity.

The kinetic energy TT contains both a contribution involving z2z^2 and one involving z˙2\dot z^2.

We are now free to consider more general problems that would be difficult to solve using elementary dynamical methods.

Example 14 (Motion on a General Surface with No External Forces) Suppose a particle moves on a fairly general surface embedded in three-dimensional space.

In the discussion that follows, we assume that the particle always remains in contact with the surface and do not worry about how this can be physically enforced.

You can imagine a spacecraft whose outer surface consists of two layers, with the particle moving between them so that the normal reaction force can point either inward or outward.

Hamilton's principle immediately provides a Lagrangian for the motion: it is simply the kinetic energy TT constrained to the surface.

Suppose the surface is parametrized by

(u,v),(u,v),

so that a point is given by

x(u,v)=(x(u,v),y(u,v),z(u,v)).\mathbf{x}(u,v) = (x(u,v),y(u,v),z(u,v)).

Writing LL in the coordinates (u,v)(u,v) gives

L=T=m2(x˙2+y˙2+z˙2)=m2(E(u,v)u˙2+2F(u,v)u˙v˙+G(u,v)v˙2),L = T = \frac{m}{2} \left( \dot x^2+\dot y^2+\dot z^2 \right) = \frac{m}{2} \left( E(u,v)\dot u^2 + 2F(u,v)\dot u\dot v + G(u,v)\dot v^2 \right),

where

E(u,v)=xuxu,F(u,v)=xuxv,G(u,v)=xvxv.E(u,v) = \mathbf{x}_u\cdot\mathbf{x}_u, \qquad F(u,v) = \mathbf{x}_u\cdot\mathbf{x}_v, \qquad G(u,v) = \mathbf{x}_v\cdot\mathbf{x}_v.

We may now write the Euler-Lagrange equations and in principle determine the entire motion.

In general, the resulting second-order differential equations for uu and vv are not easy to solve.

The simplifying feature is that the path followed by the particle is a geodesic on the surface—a stationary value of arc length.

To prove this, first observe that a purely “kinetic-energy” Lagrangian, one quadratic in the velocities q˙i\dot q_i and with no explicit dependence on tt, has a special property.

By Beltrami's identity, the value of LL itself is constant along the motion.

The kinetic energy is also positive definite.

Suppose ff is some strictly increasing function on the positive real numbers, and consider the stationary-value problem for f(L)f(L).

The Euler-Lagrange equations are

ddtf(L)q˙if(L)qi=0,ddt(f(L)Lq˙i)f(L)Lqi=0,f(L)dLdtLq˙i+f(L)(ddtLq˙iLqi)=0.\begin{gathered} \frac{\mathrm{d}}{\mathrm{d}t} \frac{\partial f(L)}{\partial\dot q_i} - \frac{\partial f(L)}{\partial q_i} = 0,\\ \frac{\mathrm{d}}{\mathrm{d}t} \left( f^{\prime}(L) \frac{\partial L}{\partial\dot q_i} \right) - f^{\prime}(L) \frac{\partial L}{\partial q_i} = 0,\\ f^{\prime\prime}(L) \frac{\mathrm{d}L}{\mathrm{d}t} \frac{\partial L}{\partial\dot q_i} + f^{\prime}(L) \left( \frac{\mathrm{d}}{\mathrm{d}t} \frac{\partial L}{\partial\dot q_i} - \frac{\partial L}{\partial q_i} \right) = 0. \end{gathered}

Since

dLdt=0\frac{\mathrm{d}L}{\mathrm{d}t}=0

and

f(L)0,f^{\prime}(L)\neq0,

this reduces to the Euler-Lagrange equation for LL.

Taking

f(L)=Lf(L)=\sqrt L

shows that

E(u,v)u˙2+2F(u,v)u˙v˙+G(u,v)v˙2dt\int \sqrt{ E(u,v)\dot u^2 + 2F(u,v)\dot u\dot v + G(u,v)\dot v^2 } \,\mathrm{d}t

produces the same Euler-Lagrange equations.

But this is exactly the arc length of the trajectory on the surface, and arc length is stationary along geodesics.

If desired, we may eliminate the time variable tt and write the integral as

E(u,v)+2F(u,v)vu+G(u,v)vu2du,\int \sqrt{ E(u,v) + 2F(u,v)v_u + G(u,v)v_u^2 } \,\mathrm{d}u,

where

v=v(u)v=v(u)

is regarded as defining a curve on the surface.

This is exactly of the form studied earlier.

Thus, in the absence of external forces, a particle simply follows the shortest path compatible with the geometric constraint, at least in the sense of a local minimum.

In this case, least action coincides with shortest distance.

This is a generalization of Newton's second law.

§5.1 More Geodesics

Example 15 (Cylinder) Suppose the surface is the cylinder of radius 11 whose axis is the zz-axis.

Its parametrization is

x(u,v)=(cosu,sinu,v).\mathbf{x}(u,v) = (\cos u,\sin u,v).

We compute

xu=(sinu,cosu,0),xv=(0,0,1),\mathbf{x}_u = (-\sin u,\cos u,0), \qquad \mathbf{x}_v = (0,0,1),

so

E=G=1,F=0.E=G=1, \qquad F=0.

The Lagrangian is simply the kinetic energy:

L(u,v,u˙,v˙)=12(u˙2+v˙2).L(u,v,\dot u,\dot v) = \frac12 \left( \dot u^2+\dot v^2 \right).

Thus the geodesics satisfy

u¨=v¨=0.\ddot u = \ddot v = 0.

These are straight lines in the (u,v)(u,v) coordinate system.

The same conclusion can also be obtained by finding geodesics as curves of stationary arc length.

The method above gives

vuu=0,v_{uu}=0,

so the geodesics have the form

v=au+b.v=au+b.

Notice that paths on a cylinder clearly illustrate the difference between a local minimum of path length and a global minimum.

Why is the problem so simple?

The key is that although a cylinder is regarded as a surface in R3\mathbb{R}^3, it is intrinsically flat.

This is intuitively clear: the surface can be unrolled without stretching and laid flat on the Euclidean plane.

The correct terminology is that it is isometric to the plane.

Under such an isometry, geodesics are preserved because they are intrinsically defined.

It is worth noting that the concept of a geodesic is much more general than the case of surfaces discussed here.

We do not need to restrict ourselves to surfaces embedded in three-dimensional space.

The metric can be given abstractly; in fact, we did something similar with the “speed” function in the opening lecture.

Nor must we study geodesics only on surfaces.

We can equally well study geodesics in spaces of arbitrary dimension.

In physics, this idea played an extremely important role in the development of Einstein's general relativity.

In general relativity, gravity becomes part of the geometry of four-dimensional spacetime rather than being a force, and trajectories of freely falling bodies, including light rays, must be geodesics in the resulting space.

The four-dimensional space is not regarded as something embedded inside a larger space.

In pure mathematics, the study of geodesics is an important part of geometry and can be pursued further in a course on the Geometry of Surfaces.

§6 Generalization to Several Independent Variables and Higher-Order Derivatives

§6.1 Several Independent Variables

Suppose that instead of considering stationary values of functionals of curves

y(x),y(x),

we move up one dimension and consider variations of a surface

z(x,y).z(x,y).

Define the functional

I[z]=RF(x,y,z,zx,zy)dxdy,I[z] = \iint_R F(x,y,z,z_x,z_y) \,\mathrm{d}x\,\mathrm{d}y,

where RR is some region in the (x,y)(x,y)-plane and

zx,zyz_x,z_y

are the partial derivatives of z(x,y)z(x,y) with respect to xx and yy.

For example,

F(x,y,z,zx,zy)=1+zx2+zy2F(x,y,z,z_x,z_y) = \sqrt{1+z_x^2+z_y^2}

gives the area of a surface and therefore allows the study of minimal surfaces in great generality, not just surfaces of revolution.

As usual, the method is to vary the dependent variable along a one-dimensional path:

z(x,y)z(x,y)+αη(x,y).z(x,y) \rightarrow z(x,y)+\alpha\eta(x,y).

This gives

dIdαα=0=R(ηFz+ηxFzx+ηyFzy)dxdy.\left. \frac{\mathrm{d}I}{\mathrm{d}\alpha} \right|_{\alpha=0} = \iint_R \left( \eta\frac{\partial F}{\partial z} + \eta_x\frac{\partial F}{\partial z_x} + \eta_y\frac{\partial F}{\partial z_y} \right) \mathrm{d}x\,\mathrm{d}y.

We can use the divergence theorem, or Green's theorem since we are in two dimensions, to eliminate ηx\eta_x and ηy\eta_y:

dIdαα=0=R{ηFz+x(ηFzx)ηxFzx+y(ηFzy)ηyFzy}dxdy=Rη(Fzxnx+Fzyny)ds+Rη{FzxFzxyFzy}dxdy.\begin{aligned} \left. \frac{\mathrm{d}I}{\mathrm{d}\alpha} \right|_{\alpha=0} &= \iint_R \left\{ \eta\frac{\partial F}{\partial z} + \frac{\partial}{\partial x} \left( \eta \frac{\partial F}{\partial z_x} \right) - \eta \frac{\partial}{\partial x} \frac{\partial F}{\partial z_x} + \frac{\partial}{\partial y} \left( \eta \frac{\partial F}{\partial z_y} \right) - \eta \frac{\partial}{\partial y} \frac{\partial F}{\partial z_y} \right\} \mathrm{d}x\,\mathrm{d}y\\ &= \int_{\partial R} \eta \left( \frac{\partial F}{\partial z_x}n_x + \frac{\partial F}{\partial z_y}n_y \right) \mathrm{d}s\\ &\quad+ \iint_R \eta \left\{ \frac{\partial F}{\partial z} - \frac{\partial}{\partial x} \frac{\partial F}{\partial z_x} - \frac{\partial}{\partial y} \frac{\partial F}{\partial z_y} \right\} \mathrm{d}x\,\mathrm{d}y. \end{aligned}

Here

n=(nx,ny)\mathbf n=(n_x,n_y)

is the outward-pointing normal vector on the boundary curve R\partial R, and ss is arc length.

Under fixed boundary conditions,

η=0\eta=0

on R\partial R.

Therefore the boundary integral vanishes, giving

dIdαα=0=Rη(FzxFzxyFzy)dxdy.\left. \frac{\mathrm{d}I}{\mathrm{d}\alpha} \right|_{\alpha=0} = \iint_R \eta \left( \frac{\partial F}{\partial z} - \frac{\partial}{\partial x} \frac{\partial F}{\partial z_x} - \frac{\partial}{\partial y} \frac{\partial F}{\partial z_y} \right) \mathrm{d}x\,\mathrm{d}y.

We conclude that the Euler-Lagrange equation must hold at every point in RR:

xFzx+yFzyFz=0.\frac{\partial}{\partial x} \frac{\partial F}{\partial z_x} + \frac{\partial}{\partial y} \frac{\partial F}{\partial z_y} - \frac{\partial F}{\partial z} = 0.

This generalizes immediately to nn independent variables rather than two.

The result is the following theorem.

Theorem 6.1 Let FF be smooth and let

I[u]=RF(x1,,xn,u,u1,,un)dx1dxnI[u] = \int_R F( x_1,\ldots,x_n, u, u_1,\ldots,u_n ) \mathrm{d}x_1\ldots\mathrm{d}x_n

be a functional over a region

RRnR\subseteq\mathbb{R}^n

on smooth functions

u=u(x1,x2,,xn),u=u(x_1,x_2,\ldots,x_n),

where

ui=uxi.u_i = \frac{\partial u}{\partial x_i}.

Then a minimizing function uu satisfying fixed boundary conditions on R\partial R satisfies the Euler-Lagrange equation

i=1nxiFuiFu=0.\sum_{i=1}^n \frac{\partial}{\partial x_i} \frac{\partial F}{\partial u_i} - \frac{\partial F}{\partial u} = 0.

Note that in the theorem above, we assume not only that uu is sufficiently “good,” but also that the region RR is sufficiently well behaved for the conclusion to hold.

Introducing the notation

Fu=(Fu1,Fu2,,Fun)(46)\frac{\partial F}{\partial\nabla u} = \left( \frac{\partial F}{\partial u_1}, \frac{\partial F}{\partial u_2}, \ldots, \frac{\partial F}{\partial u_n} \right) \tag{46}

allows us to write the Euler-Lagrange equation more compactly as

(Fu)Fu=0.(47)\nabla\cdot \left( \frac{\partial F}{\partial\nabla u} \right) - \frac{\partial F}{\partial u} = 0. \tag{47}

Example 16 (Variational Formulation of Laplace's Equation) A simple and beautiful example is obtained by taking

F=12u2=12i=1nui2.F = \frac12|\nabla u|^2 = \frac12 \sum_{i=1}^n u_i^2.

Then the Euler-Lagrange equation is

0=i=1nxiFuiFu=i=1nxiui=2u.0 = \sum_{i=1}^n \frac{\partial}{\partial x_i} \frac{\partial F}{\partial u_i} - \frac{\partial F}{\partial u} = \sum_{i=1}^n \frac{\partial}{\partial x_i} u_i = \nabla^2u.

Thus we obtain Laplace's equation, or its nn-dimensional generalization.

This shows that problems involving Laplace's equation or the wave equation can be reformulated naturally in variational form.

This idea is fundamental both in modern quantum field theory and in the numerical solution of elliptic equations by finite-element methods.

§6.2 Higher-Order Derivatives

Now suppose we wish to find stationary values of the functional

I[y]=abF(x,y,y,y)dx.I[y] = \int_a^b F(x,y,y^{\prime},y^{\prime\prime}) \mathrm{d}x.

Varying y(x)y(x) as before gives

dIdαα=0=ab(ηFy+ηFy+ηFy)dx.\left. \frac{\mathrm{d}I}{\mathrm{d}\alpha} \right|_{\alpha=0} = \int_a^b \left( \eta\frac{\partial F}{\partial y} + \eta^{\prime} \frac{\partial F}{\partial y^{\prime}} + \eta^{\prime\prime} \frac{\partial F}{\partial y^{\prime\prime}} \right) \mathrm{d}x.

Integrating by parts twice gives

dIdαα=0=[η(FyddxFy)+ηFy]ab+abη(FyddxFy+d2dx2Fy)dx.\begin{aligned} \left. \frac{\mathrm{d}I}{\mathrm{d}\alpha} \right|_{\alpha=0} &= \left[ \eta \left( \frac{\partial F}{\partial y^{\prime}} - \frac{\mathrm{d}}{\mathrm{d}x} \frac{\partial F}{\partial y^{\prime\prime}} \right) + \eta^{\prime} \frac{\partial F}{\partial y^{\prime\prime}} \right]_a^b\\ &\quad+ \int_a^b \eta \left( \frac{\partial F}{\partial y} - \frac{\mathrm{d}}{\mathrm{d}x} \frac{\partial F}{\partial y^{\prime}} + \frac{\mathrm{d}^2}{\mathrm{d}x^2} \frac{\partial F}{\partial y^{\prime\prime}} \right) \mathrm{d}x. \end{aligned}

Thus a necessary condition for a stationary solution is the Euler-Lagrange equation

FyddxFy+d2dx2Fy=0.\frac{\partial F}{\partial y} - \frac{\mathrm{d}}{\mathrm{d}x} \frac{\partial F}{\partial y^{\prime}} + \frac{\mathrm{d}^2}{\mathrm{d}x^2} \frac{\partial F}{\partial y^{\prime\prime}} = 0.

This is a fourth-order differential equation and requires four constants of integration.

These constants must be obtained from suitable endpoint conditions, now involving both yy and yy^{\prime}, together with the natural boundary conditions

FyddxFy=0,Fy=0.\frac{\partial F}{\partial y^{\prime}} - \frac{\mathrm{d}}{\mathrm{d}x} \frac{\partial F}{\partial y^{\prime\prime}} = 0, \qquad \frac{\partial F}{\partial y^{\prime\prime}} = 0.

Example 17 (Diving-Board Problem) We study a problem illustrating how the calculus of variations can solve practical optimization problems arising in engineering and economics.

Consider the functional

E[y]=0L(12K(y)2+ρgy)dx.E[y] = \int_0^L \left( \frac12K(y^{\prime\prime})^2 + \rho gy \right) \mathrm{d}x.

This functional may be interpreted as the total energy of an elastic beam of horizontal length LL.

The beam is clamped at

x=0,x=0,

so at that point

y=0,y=0,y=0, \qquad y^{\prime}=0,

while it is free at

x=Lx=L

and bends under its own weight.

We assume yy is sufficiently small that this functional gives a reasonable approximation to the physical situation.

The beam will reach an equilibrium position minimizing its energy, so the calculus of variations provides a method for determining its shape.

The Euler-Lagrange equation is

Ky+ρg=0.Ky^{\prime\prime\prime\prime} + \rho g = 0.

Two of the four boundary conditions are

y(0)=y(0)=0,y(0)=y^{\prime}(0)=0,

and the other two are the natural boundary conditions

y(L)=y(L)=0.y^{\prime\prime}(L) = y^{\prime\prime\prime}(L) = 0.

This clearly specifies a quartic polynomial.

The solution satisfying the boundary conditions is

y(x)=ρg24K(x44Lx3+6L2x2).y(x) = -\frac{\rho g}{24K} \left( x^4 - 4Lx^3 + 6L^2x^2 \right).

Notice that the free end of the diving board sags to

y=ρgL48K.y = -\frac{\rho gL^4}{8K}.

Imagine a swimmer in a pool placing a hand on the free end and holding it at the height

y=ρgL48K+h.y = -\frac{\rho gL^4}{8K} + h.

Clearly, if

h=0,h=0,

no force need be applied.

But if

h0,h\neq0,

a force is required.

We can evaluate this force by extending the analysis.

First solve the stationary problem again with the fixed-end condition

y(L)=ρgL48K+h.y(L) = -\frac{\rho gL^4}{8K} + h.

To simplify notation, write

w=ρgK.w = \frac{\rho g}{K}.

It is easy to find

y(x)=w24(x44Lx3+6L2x2)+h2L4(Lx3+3L2x2).y(x) = -\frac{w}{24} \left( x^4 - 4Lx^3 + 6L^2x^2 \right) + \frac{h}{2L^4} \left( -Lx^3 + 3L^2x^2 \right).

We can now regard the energy functional E[y]E[y] as a function of hh.

It has a minimum when

h=0.h=0.

If the free end is lifted, the energy increases, and this increase can only come from work done.

The work is

F(h)dh,\int F(h)\mathrm{d}h,

where F(h)F(h) is the force required to maintain

y(L)=w8L4+h.y(L) = -\frac{w}{8L^4} + h.

Therefore,

F(h)=ddhE(h).F(h) = \frac{\mathrm{d}}{\mathrm{d}h} E(h).

This is easily calculated to be

3hKL3.\frac{3hK}{L^3}.

Returning to the case where the end at x=Lx=L is free, we may apply the same idea to find the force applied at

x=0x=0

to maintain the constraint.

In this case, it is easier to see that the upward force required to maintain

y(0)=0y(0)=0

is simply the total weight of the diving board,

ρgL.\rho gL.

Slightly less obvious is the fact that the clamp applies a torque of

12ρgL2\frac12\rho gL^2

to maintain the condition

y(0)=0.y^{\prime}(0)=0.

Here we use

torque×angle=work.\text{torque}\times\text{angle} = \text{work}.

You may already be familiar with the idea of forces associated with constraints, because this is exactly the idea behind normal reaction forces in elementary mechanics.

But suppose the functional measures not energy, but cost.

Then each element of the problem, including the constraints, acquires an economic interpretation.

You can imagine the diving-board curve as describing the effect of a company acquiring a hospital and replacing a stable-employment policy with a policy of reducing staff.

Here the independent variable xx is time and yy represents staff size.

How should the policy be implemented at minimum cost?

Suppose the cost functional contains the same kinds of terms as the diving-board functional:

wages proportional to yy, and costs associated with management disruption, strikes, and so on caused by rapid changes in staffing, modeled as proportional to

(y)2.(y^{\prime\prime})^2.

The solution with natural boundary conditions represents the ideal situation at the end of the period, from the company's perspective rather than that of the patients.

If a government regulator imposes a constraint specifying the staff level that must remain at that time, then the constraint naturally acquires a price:

the amount the company would be willing to pay to persuade the regulator to reduce the imposed quota by one unit.

In optimization courses, through linear programming, you have already encountered the idea that prices arise as dual variables associated with constraints.

This is another example of the same idea.

§7 Extremals with Integral Constraints

This section studies how to find stationary values of an integral

I[y]=abF(x,y,y)dxI[y] = \int_a^b F(x,y,y^{\prime}) \mathrm{d}x

subject to the integral constraint

J[y]=abG(x,y,y)dx=C.J[y] = \int_a^b G(x,y,y^{\prime}) \mathrm{d}x = C.

We can solve this problem using the method of Lagrange multipliers from elementary calculus.

Suppose η1\eta_1 and η2\eta_2 are two linearly independent test functions and consider the variation

yy+α1η1+α2η2,y \rightarrow y+\alpha_1\eta_1+\alpha_2\eta_2,

where α1\alpha_1 and α2\alpha_2 are real parameters.

For fixed η1\eta_1 and η2\eta_2, this defines two functions of α1\alpha_1 and α2\alpha_2:

I^(α1,α2)=I[y+α1η1+α2η2],J^(α1,α2)=J[y+α1η1+α2η2].\hat I(\alpha_1,\alpha_2) = I[y+\alpha_1\eta_1+\alpha_2\eta_2], \qquad \hat J(\alpha_1,\alpha_2) = J[y+\alpha_1\eta_1+\alpha_2\eta_2].

From elementary calculus, we know that the problem of finding stationary values of

I^(α1,α2)\hat I(\alpha_1,\alpha_2)

subject to

J^(α1,α2)=C\hat J(\alpha_1,\alpha_2)=C

is equivalent to finding stationary values of

I^(α1,α2)λJ^(α1,α2).\hat I(\alpha_1,\alpha_2) - \lambda\hat J(\alpha_1,\alpha_2).

Since this is true for every pair of linearly independent η1,η2\eta_1,\eta_2, and indeed for variations of the form

yy+i=1nαiηi,y \rightarrow y+\sum_{i=1}^n \alpha_i\eta_i,

with nn real parameters αi\alpha_i and linearly independent test functions ηi\eta_i, it is reasonable to conclude that stationary values of I[y]I[y] under the constraint

J[y]=CJ[y]=C

can be found by looking for stationary values of

I[y]λJ[y].I[y]-\lambda J[y].

Thus yy must satisfy the Euler-Lagrange equation

ddx(y(FλG))y(FλG)=0\frac{\mathrm{d}}{\mathrm{d}x} \left( \frac{\partial}{\partial y^{\prime}} (F-\lambda G) \right) - \frac{\partial}{\partial y} (F-\lambda G) = 0

for some constant λ\lambda.

In addition, yy must satisfy the appropriate fixed-endpoint or natural boundary conditions.

The natural boundary condition is now

y(FλG)=0at x=a and x=b.\frac{\partial}{\partial y^{\prime}} (F-\lambda G) = 0 \quad \text{at }x=a\text{ and }x=b.

We record this result as a useful theorem.

Theorem 7.1 Let F,GF,G be smooth functions, and define

I[y]:=abF(x,y,y)dx,J[y]:=abG(x,y,y)dx.I[y] := \int_a^b F(x,y,y^{\prime}) \mathrm{d}x, \qquad J[y] := \int_a^b G(x,y,y^{\prime}) \mathrm{d}x.

Then every smooth stationary value of I[y]I[y] subject to

J[y]=CJ[y]=C

satisfies

ddx(y(FλG))y(FλG)=0\frac{\mathrm{d}}{\mathrm{d}x} \left( \frac{\partial}{\partial y^{\prime}} (F-\lambda G) \right) - \frac{\partial}{\partial y} (F-\lambda G) = 0

for some constant λ\lambda.

A Freely Hanging Chain—the Catenary

We can use this method to determine the shape of an idealized chain of constant density supported only at its two ends.

Suppose the chain lies along the curve

y=y(x),y=y(x),

with endpoints fixed at

x=±a,y=b.x=\pm a, \qquad y=b.

Its total length is fixed:

J[y]=aa1+y2dx=,J[y] = \int_{-a}^a \sqrt{1+y^{\prime2}} \,\mathrm{d}x = \ell,

where

>2a.\ell>2a.

The equilibrium state of the chain minimizes its gravitational potential energy:

I[y]=gρaay1+y2dx.I[y] = g\rho \int_{-a}^a y\sqrt{1+y^2} \,\mathrm{d}x.

Applying the method of Lagrange multipliers and absorbing ρg\rho g into λ\lambda, we obtain

FλG=(yλ)1+y2.F-\lambda G = (y-\lambda) \sqrt{1+y^{\prime2}}.

This has no explicit dependence on xx, so Beltrami's identity gives the first integral

yλ=c1+y2.y-\lambda = c\sqrt{1+y^{\prime2}}.

Substituting

y=λ+ccoshuy = \lambda+c\cosh u

easily yields the solution

y=λ+ccosh(xx0c).y = \lambda + c\cosh \left( \frac{x-x_0}{c} \right).

Matching the constants

c,λ,x0c,\lambda,x_0

to the given data

a,b,a,b,\ell

is left as an exercise.

Dido's Problem

Another similar classical problem is the simplest isoperimetric problem.

In the Euclidean plane, given a fixed length as perimeter, what is the largest possible enclosed area?

The answer is a circle.

We consider a slightly different version in which the area lies on one side of a given straight line, which we may take without loss of generality to be the xx-axis.

The answer is then that the boundary is a circular arc.

This problem is known as Dido's problem, because it can be regarded as appearing in the Aeneid.

Dido, perhaps more widely known through the famous lament she inspired in Purcell, is said to have fixed the boundary of Carthage according to this criterion.

The line

y=0y=0

represents the Mediterranean coastline.

For more information, see http://mathworld.wolfram.com/DidosProblem.html.

For this problem, we may take

F=yF=y

and

G=1+y22,G=\sqrt{1+y^{22}},

where the boundary curve is represented as

y=y(x).y=y(x).

However, it is actually better to represent the boundary curve parametrically as

(x(t),y(t)),(x(t),y(t)),

where tt is an arbitrary parameter.

We consider extremals of the functional

(yx˙λx˙2+y˙2)dt.\int \left( y\dot x - \lambda \sqrt{\dot x^2+\dot y^2} \right) \mathrm{d}t.

The Euler-Lagrange equations are

ddt(λy˙x˙2+y˙2)=x˙,ddt(λx˙x˙2+y˙2)=y˙.(48)\frac{\mathrm{d}}{\mathrm{d}t} \left( \frac{-\lambda\dot y} {\sqrt{\dot x^2+\dot y^2}} \right) = \dot x, \qquad \frac{\mathrm{d}}{\mathrm{d}t} \left( \frac{-\lambda\dot x} {\sqrt{\dot x^2+\dot y^2}} \right) = -\dot y. \tag{48}

Therefore,

λy˙x˙2+y˙2=xa,λx˙x˙2+y˙2=(yb).(49)\frac{-\lambda\dot y} {\sqrt{\dot x^2+\dot y^2}} = x-a, \qquad \frac{-\lambda\dot x} {\sqrt{\dot x^2+\dot y^2}} = -(y-b). \tag{49}

Eliminating λ\lambda gives

(xa)x˙+(yb)y˙=0.(x-a)\dot x + (y-b)\dot y = 0.

Integrating,

(xa)2+(yb)2=c2.(x-a)^2 + (y-b)^2 = c^2.

Thus the curves must be circles.

For the original Dido problem, we are interested in the fixed boundary condition

y(t)=0y(t)=0

at both endpoints, together with the natural boundary condition for x(t)x(t).

That is, with y=0y=0 fixed, we consider extremals over all possible values of xx.

The natural boundary condition for xx is

yλx˙x˙2+y˙2=0.y - \lambda \frac{\dot x} {\sqrt{\dot x^2+\dot y^2}} = 0.

Since

y=0,y=0,

this implies

x˙=0.\dot x=0.

Here

dydx\frac{\mathrm{d}y}{\mathrm{d}x}

is infinite, which explains why the representation y(x)y(x) is inappropriate.

Thus the center of the circle must lie on

y=0,y=0,

and under the given constraint the stationary area is bounded by a semicircle, as expected.

These are the same semicircles that appeared as the fastest paths in the muddy-field problem, or more formally, as geodesics of the hyperbolic plane.

This can be seen more directly by proceeding in a slightly different way.

The second equation in (47) may be written

ddt(λx˙x˙2+y˙2y)=0,\frac{\mathrm{d}}{\mathrm{d}t} \left( \frac{\lambda\dot x} {\sqrt{\dot x^2+\dot y^2}} - y \right) = 0,

so

λx˙x˙2+y˙2y=constant.\frac{\lambda\dot x} {\sqrt{\dot x^2+\dot y^2}} - y = \text{constant}.

Imposing the boundary conditions

y=0,x˙=0y=0, \qquad \dot x=0

forces this constant to be zero.

Hence

y1+y2=λ.y\sqrt{1+y^{\prime2}} = \lambda.

This is the same equation that appeared in the fastest-path problem, in (28), and therefore has the same semicircular solutions.

This feature extends to a more general land-enclosure problem in which a varying value

h(y)h(y)

is associated with the land, and the objective is to maximize total value for a given boundary length.

In this case, the problem can be represented by taking

F=H(y),G=1+y2,F=H(y), \qquad G=\sqrt{1+y^2},

where

H(y)=0yh(u)du.H(y) = \int_0^y h(u) \mathrm{d}u.

With natural boundary conditions, the resulting equation is

H(y)1+y2=λ.H(y) \sqrt{1+y^{\prime2}} = \lambda.

You can check that this is the same equation obtained in the muddy-field fastest-path problem when the speed of motion is

H(y).H(y).

Thus, if

h(y)=1/y,h(y) = 1/\sqrt y,

then

H(y)=2y,H(y) = 2\sqrt y,

and we recover the equation arising in the brachistochrone problem in (30).

Hence the solution is a cycloid.

Constraints and Prices Revisited

We now have another example in which a constraint can be regarded as defining a price.

If we change the constraint

J=CJ=C

to

J=C+δC,J=C+\delta C,

how much additional II can be obtained?

Let

I(C)I(C)

denote the stationary value of II under the constraint

J=C.J=C.

Then we find

λ=dI(C)dC.(50)\lambda = \frac{\mathrm{d}I(C)} {\mathrm{d}C}. \tag{50}

This gives a useful interpretation of λ\lambda.

To prove it, recall that the solution of

IλJI-\lambda J

is stationary.

That is, when the extremal yy is changed to any

y+δyy+\delta y

consistent with the boundary conditions, the value is unchanged to first order.

Suppose we choose a particular δy\delta y such that

y+δyy+\delta y

is the extremal for the problem with constraint

J=C+δC.J=C+\delta C.

Then, to first order,

I(C)λC=I(C+δC)λ(C+δC).I(C)-\lambda C = I(C+\delta C) - \lambda(C+\delta C).

Subtracting and taking

δC0\delta C\rightarrow0

recovers the relation.

Thus, in Dido's problem, the value of λ\lambda in the solution represents the value of the additional area obtained by increasing the available rope length defining the perimeter.

We have therefore solved an additional question:

how much should Dido be willing to pay for additional rope?

More specifically, in this problem, for perimeter length LL the stationary area is

I(L)=L22π.I(L) = \frac{L^2}{2\pi}.

Therefore,

dIdL=Lπ,\frac{\mathrm{d}I}{\mathrm{d}L} = \frac{L}{\pi},

which is exactly the radius of the circle.

It is easy to check that this is indeed the value of λ\lambda.

§8 Application to Sturm-Liouville Equations

§8.1 Motivation from Quantum Mechanics

In quantum mechanics, the state of a physical system is not described by the motion of point particles, but by wavefunctions.

These wavefunctions are actually complex-valued, but for simplicity we may discuss real functions.

The simplest case is a single particle confined to a finite one-dimensional interval

[0,1].[0,1].

Although a classical point particle could simply remain at rest in this interval with zero kinetic energy, a wavefunction ψ(x)\psi(x) is associated with the integral of the square of its derivative, essentially half the kinetic energy:

01{ψ(x)}2dx.\int_0^1 \{\psi^{\prime}(x)\}^2 \,\mathrm{d}x.

So far this looks somewhat like the kinetic energy of a fluid, but there is a subtle difference that makes wavefunctions completely different from classical fluids.

The energy is actually determined by the ratio

01{ψ(x)}2dx01{ψ(x)}2dx.\frac{ \displaystyle \int_0^1 \{\psi^{\prime}(x)\}^2 \,\mathrm{d}x }{ \displaystyle \int_0^1 \{\psi(x)\}^2 \,\mathrm{d}x }.

Thus multiplying ψ(x)\psi(x) by a constant has no effect.

The energy is a functional of the shape of ψ\psi, not its overall scale.

In particular,

ψ0\psi\equiv0

has no meaning in this ratio, so there is no obvious analogue of a stationary classical particle.

Instead, a minimization problem appears, but its answer is far from intuitively obvious.

In fact, among functions satisfying

ψ(0)=0=ψ(1),\psi(0)=0=\psi(1),

the minimum is

π2.\pi^2.

We will prove this.

The existence of such a nonzero ground-state energy is characteristic of quantum systems in much more general settings.

We need a formalism that can handle this problem and more general ones in which the energy functional is more complicated and the geometry of space is not simply an interval.

Clearly, the theory of stationary integrals with integral constraints provides exactly such a framework.

The ratio above can be reformulated as the problem of minimizing

01{ψ(x)}2dx\int_0^1 \{\psi^{\prime}(x)\}^2 \,\mathrm{d}x

subject to

01{ψ(x)}2dx=1.\int_0^1 \{\psi(x)\}^2 \,\mathrm{d}x = 1.

Thus the ratio of interest can be related to the value of the Lagrange multiplier λ\lambda in the solution.

From the preceding discussion, the relationship between I[y]I[y] and J[y]J[y] in this example is particularly simple: it is linear,

I=λJ,I=\lambda J,

and λ\lambda can be interpreted as a constant price.

The new point here is that, for the first time, we seriously consider the existence of many local extrema—indeed, a countably infinite number—and study their relationships.

The relationship between these extrema is naturally expressed by observing that λ\lambda is also an eigenvalue of a differential operator.

§8.2 Sturm-Liouville Equations

The differential operator of interest is the same one you may have encountered in Differential Equations 2, but written in a slightly different form.

The standard Sturm-Liouville form is

(p(x)y)+q(x)y=λr(x)yfor axb,\left( p(x)y^{\prime} \right)^{\prime} + q(x)y = -\lambda r(x)y \qquad \text{for } a\leqslant x\leqslant b,

where

p,q,rp,q,r

are continuously differentiable, and we assume

p0,r>0.p\geqslant0, \qquad r>0.

This is the Euler-Lagrange equation for the variational problem of finding stationary values of

I[y]=ab(p(y)2qy2)dx,J[y]=abry2dx=constant.\begin{gathered} I[y] = \int_a^b \left( p(y^{\prime})^2 - qy^2 \right) \mathrm{d}x,\\ J[y] = \int_a^b ry^2 \,\mathrm{d}x = \text{constant}. \end{gathered}

We can now identify boundary conditions consistent with this interpretation.

At each endpoint we may usually choose either a fixed boundary condition or a natural boundary condition.

Thus at aa we have either

y(a)=0y(a)=0

or

p(a)y(a)=0,p(a)y^{\prime}(a)=0,

and similarly at bb.

§8.3 Examples

  1. If
p1,q0,r1,p\equiv1, \qquad q\equiv0, \qquad r\equiv1,

we recover the example from the beginning of this section.

Now we can solve it.

The allowed values of λ\lambda are

λn=n2π2,\lambda_n = n^2\pi^2,

and the corresponding yn(x)y_n(x) are proportional to

sin(nπx).\sin(n\pi x).
  1. If
p(x)=1x2,q0,r1,p(x)=1-x^2, \qquad q\equiv0, \qquad r\equiv1,

we obtain Legendre's equation on

[1,1].[-1,1].

With natural boundary conditions, the solutions are the Legendre polynomials

Pn(x),P_n(x),

as encountered in Differential Equations 2.

  1. If
p(x)=x,q(x)=k2/x,r(x)=x,p(x)=x, \qquad q(x)=-k^2/x, \qquad r(x)=x,

we obtain

(xy)k2xy=λxy.(xy^{\prime})^{\prime} - \frac{k^2}{x}y = -\lambda xy.

Equivalently,

y+1xyk2x2y=λy.y^{\prime\prime} + \frac1x y^{\prime} - \frac{k^2}{x^2}y = -\lambda y.

This may also be recognized from Differential Equations 2 as Bessel's equation of order kk.

When

k>0,k>0,

the solution vanishing at

x=0x=0

has the form

Jk(λx).J_k(\lambda x).

A more complete treatment would introduce solutions of Bessel's equation that diverge at

x=0.x=0.

In the simplest case, when the boundary condition

y=0y=0

is imposed at

x=0x=0

and

x=a,x=a,

there is a discrete spectrum

λn\lambda_n

such that

Jk(λnx)J_k(\lambda_nx)

vanishes at both

x=0x=0

and

x=a.x=a.

§8.4 Eigenfunction Expansions

The idea of Sturm-Liouville theory is to generalize the Fourier analysis naturally associated with the first example.

You may have encountered Sturm-Liouville theory in Differential Equations 2.

The time-independent Schrödinger equation in Quantum Theory, on a bounded domain, is a special case of a Sturm-Liouville problem with p(x)p(x) taken to be constant.

From elementary Fourier series and partial differential equations, you know how completeness and orthogonality allow general functions to be expanded in sine and cosine functions.

It turns out that these properties are not restricted to trigonometric functions.

Sines and cosines may be viewed as solutions of a Sturm-Liouville ordinary differential equation, and any other Sturm-Liouville equation generates a new family of functions with analogous completeness and orthogonality properties.

That is, for a general Sturm-Liouville equation there is usually a sequence of eigenfunctions

yn(x)y_n(x)

with completeness and orthogonality properties, so that general functions can usefully be expanded as

ncnyn,\sum_n c_ny_n,

just as in Differential Equations 2.

A complete statement and proof lie beyond the scope of this course.

Remember that even in Fourier theory, completeness is subtle and requires special care at discontinuities.

However, we can show how the important orthogonality property follows directly from the present formulation.

Suppose that for a Sturm-Liouville system

(p,q,r)(p,q,r)

we have two solutions

yn,ymy_n,y_m

corresponding to

λnλm.\lambda_n\neq\lambda_m.

First, we verify that the eigenvalue λn\lambda_n associated with the eigenfunction yny_n is equal to the quotient

I[yn]J[yn],\frac{I[y_n]}{J[y_n]},

and hence equals the Lagrange multiplier in the integral formulation.

We have

(p(x)yn)+q(x)yn=λnr(x)yn.\left( p(x)y_n^{\prime} \right)^{\prime} + q(x)y_n = -\lambda_n r(x)y_n.

Multiplying by yny_n and integrating,

ab(p(x)yn)yn+q(x)yn2dx=λnabr(x)yn2dx.\int_a^b \left( p(x)y_n^{\prime} \right)^{\prime} y_n + q(x)y_n^2 \,\mathrm{d}x = -\lambda_n \int_a^b r(x)y_n^2 \,\mathrm{d}x.

Therefore,

abddx(pynyn)dxab(p(x)yn2q(x)yn2)dx=λnabr(x)yn2dx.\int_a^b \frac{\mathrm{d}}{\mathrm{d}x} \left( py_n^{\prime}y_n \right) \mathrm{d}x - \int_a^b \left( p(x)y_n^{\prime2} - q(x)y_n^2 \right) \mathrm{d}x = -\lambda_n \int_a^b r(x)y_n^2 \,\mathrm{d}x.

That is,

[pynyn]abI[yn]=λnJ[yn].\left[ py_n^{\prime}y_n \right]_a^b - I[y_n] = -\lambda_nJ[y_n].

But at the boundary aa, we have either

yn(a)=0y_n(a)=0

or

p(a)yn(a)=0,p(a)y_n^{\prime}(a)=0,

and similarly at bb.

Therefore the boundary term vanishes.

Hence, as required,

I[yn]=λnJ[yn].I[y_n] = \lambda_nJ[y_n].

We now prove that

ym,yny_m,y_n

are orthogonal, meaning

abrynymndx=0.\int_a^b ry_ny_{mn} \,\mathrm{d}x = 0.

We have

(p(x)yn)+q(x)yn=λnr(x)yn,(p(x)ym)+q(x)ym=λmr(x)ym.\begin{aligned} \left( p(x)y_n^{\prime} \right)^{\prime} + q(x)y_n &= -\lambda_n r(x)y_n,\\ \left( p(x)y_m^{\prime} \right)^{\prime} + q(x)y_m &= -\lambda_m r(x)y_m. \end{aligned}

Multiply the first equation by ymy_m, the second by yny_n, subtract, and integrate from aa to bb:

ab[ym(pyn)yn(pym)]dx=(λnλm)abr(x)ymyndx.\int_a^b \left[ y_m \left( py_n^{\prime} \right)^{\prime} - y_n \left( py_m^{\prime} \right)^{\prime} \right] \mathrm{d}x = - (\lambda_n-\lambda_m) \int_a^b r(x)y_my_n \,\mathrm{d}x.

The left-hand side integrates exactly to

[p(ymynynym)]ab.\left[ p \left( y_my_n^{\prime} - y_ny_m^{\prime} \right) \right]_a^b.

This vanishes because of the boundary conditions.

At aa, either

ym(a)=0=yn(a),y_m(a)=0=y_n(a),

or

p(a)ym(a)=0=p(a)yn(a),p(a)y_m^{\prime}(a) = 0 = p(a)y_n^{\prime}(a),

and similarly at bb.

Thus the right-hand side vanishes.

Since

λmλn0,\lambda_m-\lambda_n \neq0,

orthogonality follows.

This argument is the same as the one used in algebra courses when discussing the general definition of an inner product.

In fact, we have defined an inner-product structure on a function space using

r(x)r(x)

as a weight function.

We can then choose the normalization so that

J[yn]=abr(x){yn(x)}2dx=1,J[y_n] = \int_a^b r(x) \{y_n(x)\}^2 \,\mathrm{d}x = 1,

thereby obtaining an orthonormal family of basis functions ymy_m with respect to this inner product.

§8.5 The Rayleigh-Ritz Approximation Method

Throughout the course, we have emphasized that the variational formulation works in both directions.

Our theory solves famous extremal problems by solving differential equations.

Conversely, it can effectively reformulate problems involving differential equations as problems of stationary integrals.

In the context of Sturm-Liouville equations, spectral eigenvalues can be studied effectively by computing the integrals

I[y]I[y]

and

J[y].J[y].

In particular, any trial function yy satisfying the boundary conditions gives an upper bound for the lowest eigenvalue

λ1.\lambda_1.

Returning to the original example,

01{ψ(x)}2dx01{ψ(x)}2dx,\frac{ \displaystyle \int_0^1 \{\psi^{\prime}(x)\}^2 \,\mathrm{d}x }{ \displaystyle \int_0^1 \{\psi(x)\}^2 \,\mathrm{d}x },

we may try the simplest function satisfying the boundary conditions:

y=x(1x).y=x(1-x).

Then

Q=01(2x1)2dx01x2(1x)2dx=10.Q = \frac{ \displaystyle \int_0^1 (2x-1)^2 \,\mathrm{d}x }{ \displaystyle \int_0^1 x^2(1-x)^2 \,\mathrm{d}x } = 10.

Hence

λ110.\lambda_1 \leqslant10.

This is a good approximation to

λ1=π2.\lambda_1 = \pi^2.

The procedure can be improved.

Clearly, optimizing the trial function yy over a family containing several parameters can improve the approximation.

In this way we obtain a good approximation

yˉ1\bar y_1

to

y1.y_1.

The next eigenvalue can then be estimated by optimizing over the class of all trial functions orthogonal to

yˉ1.\bar y_1.

This gives an approximation to

λ2\lambda_2

and

y2,y_2,

and so on.

The reason eigenvalues are approximated especially well is that if the trial function

yˉ1\bar y_1

is correct to

O(ϵ),O(\epsilon),

then the eigenvalue

λ1\lambda_1

will be correct to

O(ϵ2).O(\epsilon^2).

Indeed, if

yˉ1=y1+n=2cnyn,\bar y_1 = y_1 + \sum_{n=2}^{\infty} c_ny_n,

where every

cnc_n

is

O(ϵ),O(\epsilon),

then the difference between

Q[yˉ1]Q[\bar y_1]

and

λ1\lambda_1

is

O(ϵ2),O(\epsilon^2),

because

I[yˉ1]=λ1+n=2λncn2,J[yˉ1]=1+n=2cn2.I[\bar y_1] = \lambda_1 + \sum_{n=2}^{\infty} \lambda_n|c_n|^2, \qquad J[\bar y_1] = 1 + \sum_{n=2}^{\infty} |c_n|^2.