Sie sind auf Seite 1von 22

The Calculus of Variations

Jim Emery

Edited: 12/2/2013

Contents
1 About the History of the Calculus of Variations. 2

tial Equation 8

4 The Multiple Variable Case 9

5 The Catenary 10

lem. 11

8 Dispersion 14

Equations 14

10 Geodesics 14

scent Time 15

12 The Finite Element Method 15

1
13 Plateaus Problem, Minimal Surfaces 15

14 Emmy Noethers Theorem. 16

15 Problems 16
15.1 Coupled Oscillators Solved Using the Lagrangian . . . . . . . 16

16 Dirichlets Principle 17

17 Bibliography 17

18 Appendix A, Uniform Continuity, Compactness, and Differ-

entiating Under the Integral Sign 19

1 About the History of the Calculus of Vari-

ations.
The calculus of variations has a very long history stretching back to Fermat
(1601 or 1607 to 1665) and Newton (1642 to 1727).
See the book by Goldstine, A History of the Calculus of Variations:
from the 17th through the 19th Century, which is listed in the bibli-
ography and is in Linda Hall Library.
Goldstine takes as the beginning of the Calculus of Variations Fermats
Principle of least time in optics. So according to Fermat a light ray takes
a path through a medium where the velocity of light varies, in such a way,
that the time of travel of the ray is minimized. Fermat deduced what is now
called Snells law of refraction for the bending or refraction of light, as a ray
passes through an interface between two media. Fermats Principle can be
deduced mathematically from Huygens Principle of secondary waves.
According to Goldstine Newton has a certain variational minimization
problem that occurs in his principia, although the solution of this stated
problem was given without any derivation (I should look this up). In the
history of mathematics, often problems are posed and then sometimes solved,
but often not quite correctly. The solutions are improved over time as new
concepts and methods are introduced into mathematics. This makes such
history important and illuminating, showing how important mathematical
ideas were created.

2
2 The Simplest Problem
The most common problem of the Calculus of Variations is the one dimen-
sional problem of finding the extreme value of a functional consisting of the
integral of an expression involving a variable t, a function of f (t), and the
derivative of the function f 0 (t). The variation in the title is the variation of
the function over the interval of integration. This has some similarity to the
concept of the differential of a dependent variable considered as a function of
some independent variable about some fixed value of the independent vari-
able. So the minimum or maximum value of such a single function occurs at
the point where the differential or variation vanishes. This is the same point
where the derivative of the function vanishes. In the calculus of variations
it is a function acting as the independent variable, rather than a point
as independent variable in the case of elementary calculus. Such problems
occur in determining shortest path or geodesic in geometry, or least time in
optics, or the path of motion in mechanics.
Let us define the problem. Consider a class of functions defined on the
closed interval [t1 , t2 ] of the real line. These functions are to be in the class
C 2 [t1 , t2 ], meaning that the second derivatives are continuous. Let F be
a function of three variables so that its partial derivatives of order 2 are
continuous. We write Di F for the first partial derivative of F with respect
to the ith coordinate. That is for example if i = 2, then

F (x1 , x2 , x3 )
D2 F (x1 , x2 , x3 ) = .
x2
We are given a functional G(f ) defined by the integral
Z t2
G(f ) = F (t, f (t), f 0(t))dt
t1

This functional maps a function f to a real number, which is the value of

the integral.
The problem is to find a function f in the class C 2 [t1 , t2 ] that produces
an extreme value of the functional, either a minimum or a maximum.
We shall show below that a necessary condition for an extremum is that
the function f satisfy Eulers differential equation
d
D2 F (t, f (t), f 0(t)) [D3 F (t, f (t), f 0(t))] = 0.
dt

3
Let us put this in a somewhat more intuitive form. So suppose we use
the variables x, y, y 0 in the function F . So that we have F (x, y, y 0), where x
is our independent variable, y is a function of x and y 0 is the derivative of y,
also a function of x. Then Eulers equation for an extremum of the problem
above is
" #
F d F
= 0.
y dx y 0

In a certain sense this is more intuitive, but also is potentially mathemat-

ically confusing, because it contains a derivative with respect to a variable
y 0, but which appears to be a derivative of y, and so not an independent
variable. But the first Eulers equation clarifies the meaning.
Let us pause here to solve maybe the most simple problem of this type
using Eulers equation.

