Introduction To The Calculus of Variations - ms327 PDF
Introduction To The Calculus of Variations - ms327 PDF
Introduction To The Calculus of Variations - ms327 PDF
Unit 5
Note to reader
Mathematical/statistical content at the Open University is usually provided to students in
printed books, with PDFs of the same online. This format ensures that mathematical notation
is presented accurately and clearly. The PDF of this extract thus shows the content exactly as
it would be seen by an Open University student. Please note that the PDF may contain
references to other parts of the module and/or to software or audio-visual components of the
module. Regrettably mathematical and statistical content in PDF files is unlikely to be
accessible using a screenreader, and some OpenLearn units may have PDF files that are not
searchable. You may need additional help to read these documents.
Contents
Introduction 5
1 Shortest distance between two points 6
1.1 Distance between two points on a given curve 7
1.2 Stationary paths 9
2 Some examples of functionals 15
2.1 Brachistochrone 16
2.2 Minimal surfaces of revolution 17
2.3 A problem in navigation 18
2.4 Catenary 18
3 Reminder about partial and total derivatives 19
4 Euler–Lagrange equation 21
4.1 Derivation of the Euler–Lagrange equation 21
4.2 Alternative forms of the Euler–Lagrange equation 25
5 Applications of the Euler–Lagrange equation 28
5.1 Fermat’s principle 28
5.2 Revisiting the brachistochrone 34
5.3 Revisiting minimal surfaces of revolution 40
Solutions to exercises 51
Acknowledgements 63
Index 64
Introduction
Introduction
In Book 1, we introduced various types of dynamical systems. These
systems could be classified as:
• conservative, where the total energy of the system is constant
(i.e. conserved) throughout the motion
• non-conservative, where energy is not conserved, as for example in the
presence of forcing or damping
• deterministic, where the equations describing the motion have no
randomness in them
• non-deterministic (or random or stochastic), where the equations
describing the motion have randomness built in, as for example in a
random walk.
In Book 2, we explore some aspects of conservative and non-conservative
deterministic systems in more detail, before moving on to discuss random
systems in Book 3.
In earlier modules, you may have seen how to derive the equations of
motion of simple mechanical systems using Newton’s laws of motion. In
Unit 6, we will introduce you to another method called Lagrangian
mechanics, which applies to conservative systems, and is arguably much
easier to use and more powerful than Newtonian mechanics – although
perhaps less intuitive since it is based on energies rather than forces.
However, before we get to Unit 6, we first need to set up some important
mathematical apparatus called the calculus of variations: this is the main
purpose of this unit.
In ordinary calculus, we often work with real functions, which are rules for
mapping real numbers to real numbers; for example, the function sin x
maps the whole of the real line to the interval [−1, 1]. Functions can have
various properties: for instance, they can be continuous and differentiable,
and they can have stationary points and local maxima and minima.
In the calculus of variations, we work with functionals: these are objects
that map functions to the real line. For example,
Z 1
S[f ] = (f ′ (x))2 dx
0
is a functional, which for any sufficiently well-behaved real function f gives
us a real number S[f ]. (Here and throughout this unit and the next, f ′ (x)
denotes the derivative df /dx evaluated at x.) The square bracket notation
S[f ] is used to emphasise the fact that the functional S depends on the
choice of function.
5
Unit 5 Introduction to the calculus of variations
6
1 Shortest distance between two points
y
Pb
B
y(x)
Pa
A
a b x
You may have derived a formula for the length of this curve in earlier
modules. It is obtained by dividing the interval a ≤ x ≤ b into N intervals
of length δx = (b − a)/N . Let us denote the endpoints of these intervals by
x0 , x1 , . . . , xN , in that order, so that x0 = a, xN = b and xk+1 − xk = δx
for k = 0, 1, . . . , N − 1, as shown in Figure 2.
y
Pb
B
y(x)
Pa
A
x0 x1 x2 x3 x4 x5 x
a b
Figure 2 Subdivision of the interval [a, b] into N equal intervals; in this
case N = 5
7
Unit 5 Introduction to the calculus of variations
δsk
δy
y(xk )
δx
xk xk+1 x
Exercise 1
Let Pa = (−1, 0) and Pb = (1, 0). Verify the following statements. y
(a) If y = y(x) is the straight line joining Pa to Pb (i.e. the red line in
Figure 4), then the functional (2) has the value S[y] = 2.
(b) If y = y(x) is the upper semicircle with diameter the straight line from
Pa to Pb (i.e. the blue curve in Figure 4), so that x2 + y 2 = 1, then Pa Pb
S[y] = π. −1 0 1 x
(Hint: You may
Z assume the following standard integral, given in the Figure 4 The two paths in
1 Exercise 1
Handbook: √ dx = arcsin x.)
1 − x2
Exercise 2
Determine the value of the functional
Z 1
S[y] = y ′ (x)2 dx
0
for the following functions.
(a) y(x) = x
(b) y(x) = x3
9
Unit 5 Introduction to the calculus of variations
10
1 Shortest distance between two points
Let us now use equation (4) to find the path between two points in a plane
with shortest length. From equation (3) we have
Z b
d d p
S[y + εg] = 1 + (y + εg ) dx
′ ′ 2 .
dε ε=0 dε a ε=0
The integration limits a and b are independent of ε, and the order of
integration and differentiation can be interchanged using Leibniz’s integral
rule, which we state (slightly informally) here.
11
Unit 5 Introduction to the calculus of variations
12
1 Shortest distance between two points
The main features of the procedure that you have just seen for finding the
stationary path between two points are common to all variational problems
in this module. That is, we start with some functional and some boundary
conditions on the functions that it maps; we use equation (4) to find the
functions y(x) that make it stationary; this leads to a differential equation
for the stationary function; then we solve the differential equation subject
to the boundary conditions to find the stationary function.
In the next example and exercise we find the stationary paths of two more
functionals, in the same way that we found the stationary path of the path
length functional. In practice we rarely use this method to determine
stationary paths. Instead, we use the powerful Euler–Lagrange equation,
which is discussed in Section 4. To appreciate the derivation of the
Euler–Lagrange equation, however, you first need to understand the
method used in this section. This method will not be assessed in TMAs or
the examination.
13
Unit 5 Introduction to the calculus of variations
Example 1
Let B ≥ −1. Consider the functional
Z 1p
S[y] = 1 + y ′ (x) dx, y(0) = 0, y(1) = B.
0
(a) Show that on a stationary path y(x) of S, we have y ′ (x) = constant.
(b) Hence show that the stationary path is the straight line y(x) = Bx.
(c) Also show
√ that the value of the functional on this line is
S[y] = 1 + B.
Solution
(a) In this case, the endpoints of the paths are (a, A) and (b, B), where
a = 0, A = 0 and b = 1. In order to find the stationary function, we
need to compute equation (4):
d
S[y + εg] = 0, where g(0) = g(1) = 0.
dε ε=0
Here
Z 1p
S[y + εg] = 1 + (y + εg)′ dx
0
Z 1p
= 1 + y ′ + εg′ dx,
0
so
Z 1
d d p
S[y + εg] = 1 + y + εg dx
′ ′ .
dε ε=0 dε 0 ε=0
The integration limits 0 and 1 are independent of ε, so the order of
integration and differentiation can be interchanged using Leibniz’s
integral rule. This gives
Z 1 p
d d
S[y + εg] = 1 + y ′ + εg′ dx
dε ε=0 0 dε ε=0
Z
1 1 g′
= √ dx
2 0 1 + y + εg ε=0
′ ′
Z
1 1 g′
= √ dx.
2 0 1 + y′
If S[y] is stationary, then it follows, by definition, that
Z 1
g′ (x)
p dx = 0
0 1 + y ′ (x)
for all functions g(x) for which g(0) = g(1) = 0. To solve this equation,
we integrate by parts:
Z 1 Z 1
′
1
u(x) g (x) dx = u(x) g(x) 0 − u′ (x) g(x) dx,
0 0
√
with u = 1/ 1 + y ′ .
14
2 Some examples of functionals
Exercise 3
Consider the functional
Z 2
S[y] = x(y ′ )2 dx, y(1) = 0, y(2) = 1.
1
(a) Show that the stationary path satisfies x y ′ (x) = constant.
(b) Hence show that the stationary function is y(x) = ln x/ ln 2.
15
Unit 5 Introduction to the calculus of variations
There are no exercises for this section as it will not be assessed, but it is
important for you to read it in order to understand the sections that follow.
2.1 Brachistochrone
0 b x The problem here is to find the shape of a wire joining two given points, so
that a bead will slide down the wire under gravity from one point to the
Pa other (without friction) in the shortest time (see Figure 6).
B Pb The name given to this curve is the brachistochrone, which comes from
the Greek brachystos, meaning shortest, and chronos, meaning time. If the
y
y-axis is vertical, and the two given points at the ends of the wire are
Figure 6 A bead sliding Pa = (0, 0) and Pb = (b, B), and the particle starts from rest, then it can
from point Pa to point Pb be shown that the time taken along the curve y(x) is
Z bs
1 1 + (y ′ )2
T [y] = √ dx, y(0) = 0, y(b) = B, (9)
2g 0 y
where g is the magnitude of the acceleration due to gravity. The map T is
a functional of the wire shape y(x): it maps functions y(x) to the times
taken for beads to descend them. The problem then is to find the function
y(x) that minimises T .
In Subsection 5.2 we will derive the functional T and obtain the equations
for the brachistochrone, the curve that minimises T . The curve turns out
to be a segment of a cycloid, which is the curve traced out by a point on
the rim of a circular wheel rolling in a straight line (see Figure 8).
16
2 Some examples of functionals
a b x
Soap films
Many of us will have created soap film bubbles by dipping a loop of wire
into soap solution and blowing on it. It transpires that there is a close
connection between soap film surfaces and problems in the calculus of
variations.
To a good approximation, a soap film will try to minimise its surface area,
consistent with any wire boundary that contains it; it does this because it
wants to minimise its energy, which is proportional to its surface area.
17
Unit 5 Introduction to the calculus of variations
For example, a soap film supported by a circular loop of wire will be a flat
circular disc.
The minimal surface of revolution can be created by dipping a pair of wire
hoops into a soap solution, and gently pulling them apart. The soap film
will be suspended between the two hoops, and the surface that it forms
will be the ‘minimal surface of revolution’, as shown in Figure 9.
x The function y that minimises this functional, subject to the length of the
−a 0 a
curve
Z ap
Figure 11 The catenary
formed by a uniform chain L= 1 + (y ′ )2 dx
hanging between two points −a
at the same height remaining constant, is the shape assumed by the hanging chain.
18
3 Reminder about partial and total derivatives
19
Unit 5 Introduction to the calculus of variations
We can check that this expression gives the right result for particular
choices of y(x). For example, suppose that y = x3 ; then it follows that
y ′ = 3x2 and y ′′ = 6x. Substituting these values into the formula
F (x, y, y ′ ) = xy 2 + 3y ′ gives
dF
F (x, x3 , 3x2 ) = x7 + 9x2 , = 7x6 + 18x.
so
dx
On the other hand, equation (13) gives
dF
= (x3 )2 + 2x(x3 )(3x2 ) + 18x = 7x6 + 18x,
dx
so the two methods for finding the total derivative agree.
Here are a few exercises for you to try.
Exercise 4
p
Let F = x y 2 + (y ′ )2 , where y and y ′ are functions of x.
∂F ∂F ∂F dF
(a) Find , and ′
, and hence find .
∂x ∂y ∂y dx
dF
(b) If y = sin x, then find by
dx
(i) substituting y = sin x into the formula for F and differentiating
(ii) using the result from part (a).
Exercise 5
p
For the function F = x2 + y(y ′ )2 , where y and y ′ are functions of x, find
∂F ∂F ∂F dF
, , and .
∂x ∂y ∂y ′ dx
Exercise 6
For the function F = x2 y 3 , where y is a function of x, find
∂F ∂F dF
, and .
∂x ∂y dx
Also, show that
d ∂F ∂ dF
= .
dx ∂y ∂y dx
The formula
d ∂F ∂ dF
=
dx ∂y ∂y dx
established in Exercise 6 is valid for any sufficiently well-behaved function
F (x, y), where y is a function of x.
20
4 Euler–Lagrange equation
4 Euler–Lagrange equation
In this section we extend the analysis of Subsection 1.2 to find the
stationary paths of more general functionals. In particular, we derive the
Euler–Lagrange equation, which is the main result of this unit. The
importance of the Euler–Lagrange equation is that it can be used to find
stationary paths of a wide class of functionals without going through the
type of analysis that we performed in Subsection 1.2.
21
Unit 5 Introduction to the calculus of variations
22
4 Euler–Lagrange equation
But g(a) = g(b) = 0, so the first term on the right-hand side vanishes, and
the rate of change of the functional becomes
Z b
d ∂F d ∂F
S[e
y ] = g(x) − g(x) dx
dε ε=0 a ∂y dx ∂y ′
Z b
d ∂F ∂F
=− g(x) − dx. (16)
a dx ∂y ′ ∂y
If S[y] is stationary, then by definition this integral vanishes for all
functions g(x). Because g is arbitrary, this can occur only if
d ∂F ∂F
′
− = 0, y(a) = A, y(b) = B. (17)
dx ∂y ∂y
23
Unit 5 Introduction to the calculus of variations
Euler–Lagrange equation
The functional
Z b
S[y] = F (x, y, y ′ ) dx, y(a) = A, y(b) = B, (18)
a
has stationary paths that are given by solving the Euler–Lagrange
equation
d ∂F ∂F
′
− = 0, y(a) = A, y(b) = B. (19)
dx ∂y ∂y
Example 2
Find the stationary path of the distance functional
Z bp
S[y] = 1 + y ′ (x)2 dx, y(a) = A, y(b) = B, (20)
a
considered in Section 1 (equation (2)).
Solution
Comparing equations (18) and (20), we see that the integrand is given by
p
F (x, y, y ′ ) = 1 + y ′ (x)2 .
To use the Euler–Lagrange equation, we need to calculate ∂F/∂y and
∂F/∂y ′ . The first thing to notice is that the integrand depends explicitly
only on y ′ , not on x or y. Therefore
∂F y′ ∂F
′
= p and = 0.
∂y ′
1 + (y )2 ∂y
Hence the Euler–Lagrange equation (19) becomes
!
d y′
p = 0. (21)
dx 1 + (y ′ )2
We could differentiate this to get a second-order differential equation for y,
which we could then solve by integration. However, equation (21) is
already in a convenient form to be integrated directly.
Integrating both sides of equation (21) with respect to x gives
y′
p = α, (22)
1 + (y ′ )2
for some constant α. This is identical to equation (6), which is the
equation that we derived in Subsection 1.2 for the stationary path. Its
solution (equation (7)), was shown to be
B−A Ab − Ba
y= x+ .
b−a b−a
24
4 Euler–Lagrange equation
Exercise 7
Consider the functional
Z b
S[y] = (y ′ )2 + y dx, y(0) = 0, y(1) = 2.
a
(a) Show that the stationary paths of this functional must satisfy
2y ′′ − 1 = 0, y(0) = 0, y(1) = 2.
(b) Solve this differential equation to show that the stationary path is
y = 14 x2 + 74 x.
Exercise 8
(a) Show that the Euler–Lagrange equation for the functional
Z X
S[y] = (y ′ )2 − y 2 dx, y(0) = 0, y(X) = 1,
0
where 0 < X < π, is
y ′′ + y = 0.
(b) Hence show that the stationary function is y = sin x/ sin X.
Exercise 9
(a) Show that the Euler–Lagrange equation for the functional
Z 1
S[y] = (y ′ )2 + y 2 + 2xy dx, y(0) = 0, y(1) = α,
0
where α is a constant, is
y ′′ − y = x.
(b) Hence show that the stationary function is
α+1
y= (ex − e−x ) − x.
e − e−1
25
Unit 5 Introduction to the calculus of variations
If, on the other hand, the integrand does not depend explicitly on x, so
that the functional has the form
Z b
S[y] = F (y, y ′ ) dx, y(a) = A, y(b) = B,
a
then it can be shown that the Euler–Lagrange equation (19) reduces to
∂F
y′ − F = c, y(a) = A, y(b) = B,
∂y ′
where c is a constant determined by the boundary conditions. We will
derive this equation in Exercise 12. The expression on the left-hand side of
the equation is called the first integral of the Euler–Lagrange equation.
26
4 Euler–Lagrange equation
Equations (23) and (25) are important because they both give rise to
first-order differential equations, whereas the most general form of the
Euler–Lagrange equation gives rise to a second-order differential equation
– and first-order equations are usually easier to solve than second-order
equations.
Exercise 10
Consider the functional
Z 2
S[y] = (ln y ′ + y) dx, y(1) = ln 2, y(2) = ln 3.
1
(a) Show that the first integral of the Euler–Lagrange equation is
dy
= αe−y , y(1) = ln 2, y(2) = ln 3,
dx
for some constant α.
(b) Hence show that the stationary function is y = ln(x + 1).
Exercise 11
Consider the functional
Z 1p
S[y] = y(1 + (y ′ )2 ) dx, y(−1) = y(1) = A,
−1
where A ≥ 1.
(a) Show that the first integral of the Euler–Lagrange equation for this
functional is
1p
y′ = y − k2 , y(−1) = y(1) = A.
k
(b) Hence show that the functional is stationary on the paths
x2 p
y(x) = h + , where h = 12 A ± A2 − 1 .
4h
Exercise 12
(a) Suppose that F (y, y ′ ) does not depend explicitly on x, so that
∂F/∂x = 0. Show that
d ′ ∂F ′ d ∂F ∂F
y −F =y − .
dx ∂y ′ dx ∂y ′ ∂y
(Hint: Evaluate the derivative on the left-hand side.)
(b) Hence show that equation (25) is true if either (i) y(x) satisfies the
Euler–Lagrange equation, or (ii) y(x) is constant.
27
Unit 5 Introduction to the calculus of variations
28
5 Applications of the Euler–Lagrange equation
h2
S
h1 θ1 θ2
R
x d−x
d
Figure 12 A light ray emitted from S, reflected at R, and observed at O
The principle of least time states that the path taken between two
points by a ray of light is the path that can be traversed in the least
time.
(Note that this principle is not quite correct; an amended statement
will be given shortly.)
This principle means that light will always travel in straight lines when it
passes through a single uniform medium like air, because it has a constant
speed, so the shortest distance is always the fastest time of passage.
However, light has different speeds in different media: for example, in a
vacuum the speed of light is c ≃ 2.9 × 108 m s−1 , whereas in water it is
cwater ≃ 2.25 × 108 m s−1 . (Note that the letter c is conventionally used to
denote the speed of light in vacuum. Take care not to get this mixed up
with any constants of integration that you introduce!) Generally, if the
speed of light in a uniform medium is cm , then we define the refractive
index of the medium to be the ratio n = c/cm ; so the refractive index of a
medium is just another way of characterising the speed of light that passes
through it.
29
Unit 5 Introduction to the calculus of variations
Fermat’s principle says that the path taken between two points by
a ray of light is a stationary path of the time functional (26).
In other texts, the phrase ‘principle of least time’ is used for the statement
that we call Fermat’s principle. Here we reserve the phrase ‘Fermat’s
principle’ for the correct statement about the path travelled by light rays.
For light travelling through a uniform material (i.e. n(x, y) = n, for some
constant n and all points (x, y)), the functional (26) is proportional to the
distance functional of Subsection 1.1. Therefore the stationary paths are
straight lines. For a general non-uniform medium, in which the refractive
index depends on the position, light rays follow curved paths. Mirages are
one consequence of a position-dependent refractive index, where light
passes through layers of air of differing temperature and therefore density,
leading to distorted images – see Figure 13.
30
5 Applications of the Euler–Lagrange equation
Air α1
N
α2
S′
Water
31
Unit 5 Introduction to the calculus of variations
Beach
Sea Help!
Example 3
Consider a layer of transparent medium with refractive index
√
n(x, y) = 4 y that is located in the part of the plane
given by 18 ≤ y ≤ 2.
Findthe path of a light ray from a source at −1, 54 to an observer at
1, 54 .
Solution
By Fermat’s principle, the light ray will be a stationary path of the
functional
Z
4 1p
T [y] = y(1 + (y ′ )2 ) dx, y(−1) = 54 , y(1) = 54 .
c −1
32
5 Applications of the Euler–Lagrange equation
Apart from the factor 4/c, this is exactly the functional of Exercise 11,
with the same boundary conditions if A = 54 .
From the solution to Exercise 11(b), the functional is stationary on the two
paths
x2 p
y(x) = h + , where h = 12 A ± A2 − 1 .
4h
As A = 54 , we see that h = 1 or h = 14 , so there are two solutions:
y+ (x) = 1 + 14 x2 and y− (x) = 1
4 + x2 .
y
2
−1, 54 1, 54
y+
1
1 y−
4
−1 0 1 x
Note that the paths of the light rays depend on the refractive index n, but
they do not depend on c, the explicit value of the speed of light in a
vacuum.
Here are some exercises for you to try.
Exercise 13
Show that the function
q q
f (x) = x2 + h21 + (d − x)2 + h22 ,
where h1 , h2 , x and d represent the distance measurements of Figure 12, is
stationary when θ1 = θ2 , where
x d−x
sin θ1 = p and sin θ2 = p .
x2 + h21 (d − x)2 + h22
Show that at this stationary value, f (x) has a minimum.
33
Unit 5 Introduction to the calculus of variations
Exercise 14
Consider a layer of transparent medium with refractive index given by
n(x, y) = 2/y that is located in the part of the plane given by 12 ≤ y ≤ 2.
(a) Use Fermat’s principle to show that the path of a light ray located
within this medium is described by the differential equation
dy 1 p
= 1 − k2 y 2 for 12 ≤ y ≤ 2,
dx ky
where k is a constant.
(b) Find the path of a light ray from source at (−1, 1) to observer at (1, 1).
O b x
(0, 0)
s(x)
1
(b, 1)
y
34
5 Applications of the Euler–Lagrange equation
The speed of the bead at the point P = (x, y(x)) is v = ds/dt. Let m
denote the mass of the bead. Then the kinetic energy of the bead at P is
1 2
2 mv , and the potential energy of the bead at that point is −mgy. (The
sign of the potential energy is negative because the y-axis points
downwards; we therefore expect potential energy to decrease as y
increases.)
The total energy E of the bead is the sum of its kinetic and potential
energies:
E = 12 mv 2 − mgy.
Initially, the value of E is 0, because the initial values of v and y are 0.
Moreover, because there is no friction, energy is conserved, so E is
always 0; that is,
1 2
2 mv − mgy = 0. (28)
As we saw earlier (Figure 3), small changes in s are given by
δs2 = δx2 + δy 2 , so
2 2 2
ds dx dy
= +
dt dt dt
2 2 , 2 !
dx dy dx
= 1+
dt dt dt
2
dx
= 1 + (y ′ )2 .
dt
Here we have used the fact that
dy dy dx
= ,
dt dx dt
by the chain rule. As v = ds/dt, we can write equation (28) as
2
dx
1
2m 1 + (y ′ )2 − mgy = 0.
dt
Rearranging this gives
2
dx 2gy
= .
dt 1 + (y ′ )2
Now, the time of passage from x = 0 (at time t = 0) to x = b (at time
t = T ) is given by the integral
Z T Z b Z bs
1 1 + (y ′ )2
T = dt = dx = dx.
0 0 dx/dt 0 2gy
Therefore the functional for the time taken for a bead to slide down the
wire with shape y(x), starting from rest at the origin, is
Z bs
1 1 + (y ′ )2
T [y] = √ dx, y(0) = 0, y(b) = 1. (29)
2g 0 y
35
Unit 5 Introduction to the calculus of variations
Exercise 15
Use equation (29) to show that the time taken for a particle of mass m to
slide down the curve y = x/b from rest at the origin to the point (b, 1) is
s
b2 + 1
T =2 .
2g
36
5 Applications of the Euler–Lagrange equation
37
Unit 5 Introduction to the calculus of variations
0 1 2 3 4 x
0.5
1.5
y
Figure 19 Graphs of the stationary paths joining the points (0, 0) and
(b, 1) for b = 0.2 (red), b = π/2 (black), b = 3 (blue) and b = 4 (green)
From the figure, we see that for small values of b, the stationary path is
close to that of a straight line, as you might expect. In fact, if b < π/2,
then the stationary path crosses the y = 1 line just once, at the terminal
point. For b > π/2, the stationary path crosses the y = 1 line twice. The
critical value of b, where the stationary path is tangential to the line y = 1
at its terminal point, occurs at b = π/2 (see Exercise 16(c) for a derivation
of this result).
Cycloid
A cycloid is the curve traced by a point on the rim of a circular
wheel as the wheel rolls along a straight line without slippage.
Figure 20 illustrates a cycloid.
y
θ
C B
r
O A D x
In this figure, a circle of radius r rolls along the x-axis, starting with
its centre on the y-axis. Fix attention on the point P attached to the
circle, initially at the origin O. As the circle rolls, P traces out the
cycloid through O, P and D.
38
5 Applications of the Euler–Lagrange equation
The cycloid has been studied by many mathematicians from the time
of Galileo (1564–1642), and was the cause of so many controversies
and quarrels in the 17th century that it became known as ‘the Helen
of geometers’ (a reference to ‘Helen of Troy’ from Greek mythology).
Galileo named the cycloid but had limited understanding of the
mathematics behind it. He did, however, suggest that it would make
an attractive arch for a bridge. This suggestion was implemented in
1764 with the building by James Essex (1722–1784) of Trinity College
Bridge, in the grounds of Trinity College, over the river Cam in
Cambridge, which has three cycloidal arches. The cycloid is still
occasionally used in architecture today. Other notable
mathematicians to have studied the cycloid include René Descartes
(1596–1650), Pierre de Fermat (1601–1665), Blaise Pascal
(1623–1662), Christiaan Huygens (1629–1695) and Christopher Wren
(1632–1723), the architect of St Paul’s Cathedral.
The equation of the cycloid is obtained by finding the coordinates
of P . In Figure 20, after the circle has rolled through an angle θ, the
length of the longer circular arc between P and A is rθ. Because
there is no slipping, OA = rθ also, so C has coordinates (rθ, r). Next,
by applying trigonometry to the triangle with vertices P , B and C,
we see that P B = −r cos θ and BC = −r sin θ, so P has coordinates
x = r(θ − sin θ) and y = r(1 − cos θ),
which together give the parametric equation of the cycloid. These are
identical to equation (30) if we make the transformation θ = 2φ and
r = c2 /2. So the shape of the brachistochrone has a simple geometric
interpretation: it is a segment of a cycloid.
Exercise 16
(a) Show that the gradient of the brachistochrone described by
equations (31) and (32) is
dy sin 2φ 1
= = .
dx 1 − cos 2φ tan φ
(Hint: Use the identities sin 2φ = 2 sin φ cos φ and
cos 2φ = 1 − 2 sin2 φ.)
(b) Deduce that at the origin (0, 0), the brachistochrone hangs vertically
downwards.
(c) Show that the critical brachistochrone, which is the brachistochrone
with parameter b that is tangent to the line y = 1 at its terminal point
(the black curve in Figure 19), satisfies b = π/2.
39
Unit 5 Introduction to the calculus of variations
Exercise 17
Consider the functional
Z 1p
S[y] = 1 + x + (y ′ )2 dx, y(0) = 0, y(1) = 1.
0
(a) Show that the function y(x) defined by the relation
p
y ′ = c 1 + x + (y ′ )2 ,
where c is a constant, makes S[y] stationary.
(b) By expressing y ′ in terms of x, solve this equation to obtain
(1 + x)3/2 − 1
y= .
23/2 − 1
40
5 Applications of the Euler–Lagrange equation
(b, B)
(a, A) δs
x x
δx
(a) (b)
Exercise 19 y (b, B)
(a) Show that the equation of the straight line joining the points (0, 0) and
(b, B) is
B (0, 0) x
y= x.
b
(b) Use equation (33) to show that the area of the cone (without a base)
shown in Figure 22 is
p Figure 22 Cone of height b
S = πB b2 + B 2 . and base radius B, base not
included
41
Unit 5 Introduction to the calculus of variations
42
5 Applications of the Euler–Lagrange equation
y y
y = cosh x y = arcsinh x
3
2 2
1
y = sinh x y = arccosh x
−2 −1 0 1 2 x −10 −5 0 5 10 x
−1
−2 −2
−3
(a) (b)
Figure 23 Graphs of: (a) cosh and sinh; (b) arccosh and arcsinh
43
Unit 5 Introduction to the calculus of variations
Rearranging, we obtain
x+k
y = y0 cosh . (35)
y0
The constants y0 and k can be determined using the boundary conditions
y(a) = A and y(b) = B. We will see that, depending on the values of a, A,
b and B, suitable solutions of the minimal surface of revolution problem do
not always exist, and that when they do, it may be necessary to carry out
further work in order to determine the nature of the stationary point.
(−L/2, 1) (L/2, 1)
44
5 Applications of the Euler–Lagrange equation
y0
1.0
0.848
0.5
0.235
0.5
yd
0.235
−0.5 −0.25 0 0.25 0.5 x
We see that yd has a steep profile, so the shape of the soap film is like a
dumbbell, while yc has a shallow profile, so the soap film approximates a
cylinder. These results were derived with L = 1, but they are typical for
other values L < 1.3255; solutions with smaller values of y0 (shown in red
in Figure 25) correspond to dumbbell-like solutions, and those with larger
values of y0 (shown in blue in Figure 25) correspond to cylinder-like
solutions. But which solutions corresponds to real soap films; that is,
which solutions have minimal surface area?
The areas of the cylinder-like and dumbbell-like solutions, as functions of
the distance L between the hoops, are plotted in Figure 28. You are asked
to reproduce this graph in Exercise 22. From the graph, we see that the
cylinder-like solutions always have smaller area than the dumbbell-like
solutions, so they give the shapes of soap films. It turns out that the
dumbbell-like solutions are not even local minima (they are points of
inflection), but the proof of this is beyond the scope of this module.
6 Goldschmidt
solution
Cylinder-like
2
0 0.5 1 L
1.3255
1.0554
Figure 28 Graph of the surface areas of the dumbbell-like, cylinder-like
and Goldschmidt solutions as functions of the distance L between the
hoops
46
5 Applications of the Euler–Lagrange equation
Notice that because the Goldschmidt solution is not a smooth function (it
is not differentiable at x = ±L/2), it cannot be obtained from the
Euler–Lagrange equation.
L L
(a) (b)
As we move the rings farther apart, and once L > 1.3255, there will no
longer be a minimal surface area that joins the two rings, and the soap film
will burst – either disappearing altogether, or assuming the Goldschmidt
solution shown in Figure 29(b), which is the minimal surface area solution.
For 1.0554 < L < 1.3255, the Goldschmidt solution exists and has the
smallest area. However, with these values of L, the cylinder-like solution
can exist, but it is only a local minimum, so small perturbations in the
shape of the cylinder give surfaces of larger area, but larger perturbations
in the shape of the cylinder can give rise to surfaces of smaller area.
We carried out the preceding analysis for circular hoops of radius 1. But
since we never specified any units in our problem, it should be clear that
this analysis carries through for hoops of any radius R, provided that we
scale all distances by the number R.
This relatively simple problem of finding the minimal area of a soap film
provides some idea of the possible complications that can arise in
variational problems.
47
Unit 5 Introduction to the calculus of variations
Exercise 20
Apply the boundary conditions y(−L/2) = 1, y(L/2) = 1, to the equation
x+k
y = y0 cosh ,
y0
which is equation (35), to deduce that k = 0.
(Hint: Use the identities
cosh(x + y) = cosh x cosh y + sinh x sinh y
and
cosh(x − y) = cosh x cosh y − sinh x sinh y.)
Exercise 21
As you have seen, the area of the soap film with hoops of unit radius
separated by a distance L is given by
Z L/2 p
′ 2
x
S[y] = 2π y 1 + (y ) dx, where y(x) = y0 cosh .
−L/2 y0
Show that
L L
S[y] = πy02 sinh + . (37)
y0 y0
(Hint: Use the identities
cosh2 x − sinh2 x = 1 and cosh2 x = 12 (cosh 2x + 1).)
48
5 Applications of the Euler–Lagrange equation
Soap films can form a variety of complex shapes with other boundary
conditions. For example, consider a cubical frame of wire dipped into
a soap solution and then taken out. Films of local minimum energy –
that is, minimum area – will form on this frame. It transpires that
the possible shapes formed are many and varied, and they are often
counter-intuitive. Some of the possible shapes are shown in Figure 31.
These examples illustrate the fact that there may be more than one
minimal surface with the same boundary conditions. They also
demonstrate that some physical problems that are simple to state can
have bizarre solutions, which are difficult to describe mathematically.
49
Unit 5 Introduction to the calculus of variations
50
Unit 5 Introduction to the calculus of variations
Solutions to exercises
Solution to Exercise 1
(a) On this straight line y = 0, so the value of the functional is
Z 1
√ 1
S[y] = 1 + 0 dx = x −1 = 1 − (−1) = 2.
−1
√
(b) As y = 1 − x2 , we have
dy x
= −√ ,
dx 1 − x2
so the value of the functional is
Z 1r Z 1
x2 1
S[y] = 1+ 2
dx = √ dx.
−1 1 − x −1 1 − x2
Using the standard integral given in the hint, we obtain
1 π π
S[y] = arcsin x −1 = − − = π.
2 2
Solution to Exercise 2
(a) If y = x, then y ′ = 1 and the functional is
Z 1
S[y] = dx = 1.
0
Z 1
S[y] = 9 x4 dx = 95 .
0
Solution to Exercise 3
(a) In this case the endpoints (a, A) and (b, B) of the paths satisfy
a = 1, A = 0 and b = 2, B = 1, so
Z 2
S[y + εg] = x((y + εg)′ )2 dx
1
Z 2
= x(y ′ + εg ′ )2 dx.
1
To find the stationary function, we use equation (4), giving
Z 2
d d
S[y + εg] = x(y + εg ) dx
′ ′ 2
.
dε ε=0 dε 1 ε=0
The integration limits 1 and 2 are independent of ε, so the order of
integration and differentiation can be interchanged using Leibniz’s
integral rule. This gives
51
Solutions to exercises
Z 2
d d
S[y + εg] = ′ ′ 2
x(y + εg ) dx
dε ε=0 1 dε ε=0
Z 2
=2 (xg ′ (y ′ + εg ′ ))|ε=0 dx
1
Z 2
=2 xy ′ g ′ dx.
1
If S[y] is stationary, then it follows, by definition, that
Z 2
x y ′ (x) g ′ (x) dx = 0
1
for all functions g(x) for which g(1) = g(2) = 0.
To solve this equation, we integrate by parts:
Z 2 Z 2
′
2
u(x) g (x) dx = u(x) g(x) 1 − u′ (x) g(x) dx,
1 1
′
with u = xy . However, the first term on the right-hand side vanishes
because g(1) = g(2) = 0, so we get
Z 2
′
(xy ′ ) g(x) dx = 0.
1
′
This integral can vanish only if (xy ′ ) = 0, which gives
x y ′ (x) = α,
where α is a constant.
(b) The equation xy ′ = α is separable and is equivalent to
dy α
= .
dx x
Integrating both sides with respect to x gives y = α ln x + β, where β
is a constant. But y(1) = 0, so β = 0, and y(2) = 1, so α = 1/ ln 2.
Therefore the required solution is y = ln x/ ln 2.
Solution to Exercise 4
(a) The partial derivatives are
∂F p ∂F xy ∂F xy ′
= y 2 + (y ′ )2 , =p , = p .
∂x ∂y y + (y ′ )2
2 ∂y ′ y 2 + (y ′ )2
The total derivative is therefore
dF ∂F ∂F ′ ∂F ′′
= + y + ′y
dx ∂x ∂y ∂y
p xyy ′ xy ′ y ′′
= y 2 + (y ′ )2 + p +p
y 2 + (y ′ )2 y 2 + (y ′ )2
y 2 + (y ′ )2 + xyy ′ + xy ′ y ′′
= p .
y 2 + (y ′ )2
52
Unit 5 Introduction to the calculus of variations
Solution to Exercise 5
The partial derivatives are
∂F x ∂F (y ′ )2 ∂F yy ′
=p , = p , = p .
∂x x + y(y ′ )2
2 ∂y 2 x2 + y(y ′ )2 ∂y ′ x2 + y(y ′ )2
The total derivative is
dF ∂F ∂F ′ ∂F ′′
= + y + ′y
dx ∂x ∂y ∂y
x (y ′ )3 yy ′ y ′′
=p + p +p .
x2 + y(y ′ )2 2 x2 + y(y ′ )2 x2 + y(y ′ )2
Solution to Exercise 6
The partial derivatives are
∂F ∂F
= 2xy 3 and = 3x2 y 2 ,
∂x ∂y
and the total derivative is
dF ∂F ∂F ′
= + y = 2xy 3 + 3x2 y 2 y ′ .
dx ∂x ∂y
d ∂F ∂F
Now, is the total derivative of , which itself is a function of
dx ∂y ∂y
x and y. Hence
d ∂F ∂ ∂
= (3x2 y 2 ) + y ′ (3x2 y 2 ) = 6xy 2 + 6x2 yy ′ .
dx ∂y ∂x ∂y
Also, using the expression above for dF/dx, we obtain
∂ dF
= 6xy 2 + 6x2 yy ′ .
∂y dx
53
Solutions to exercises
Solution to Exercise 7
(a) With the notation of equation (18), the integrand is given by
F (x, y, y ′ ) = (y ′ )2 + y,
with a = 0, b = 1 and A = 0, B = 2. As
∂F ∂F
= 2y ′ and = 1,
∂y ′ ∂y
the Euler–Lagrange equation (19) is
2y ′′ − 1 = 0, y(0) = 0, y(1) = 2.
(b) The differential equation can be written as
y ′′ = 12 ,
which can be solved by direct integration. Integrating both sides with
respect to x gives y ′ = 21 x + c, and integrating again gives the general
solution
y = 14 x2 + cx + d,
where c and d are constants. As y(0) = 0, we see that d = 0. As
y(1) = 2, we see that 41 + c = 2, so c = 74 . Therefore the stationary
path is
y = 14 x2 + 47 x.
Solution to Exercise 8
(a) In this case F (x, y, y ′ ) = (y ′ )2 − y 2 , so
∂F ∂F
= 2y ′ and = −2y.
∂y ′ ∂y
This gives the Euler–Lagrange equation 2y ′′ − (−2y) = 0, or
equivalently,
y ′′ + y = 0.
(b) The equation y ′′ + y = 0 models a simple harmonic oscillator (see
Unit 2), and has general solution
y = A cos x + B sin x,
where A and B are constants determined by the boundary conditions.
As y(0) = 0, we see that A = 0. As y(X) = 1, we see that B sin X = 1,
so B = 1/ sin X. Therefore the stationary function is
sin x
y= .
sin X
54
Unit 5 Introduction to the calculus of variations
Solution to Exercise 9
(a) In this case F = (y ′ )2 + y 2 + 2xy, so
∂F ∂F
= 2y ′ and = 2y + 2x.
∂y ′ ∂y
This gives the Euler–Lagrange equation 2y ′′ − (2y + 2x) = 0, or
equivalently,
y ′′ − y = x.
(b) The equation y ′′ − y = x is a second-order inhomogeneous equation, of
the type that you studied in Unit 1. The solution is given by
y = yc + yp , where yc is the complementary function of the differential
equation, and yp is a particular integral.
The auxiliary equation is λ2 − 1 = 0, with solutions λ = ±1, so the
general solution of the homogeneous equation y ′′ − y = 0 is
yc = Cex + De−x , where C and D are constants.
The inhomogeneous part is the expression x, so to find a particular
integral we try yp = Ax + B. Substituting this into the differential
equation y ′′ − y = x gives −Ax − B = x. Comparing coefficients, we
see that A = −1 and B = 0, so yp = −x.
Therefore the general solution of the equation y ′′ − y = x is
y = Cex + De−x − x.
To find C and D, we use the boundary conditions. As y(0) = 0, we see
that C + D = 0, so y = C(ex − e−x ) − x. As y(1) = α, we see that
α = C(e − e−1 ) − 1. Thus
α+1
y= (ex − e−x ) − x.
e − e−1
If you are familiar with hyperbolic functions (a brief summary of their
properties is given in Subsection 5.3), then you can simplify this
expression for y. Since sinh x = 12 (ex − e−x ), we can write
sinh x
y = (α + 1) − x.
sinh 1
Solution to Exercise 10
(a) The integrand F (y, y ′ ) = ln y ′ + y does not depend on x, so it is valid
to find the first integral of the Euler–Lagrange equation. As
∂F/∂y ′ = 1/y ′ , we can use equation (25) to obtain
y′
− (ln y ′ + y) = c,
y′
for some constant c. Rearranging this equation, we get
ln y ′ = 1 − c − y.
55
Solutions to exercises
hence
ey = αx + β.
Taking the logarithm of both sides gives
y = ln(αx + β).
The boundary conditions tell us that
ln(α + β) = ln 2 and ln(2α + β) = ln 3;
that is, α + β = 2 and 2α + β = 3. Therefore α = β = 1. It follows
that the stationary function is
y = ln(x + 1).
Solution to Exercise 11
p
(a) The integrand F (y, y ′ ) = y(1 + (y ′ )2 ) does not depend explicitly
on x, so it is valid to find the first integral of the Euler–Lagrange
equation. We obtain
√ ′ 2 p
∂F y(y )
y′ ′ − F = p − y(1 + (y ′ )2 ) = k,
∂y 1 + (y ′ )2
for some constant k. Simplifying this gives
r
y
= −k.
1 + (y ′ )2
Now square both sides to obtain
y
(y ′ )2 = 2 − 1,
k
so
r
′ y 1p
y =± − 1 = y − k2,
k2 k
where in the final expression we have absorbed the factor of ±1 into
the constant k, which could be positive or negative (but not zero).
56
Unit 5 Introduction to the calculus of variations
Solution to Exercise 12
(a) Evaluating the derivative on the left-hand side, we obtain
d ′ ∂F ′′ ∂F ′ d ∂F dF
y −F =y +y − .
dx ∂y ′ ∂y ′ dx ∂y ′ dx
Now,
dF ∂F ∂F ′ ∂F ′′ ∂F ′ ∂F ′′
= + y + ′y = y + ′y ,
dx ∂x ∂y ∂y ∂y ∂y
because ∂F/∂x = 0. Combining these two equations, we find that
d ∂F d ∂F ∂F
y′ ′ − F = y′ − ,
dx ∂y dx ∂y ′ ∂y
as required.
(b) The right-hand side of the preceding equation is zero if either (i) y(x)
satisfies the Euler–Lagrange equation
d ∂F ∂F
− = 0,
dx ∂y ′ ∂y
or (ii) y(x) is constant (so that y ′ (x) = 0). In both cases, we can
integrate to obtain
∂F
y′ − F = c,
∂y ′
for some constant c. This is the first-order differential equation of
equation (25).
57
Solutions to exercises
Solution to Exercise 13
The derivative of f (x) is
x d−x
f ′ (x) = p −p .
x2 + h21 (d − x)2 + h22
However, from Figure 12 we have
x d−x
sin θ1 = p and sin θ2 = p .
x2 + h21 (d − x)2 + h22
It follows that
f ′ (x) = sin θ1 − sin θ2 .
Therefore the function f (x) is stationary when sin θ1 = sin θ2 , that is,
θ1 = θ2 . Furthermore, as
h21 h22
f ′′ (x) = + > 0,
(x2 + h1 )3/2 ((d − x)2 + h22 )3/2
2
Solution to Exercise 14
(a) From Fermat’s principle, the light ray will be a stationary path of the
functional
Z
2 b 1p
T [y] = 1 + (y ′ )2 dx, y(a) = A, y(b) = B.
c a y
As the integrand
2p
F = 1 + (y ′ )2
cy
does not depend on the independent variable x, we can use the first
integral of the Euler–Lagrange equation (see equation (25)) to obtain
(y ′ )2 1p
p − 1 + (y ′ )2 = k,
y 1 + (y ′ )2 y
where k is a constant into which wep have absorbed the common factor
2/c.
p Multiplying throughout by y 1 + (y ′ )2 and simplifying gives
2
ky 1 + (y ) = −1. Then square both sides and solve for y ′ to obtain
′
r
dy 1
=± −1
dx k y2
2
1p
=± 1 − k2y2 .
ky
Because k is an arbitrary constant, which could be positive or negative
(but not zero), we can remove the factor ±1 to obtain
dy 1p
= 1 − k 2 y 2 , where 12 ≤ y ≤ 2.
dx ky
58
Unit 5 Introduction to the calculus of variations
y
2
x
−1 1
Solution to Exercise 15
As y = x/b, we have y ′ = 1/b, so
s s r
1 + (y ′ )2 1 + 1/b2 b2 + 1 1
= = √ .
y x/b b x
59
Solutions to exercises
Solution to Exercise 16
(a) Equation (31) says that
2φ − sin 2φ 1 − cos 2φ
x= and y = .
1 − cos 2φb 1 − cos 2φb
Therefore the gradient of the curve y = y(x) is
dy dy dx 2 sin 2φ 2 sin φ cos φ 1
= = = 2 = .
dx dφ dφ 2(1 − cos 2φ) 2 sin φ tan φ
(b) At the origin, we have x = y = 0, so φ = 0. Therefore tan φ = 0, which
implies that dy/dx is infinite, so the brachistochrone hangs vertically
downwards at (0, 0).
(c) The brachistochrone is parallel to the x-axis at points where the
gradient is 0, that is, when tan φ is infinite. This occurs only when
φ = π/2, in our range. At this value of φ, we have
π 2
x= and y = .
1 − cos 2φb 1 − cos 2φb
The brachistochrone terminates at (x, y) = (b, 1), so the critical
brachistochrone must satisfy
π 2
= b and = 1.
1 − cos 2φb 1 − cos 2φb
Dividing one equation by the other gives b = π/2, as required.
Solution to Exercise 17
(a) In this example
p the integrand of the functional has the form
F (x, y ) = 1 + x + (y ′ )2 , and
′
∂F ∂F y′
=0 and = p .
∂y ∂y ′ 1 + x + (y ′ )2
Hence the Euler–Lagrange equation (19) becomes
!
d y′
p = 0.
dx 1 + x + (y ′ )2
Integrating both sides with respect to x gives
p
y ′ = c 1 + x + (y ′ )2 ,
for some constant c, as required.
60
Unit 5 Introduction to the calculus of variations
61
Solutions to exercises
Solution to Exercise 20
The boundary conditions give
2k + L 2k − L
y0 cosh = 1 and y0 cosh = 1.
2y0 2y0
Because cosh is an even function, it should be fairly clear that these
equations can be satisfied only if k = 0. However, let us establish this fact
algebraically.
Using the identity given in the hint with x = k/y0 and y = L/(2y0 ), we
obtain
y0 cosh(k/y0) cosh(L/(2y0)) + y0 sinh(k/y0) sinh(L/(2y0)) = 1,
y0 cosh(k/y0) cosh(L/(2y0)) − y0 sinh(k/y0) sinh(L/(2y0)) = 1.
Subtracting the second equation from the first gives
2y0 sinh(k/y0) sinh(L/2y0) = 0, which, because L > 0, can be true only if
y0 sinh(k/y0) = 0. As y0 is not zero, we see that sinh(k/y0) = 0, so k = 0.
Solution to Exercise 21
Observe that y ′ (x) = sinh(x/y0 ), so
Z L/2 s
x 2 x
S[y] = 2πy0 cosh 1 + sinh dx
−L/2 y0 y0
Z L/2
x
= 2πy0 cosh2 dx,
−L/2 y 0
where we have used the first identity from the hint. Now use the second
identity from the hint to obtain
Z L/2
2x
S[y] = πy0 cosh + 1 dx
−L/2 y0
L/2
y0 2x
= πy0 sinh +x
2 y0 −L/2
L L
= πy02 sinh + ,
y0 y0
where, to determine the last line, we have used the fact that sinh is an odd
function.
62
Unit 5 Introduction to the calculus of variations
Acknowledgements
Grateful acknowledgement is made to the following sources:
Figure 9:
c Soapbubble.dk. This file is licensed under the Creative
Commons Attribution-Noncommercial Licence
http://creativecommons.org/licenses/by-nc/3.0.
Figure 13: Brocken Inaglory. This file is licensed under the Creative
Commons Attribution-Share Alike Licence
http://creativecommons.org/licenses/by-sa/3.0.
Every effort has been made to contact copyright holders. If any have been
inadvertently overlooked, the publishers will be pleased to make the
necessary arrangements at the first opportunity.
63
Index
Index
action, 32 Leibniz, Gottfried Wilhelm, 17
angle of incidence, 28 Leibniz’s integral rule, 11
angle of reflection, 28 light ray, 28
64