Problem . Find the curve that minimizes the distance between two points
in the plane.
We know of course, that the solution to this problem is the straight line
joining the two points. However, we shall find the solution as a solution to
Eulers equation in order to illustrate the method.
So suppose the curve is to pass through the points (x1 , y1 ) and (x2 , y2 ).
Suppose x1 is not equal to x2 . We calculate the distance between the points
with the integral Z x2 q
1 + y 02 dx.
x1

Note that the arclength increment we are using is

q q
ds = dx2 + dy 2 = 1 + (dy/dx)2dx.

Our function F (x, y, y 0) = 1 + y 02 .
So the Euler differential equation for this problem is
" #
F d F
= 0,
y dx y 0

which reduces to
" #
d F
= 0,
dx y 0

4
because here F is not a function of y.
So
F
=c
y 0
for some arbitrary constant c.
We have
F y0
=
y 0 1 + y 02
So
y0
= c.
1 + y 02
Squaring and simplifying we have
c
y0 = .
1 c2
Then integrating we have
c
y= x + b,
1 c2
or
y = mx + b,
which is the equation of a straight line, where constants c and b are cho-
sen to make the line pass through the given points (x1 , y1 ) and (x2 , y2 ).

Notice that m = c/ 1 c2 takes on all real values for 1 < c < 1.
Problem . Find the equation of motion for a particle under a central force
field, using the Lagrangian.
First let us write down the differential equation for this problem using
Newtons second law. We assume that there is a central force directed to the
origin of the coordinate system. Consider the motion of a particle of mass
m located at
r = xi + yj + zk.
The norm or length of this vector is
q
krk = x2 + y 2 + z 2

5
We also write this as r. A unit vector directed toward the particle is
r
ur =
r
We have for our differential equation of motion

d2 r ur
= 2 ,
dt 2 x + y2 + z2
which also can be written as
d2 r r
= 2 ,
dt 2 (x + y + z 2 )3/2
2

where we have assumed the constant multiplying the force on the left is 1 and
that the particle has mass 1. We do this in order to avoid carrying constants
along in all of the equations.
The component equations are

d2 x x
= ,
dt2 (x2 + y 2 + z 2 )3/2

d2 y y
= 2 ,
dt 2 (x + y + z 2 )3/2
2

and
d2 z z
= 2 .
dt 2 (x + y + z 2 )3/2
2

The Lagrangian in mechanics is

L= T V

where T is the Kinetic Energy and V is the potential energy. The curve of
motion is given as the curve that minimizes the integral of time of L. The
solution of this variational problem is a solution of the Euler equations, which
are called Lagranges equations in mechanics.
Again let a particle have mass 1. Let the position vector of the particle
be
r = xi + yj + zk

6
Suppose there is a central force inversely proportional to the distance to the
origin r = krk Then the potential energy is
1 1
V = = 2 .
r x + y2 + z2
The difference in potential energy between two locations is computed by
computing the work done in moving a particle between the locations. The
kinetic energy is
1
T = (x02 + y 02 + z 02 ).
2
So
1 1
L = (x02 + y 02 + z 02 ) + 2
2 x + y2 + z2
Lagranges equation for coordinate x is
" #
L d L
= 0.
x dt x0

L
= x(x2 + y 2 + z 2 )3/2
x

L
= x0
x0

" #
d L
= x00
dt x0

So our differential equation is

x
x00 = .
(x2 + y 2 + z 2 )3/2

This can also be written as

cos(x )
x00 = ,
r2
where cos(x ) is the direction cosine of r with respect to the x-axis.

7
That is the acceleration in the x direction is the component of the central
force in the direction of the x axis, which is just Newtons law.
The equations for y and z are similar. So we have just demonstrated here
that Lagranges equations are the Euler-Lagrange equations for the varia-
tional problem of minimizing the integral of L, and that these equations are
equivalent to Newtons second law fob this particular problem. In this special
case the differential equation is of course already known. In general the vari-
ational method can result in huge simplification of the mechanics problem
and often works so that forces of constraint need not be computed.

3 A Necessary Condition for an Extremum,

So consider our problem of finding the extremum (minimum or maximum)
of the functional
Z t2
G(f ) = F (t, f (t), f 0 (t))dt.
t1

Suppose that f does give the extremum. Let (t) be an arbitrary fixed
2
C function that vanishes at t1 and at t2 . Consider the function
Z t2
H() = G(f + ) = F (t, f (t) + (t), f 0(t) + 0(t))dt.
t1

The derivative of H is
dH()
=
d
Z t2
[D2 F (t, f (t)+(t), f 0(t)+ 0 (t))(t)+D3 F (t, f (t)+(t), f 0(t)+ 0 (t)) 0 (t)]dt.
t1
When is zero we get
dH(0) t2
Z
= [D2 F (t, f (t), f 0(t))(t) + D3 F (t, f (t), f 0(t)) 0 (t)]dt.
d t1

But at = 0 we have the original functional G(f ) at its extremal value,

because we have assumed the extremal value occurs for the function f . So
the derivative of H is zero at 0. Thus
Z t2
[D2 F (t, f (t), f 0(t))(t) + D3 F (t, f (t), f 0(t)) 0 (t)]dt = 0.
t1

8
We apply integration by parts to the second part of the integral
Z t2
[D3 F (t, f (t), f 0 (t)) 0 (t)]dt
t1

= D3 F (t, f (t), f 0(t))(t2 ) D3 F (t, f (t), f 0(t))(t1 )

d t2
Z
D3 F (t, f (t), f 0(t))(t)]dt
[
t1 dt

d
Z t2
= [ D3 F (t, f (t), f 0(t))(t)]dt,
t1 dt

because vanishes at t1 and t2 .

So we have
Z t2 d
[D2 F (t, f (t), f 0(t)) D3 F (t, f (t), f 0(t))](t)dt = 0.
t1 dt
But this forces
d
D2 F (t, f (t), f 0(t)) D3 F (t, f (t), f 0(t)) = 0,
dt
because (t) is an arbitrary function which could be selected to make the
integral nonzero if
d
D2 F (t, f (t), f 0(t)) D3 F (t, f (t), f 0(t))
dt
were not identically zero. This is Eulers equation.

4 The Multiple Variable Case

The problem of finding the extremum of
Z t2
G(u1 , u2 , ..., un ) = F (t, u1 (t), u01(t), ..., un (t), u0n (t))dt.
t1

is similar to the one dimensional problem given above.

We look at the variation

Ui (t) = ui (t) + i (t), i = 1, ...n,

9
where each i is an arbitrary C 2 function that vanishes at t1 and t2 . Then
we calculate the derivative
Z t2
H() = G(U1 , .., Un ) = F (t, U1 (t), U10 , ..., Un (t), Un0 )dt,
t1

in a manner similar to the one dimensional case above. We arrive at n Euler

equations
" #
F d F
= 0, i = 1, ..., n.
ui dt u0i

by setting H(0) = 0 as above in the one dimensional case.

To isolate the ith Euler Differential Equation we are free to choose each
function j to be identically zero when j is not equal to i.

5 The Catenary
The catenary is the curve that gives the shape of a hanging cable. The
catenary satisfies the differential equation

d2 y w ds 1q
= = 1 + (dy/dx)2,
dx2 T0 dx a
where the origin is at the lowest point of the catenary, the horizontal tension
there is T0 , w is the weight per unit length of the cable, and where the
catenary constant is
T0
a= ,
w
One finds that the solution of this equation is

y(x) = a cosh(x/a).

See Estimating the Parameters of a Catenary, by James Emery,

catenary.tex, catenary.pdf, 2003.

http://www.stem2.org/je/catenary.pdf

10
6 Example: A Catenary Solution for A Min-
imum Surface Problem.
Let a curve be rotated about the x axis generating a surface. With a fixed
starting point and a fixed ending point for the curve, what is the surface of
minimum area?
This is a problem that is given as an example in many books. The solution
is a catenary passing through the two fixed points.
The area of a surface of revolution about the x axis is
Z x2 Z x2 q
S = 2 yds = 2 y 1 + y 02 dx.
x1 x1

Ignoring the 2 we have

Z x2 q
S= y 1 + y 02 dx,
x1

where q
F (x, y, y 0) = y 1 + y 02
F q
= 1 + y 02
y

F yy 0
= .
y 0 1 + y 02
Eulers equation is
" #
q d yy 0
1+ y 02 = 0.
dx 1 + y 02

The expanded second term is

y 02 yy 00 yy 02y 00
+ .
1 + y 02 1 + y 02 (1 + y 02 )3/2

So Eulers equation becomes

q y 02 yy 00 yy 02y 00
1 + y 02 + = 0.
1 + y 02 1 + y 02 (1 + y 02 )3/2

11

Multiplying by 1 + y 02 , we have

yy 02y 00
1 + y 02 y 02 yy 00 + = 0,
1 + y 02
so
yy 02y 00
1 yy 00 + = 0.
1 + y 02
Multiplying by 1 + y 02 we have

1 + y 02 yy 00(1 + y 02 ) + yy 02y 00 = 0.

Then
1 + y 02 yy 00 = 0.
Let
dy
y0 =
dx

dy 0 dy 0 dy dy 0 0
y 00 = = = y
dx dy dx dy

y is a function of x, and y 0 is a function of x, so assuming that y has an

inverse, x is a function of y. Then y 0 is a function of y, so that

dy 0
dy
makes sense.
Substituting in the simplified Euler equation we found above we get

dy 0
yy 0 y 02 1 = 0
dy
we have
dy 0
yy 0 = y 02 + 1
dy

y 0dy 0 dy
= .
1+y 02 y

12
Integrating both sides we have
1
ln(1 + y 02 ) = ln(y) + c,
2
for some constant c. Then

So defining a new constant c1 by c = ln(c1 ), we get

" #
02 y2
ln(1 + y ) = 2 ln(y) 2 ln(c1 ) = ln 2 .
c1

Then
y2
1 + y 02 = .
c21

y 2 c21
y 02 =
c21
so q
0
y 2 c21
y =
c1
or
dy dx
q = .
y 2 c21 c1

Then
x
cosh1 (y/c1) = + c2
c1
and so

y = c1 cosh(x/c1 + c2 ).

Now constants c1 and c2 need to be determined numerically to make the

curve pass through the given points (x1 , y1) and (x2 , y2 ), if possible.

13
7 Optics, Path of Minimum Time
Fermats principle states that the path of a ray of light is the path that
minimizes the travel time. Fermat applied this idea to prove Snells law of
refraction, which does not of course require the Calculus of variations because
there is just a noncontinuous change in velocity at the interface between two
optical media. Huygens principle, which allows the construction of a new
wave front by assuming that each point of the previous front is a source of
spherical waves, implies Fermats principle.

8 Dispersion
In the optics case in a variable dispersive medium, the velocity of light may
vary continuously and so the calculus of variations is required to compute
ray paths

9 Mechanics, The Principle of Least Action

and Lagranges Equations
See James Emery Mechanics, mechanics.pdf, mechanics.tex.

http://www.stem2.org/je/mechanics.pdf

10 Geodesics
A geodesic is a curve of minimum length connecting two points. Geodesics
on a sphere are great circles. Geodesics are determined using variational ar-
guments. In general relativity, geometry is bent by mass-energy. Light takes
the path that is a geodesic in this bent Riemannian space-time geometry. So
for example one of the early verifications of general relativity was to observe
the bent path of light as it passed near the gravitational field of the sun.
This was done famously during a solar eclipse.

14
11 Example: The Brachystochrone, the Curve
of Minimum Descent Time
See James Emery, Brachystochrone, bra.pdf, bra.tex.

http://www.stem2.org/je/bra.pdf

12 The Finite Element Method

The Finite Element Method is a technique for solving certain partial differ-
ential equations numerically. It consists in breaking up the solution domain
into small elements which have node points that define an interpolation func-
tion inside the element. In a simple example the elements might be triangles
with the vertices as nodes. An interpolation function can be defined in the
element using values at nodes. An approximation to the solution of the par-
tial differential equation is computed inside the element using a variational
technique. Then the solutions in the elements are glued together giving a
solution to the entire boundary value problem.
See James Emery A Finite Element Current Flow Program, fec.tex,
fec.pdf

http://www.stem2.org/je/fec.pdf

(This document was written in 1980 originally, and has only partially been
converted to tex. The finite element program itself ran on a CDC computer
with limited memory, using an old version of a Fortran compiler that did not
support dynamic memory allocation. If I can find the time I will convert it
to a modern program. )

13 Plateaus Problem, Minimal Surfaces

Plateaus Problem is to find the surface of minimal area that has a given
closed curve as a boundary. Such surfaces are the shape of soap films obtained
by dipping a wire loop into a soap solution. See the entertaining lectures by
Boys given to children in the late nineteenth century Soap Bubbles and
the Forces that Mold Them available at the Project Gutenberg site.

15
14 Emmy Noethers Theorem.
(Emmy Noether 1882-1935, German pronunciation: em ee no ter, english
no ther, or, no eh ther) According to Noethers Theorem, symmetries of
the Lagrangian in physics imply certain conservation laws. This is widely
applied in particle physics. Noethers Theorem shows how symmetries of
the Lagrangian can be used to construct constants of the motion from the
Lagrangian. See chapter 5 of Analytical Mechanics by Hand and Finch.
This chapter is titled Noethers Theorem and Hamiltonian Dynamics. The
mathematics used is very nonrigorus in this treatment, which might make
a mathematician quite uncomfortable. For a more advanced treatment see
Chapter 4, of Mariano Giaquinta, Stefan Hildebrandt, Calculus of Varia-
tions I: The Lagrangian Formalism Volume I. The arguments used in
Noethers theorem are perhaps the source of the entry of Lie Groups into
physics. Emmy Noether is one of the great mathematicians of the 20th
century and pioneered much of modern Commutative Algebra. Noetherian
groups are named after her. Most mathematicians know her for the algebraic
work, and do not know her big influence on physics.
For example using this theorem applied to Quantum Mechanics, one can
establish the conservation of charge in particle physics.

15 Problems
15.1 Coupled Oscillators Solved Using the Lagrangian
See the section on coupled oscillators in Vibrations by James Emery (vi-
bra.pdf, vibra.tex).

http://www.stem2.org/je/vibra.pdf

Coupled oscillators are physically demonstrated in the Wilberforce Pen-

dulum, and in a pair of lightly coupled ordinary pendulums. The Wilberforce
pendulum consists of a weight suspended from a spring. The weight has two
modes of oscillation, an up and down motion, and a rotary motion. If the
spring and the mass are chosen carefully so that the moment of inertia of
the weight and its mass give nearly equal periods of vibration in the up
and down, and in the rotary motion, the pendulum will repeatedly switch
oscillation modes and energy, between translational and rotory motion.

16
16 Dirichlets Principle
Roughly speaking A solution of Laplaces equation in a bounded region C
is a minimum of the Dirichlet Integral. For example, in two dimensions a
solution is the function that minimizes the Dirichlet integral
" #2 " #2

Z
+ dxdy.
C x y

This is a two dimensional variational problem.

17 Bibliography
 Weinstock Robert, Calculus of Variations, Dover reprint, 1974.

 Wylie C. Ray, Advanced Engineering Mathematics, 4th Edition,

1975, McGraw-Hill.

 Sagan Hans, Introduction to the Calculus of Variations, McGraw-

Hill, 1969, Dover reprint, 1992.

 Hildebrand F. B. , Methods of Applied Mathematics, Prentice-Hall,

1952, 9th printing 1963.

 Young L.C. , Lectures on the Calculus of Variations and Optimal

Control Theory, 1969, W. B. Saunders Company.

 Caratheodory C., Variationsrechnung Teubner, Berliin and Leipzig,

1935. (English Translation, R. B. Dean and J. J. Brandstatter: Calculus
of Variations and Partial Differential Equations of the First Order,
Holden-Day, 1965.)

 Mariano Giaquinta, Stefan Hildebrandt, Calculus of Variations I:

The Lagrangian Formalism, Springer, 1996, 2nd printing 2004, Chap-
ter 4, Emmy Noethers Theorem. (QA315 .G467 Linda Hall). (Volume 310,
Grundlehren Der Mathematischen Wissenschaften.)

17
 Goldstine Herman H, A History of the Calculus of Variations: from
the 17th through the 19th Century, Springer-Verlag, 1980, (QA315 .G58
Linda Hall).

Reinhold, 1969.

 Courant Richard and Hilbert David, Methods of Mathematical Physics,

Volumes I and II, 1937 Springer and 1953 Interscience, Chapt 4, Vol. I, Cal-
culus of Variations.

 Boys C V, Soap Bubbles and the Forces Which Mold Them,
Doubleday Anchor 1959, Originally three Lectures delivered at the London
Institution in December 1889 and January 1890. Available from Project
Gutenberg. The HTML file has very nice illustrations.

 Hand Louis N and Finch Janet D, Analytical Mechanics, Cambridge

University Press, 1998.

 Emery James, Optimization, (optimization.pdf, optimization.tex,) at

http://stem2.org/je/optimization.pdf

 Kellogg Oliver Dimon, Foundations of Potential Theory, Dover 1953.

18
 Oden J T, Reddy J N, Variational Methods in Theoretical Me-
chanics, Springer-Verlag, 1970.

 Lanczos Cornelius, The Variational Principles of Mechanics, Fourth

Edition, Toronto University Press, 1970, Dover reprint 1986.

 Goldstein Herbert, Classical Mechanics, Addison-Wesley, 1950, 7th

printing, 1965, (there is a second and third edition).

 Abraham Ralph and Marsden Jerrold E, Foundations of Mechanics,

Benjamin/Cummings 1978.

Wesley.

 Flanders, Harley (JuneJuly 1973). Differentiation under the inte-

gral sign, American Mathematical Monthly 80 (6): 615627.

18 Appendix A, Uniform Continuity, Com-

pactness, and Differentiating Under the
Integral Sign
Definition. A real function defined on set A is uniformly continuous if given
any  > 0 there exists a > 0 independent of any x0 A and x A, so that
for any x A and x A, such that

|x x0 | < ,

then
|f (x) f (x0 )| < .

19
Example. Consider the function f (x) = 1/x defined on (0, 1]. Notice that
as x approaches 0, the slope of f (x) becomes arbitrarily large. So given any
 > 0, a pair of points x and x0 can be chosen near zero so that for any > 0,
no matter how small,

|x x0 | < ,

but
|f (x) f (x0 )| > .
So this function f (x) is not uniformly continuous on (0, 1], although it is
continuous everywhere on (0, 1].
However, if f (x) is continuous and A is a compact set then f (x) is uni-
formly continuous. We wont take the time here to introduce the concept
of compactness, except to say that a closed interval on the real line, and a
closed rectangle in the plane are compact sets. The reader is directed to a
book on Analysis, such as the book in the bibliography by Goldberg, or to a
book on Topology.

In deriving the necessary condition for a minimum above we differentiated

under the integral sign. We will justify this below. Here are some references
concerning differentiating under the integral sign:

Apostol Tom M. , Mathematical Analysis, Second Edition, 1975, Addison-

Wesley, section 10.16.

Widder David V, Advanced Calculus, 2nd Edition, 1961, Pentice-Hall,

Chapter 10, article 7.2.

Flanders, Harley (June-July 1973). Differentiation under the integral

sign, American Mathematical Monthly 80 (6): 615627.

Note. The section on differentiation under the integral sign in Apostol uses
the Lebesgue Integral.

Theorem. Differentiating Under the Integral Sign. Consider the integral

20
Z b
F (x) = f (x, t)dt.
a

If f (x, t) and its derivative

f
f1 (x, t) =
x
are continuous on the closed rectangle [a, b] [c, d], then F is differentiable
on the closed interval [a, b]. The derivative is

dF b
Z
= f1 (x, t)dt,
dx a

Proof. The derivative of F is the limit as h 0 of

F (x + h) F (x) Z b f (x + h, t) f (x, t)
= dt.
h a h
By the mean value theorem the integrand on the right can be written as

f (x + h, t) f (x, t)
= f1 (
x, t),
h
where x is strictly between x and x+h, and depends upon t. x can be written
as
x = x + h,
where 0 < < 1, and again depends on t. So we can write

F (x + h) F (x) Z b Z b
f1 (x, t)dt = [f1 (x + h, t) f1 (x, t)]dt.
h a a

Then

F (x + h) F (x) Z b Z b
f1 (x, t)dt |f1 (x + h, t) f1 (x, t)|dt.

h

a a

f1 is continuous on the compact rectangle [a, b] [c, d], so uniformly con-

tinuous there.

21
So given  > 0 there exists a > 0 so that if |x1 x| < , then

So if |h| < then

F (x + h) F (x) Z b Z b Z b
f1 (x, t)dt |f1 (x+h, t)f1 (x, t)|dt < /(ba)dt = ,

h

a a a

22