112a Notes 1415
112a Notes 1415
112a Notes 1415
Multi-variable Calculus
Lecture notes and Workbook for 4CCM112A
Dr Sakura Schafer-Nameki
Kings College London
CONTENTS
Contents
1 Introduction
1.1
Course outline
7
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 Functions R Rn
10
10
2.1.1
12
2.1.2
Parameterisations of curves . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
2.2
Differentiation of paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
2.3
Tangent Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
2.4
24
2.5
26
2.1
3 Functions Rm R
31
3.1
31
3.2
Directional derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
3.3
Partial derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
3.4
45
3.5
46
3.5.1
50
3.6
. . . . . . . . . . . . . . . . . . . .
51
3.7
53
3.8
57
4 Functions Rm Rn :
63
63
66
68
69
4.2.1
Level surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
69
4.2.2
Level Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
76
4.3
Vector Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
77
4.4
78
4.1.1
4.1.2
4.2
CONTENTS
4.5
80
4.6
Identities for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
82
4.7
83
4.7.1
83
4.7.2
83
4.8
Miscellaneous exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
84
4.9
86
90
5.1
90
5.2
94
97
6.1
. . . . . . . . . . . . . . . . . . . . . . .
6.2
6.3
6.4
FTC I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
97
110
7.1
7.2
7.3
7.4
7.5
131
8.1
8.2
8.3
8.4
8.5
8.6
8.7
156
9.1
9.2
9.2.2
9.3
9.4
CONTENTS
174
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
179
C Quadric Surfaces
180
D Proofs of theorems
184
CONTENTS
First of all the notes provide you will all the necessary material that is covered in the course.
This includes the main Definitions, Theorems, Examples and explanations of the mathematics
that I will cover during the lectures.
Workbook:
As the saying goes Mathematics is not a spectator sport, and the second component of
these notes serve the purpose of a workbook, which means, it gives you the opportunity to get
hands-on experience with the new material, by taking notes, drawing graphs, and working
through examples as you follow the lecture course. In particular, there are sections denoted
by Examples will usually be discussed in full detail in the lectures, and you can access
the solutions every week.
Finally, you will find sections denoted by Exercises which will be covered in the tutorials and
will give you the opportunity to practice on your own the new material. In addition, each week
you will receive an Assignment sheet, which puts together the Exercises. Printed solutions will be
available on the course page after they have been discussed in the tutorials.
If you spot typos, please report them to me by email. I hope these notes will be a useful component
to the course.
Chapter 1
Introduction
1.1
Course outline
Theorem 1.1.1 FTC: f is a continuous function on [a, b] and F is a primitive for f , i.e.
dF
dx
=f
INTRODUCTION
(ii) Derivatives
(iii) Integration:
Rb
a
f (x)dx = the (signed) area A between the graph of f and the xaxis
between x = a and x = b.
We will need analogous ideas and objects for the higher-dimensional versions of the FTC.
(i) Consider Functions f : Rm Rn . In this course we will restrict most or our attention to
the cases
m, n = 1, 2, 3 .
The case for general m, n is much the same, but just with more variables. Here are some
examples of such functions:
f : R1 R1 ,
x 7 x2 ,
f (x) = x2
r : R1 R2 ,
t 7 (t, t2 ),
r(t) = (t, t2 )
g : R2 R1 ,
c : R1 R3 ,
2
v:R R ,
3
(x, y) 7 x2 + y 2 ,
g(x, y) = x2 + y 2
v(x, y) = (y, x)
x = (x1 , x2 , , xm )
vector in R
f : Rm Rn
function
Exercise 1.1.2 Give examples of functions (different from those above) of functions f, g, r, v, h,
and u with
f : R1 R1 , g : R2 R1 , r : R1 R2 , v : R3 R3 , h : R3 R1 , u : R2 R5 .
(ii) Derivatives: Next we will need to define derivatives of such functions, in particular we will
need partial derivatives:
If : R3 R is a function (x, y, z) then we can define so-called partial derivatives
2 2
, etc
,
,
,
,
=
x y z x2 xy
x y
nb is not the same as d and marks will be deducted in the exam if you confuse the two.
(iii) Integration: Finally we will need multiple integrals eg
ZZ
f (x, y) dxdy
A
A double integral over a region A R2 , geometrically the volume between the surface
z = f (x, y) and the region A the xy plane
ZZZ
g(x, y, z) dxdydz
Derivative() =
V
where there are m integrals on the left hand side but only (m 1) on the right.
The FTC for a real function of a single variable f : R1 R1 is of this form
Z
Z
d
dx =
= (b) (a)
V =[a,b]R1 dx
{a}{b}=V
where the integral on the right hand side is so simple it is just a difference of two numbers
The generalisations for higher dimensional space sketched out above will be built up in the following
sections and chapters. With these at hand we will see how to understand and formulate the above
theorem rigorously in the cases: The generalisations we shall see are the great theorems of vector
calculus:
For flat surfaces, Greens Theorem, Theorem (7.5.1), Chapter 7.
For curved surfaces, Stokes Theorem, Theorem (8.6.1), Chapter 8.
For solid regions in R3 , Gauss Theorem or the Divergence Theorem, Theorem (9.4.1), Chapter 9
FUNCTIONS R RN
10
Chapter 2
Functions R Rn
In this chapter we will work out how to differentiate functions f : R1 Rn , with n = 2, 3, ....
The simplest way to visualise these functions is as geometric objects, curves in Rn , and so we start
with a discussion of curves and their representation in terms of functions.
2.1
11
FUNCTIONS R RN
12
2.1.1
We can think of a path as a map from a one-dimensional space (or an interval) to a vector-space
Rn and will refer to them therefore sometimes also as vector-valued functions.
Notice that the curve exists in an absolute sense, while a path is a choice of a specific function
which describes the curve. The same curve can be described by two different functions, for example
if C is the curve in R3 which is a circle of radius 1 lying in the xy-plane, then r and c both describe
C:
r : [0, 2] R3 , t 7 (cos(t), sin(t), 0)
c : [3, 5] R3 ,
t 7 (sin(2t), cos(2t), 0)
Note that r goes around the circle once, but c goes around the circle twice and in the opposite
direction.
In fact, there are infinitely many different paths which describe the same curve. For a simple
illustration, consider the paths ra (t) = (0, at) which (for a 6= 0) each describe the y-axis in the
xy-plane.
We need to be more restrictive in our choice of paths if we want to describe curves in a useful way.
That leads us to the idea of parametrisations.
Notes
13
Examples
Example 2.1.2 Sketch the curve defined by the path r : R1 R2 with
r(t) = (t, t2 ).
(2.1)
Example 2.1.3 Sketch the curve defined by the path r : [0, 2] R2 with
r(t) = (2 cos t, sin t).
Find a different path which defines the same curve.
(2.2)
FUNCTIONS R RN
14
Example 2.1.4 Sketch the curve r : R1 R3 with
r(t) = (cos t, sin t, t).
(2.3)
(2.4)
2.1.2
15
Parameterisations of curves
[a, b] which is one-to-one and onto. If C has infinite length, we can replace the interval [a, b] by
the infinite intervals [a, ), (, b] or (, ) as appropriate. If C is a simple closed curve, we
require r to be one-to-one except at the end points when r(a) = r(b).
Notes
FUNCTIONS R RN
16
Example 2.1.7 Which of the paths in the previous section are parametrisations?
(ii) The circle in the xz-plane in R3 of radius 4 with centre (0, 0, 0).
(2.5)
Notice that in (iii) the map x 7 y = y(x) does not define a parametrisation of the ellipse, just
one half of it.
17
In the first three of these examples C is a closed curve (that is, its starting point and finishing
point coincide so its a loop).
0t4 ,
and
(2.6)
FUNCTIONS R RN
18
Exercises
Exercise 2.1.10 Sketch the curves defined by the following paths.
(a) r : R1 R3 ,
r(t) = (2t 1, t, t + 3) .
(b) r : [0, 1] R2 ,
r(t) = (t, et ).
What is the relation of this path (and the curve which it defines) to the path:
c : [0, 1] R2 ,
c(s) = ( 1 s , e(1s) ) ?
(c) r : R1 R2 ,
(d) r : R1 R3 ,
2.2
19
Differentiation of paths
Before we discuss the generalization, it is worth taking a moment to recall what is meant by the
derivative of a (differentiable) function f : R1 R1 .
Definition 2.2.1
The derivative f (x) exists and is given by the following limit if and only if the limit exists
f (x + h) f (x)
h0
h
f (x) = lim
(2.7)
We can rewrite this in a way that will be useful later by introducing the notation o(h) which means
F (h)
=0
h
(2.8)
(2.9)
o(h) :
h0
Likewise h2 = o(h), h3 = o(h) but h 6= o(h), sin(h) 6= o(h). Using this notation we have an
equivalent definition of the derivative:
Definition 2.2.2
The derivative f (x) exists if and only if the following is true:
f (x + h) = f (x) + hf (x) + o(h)
(2.10)
We will use generalisations of this in section 2.4 to write Taylors theorem and in section 3.5 to
define the gradient of a function. For the moment we can just use definition 2.2.1 to define the
derivative of a path.
Definition 2.2.3 Given a path (or vector-valued function) r(t) : R Rn , the derivative of r with
respect to t is defined to be
r (t) = lim
h0
r(t + h) r(t)
.
h
x(t)
x
(t)
if r(t) =
then r (t) =
y(t)
y (t)
(2.11)
(2.12)
Notice that this coincides with usual derivative of a scalar function when n = 1.
We can also write this out in components using basis vectors i, j, k etc. For a path in R2 , if
r(t) = r1 (t)i + r2 (t)j
then
(2.13)
then
(2.14)
Similarly, in R3 if
20
FUNCTIONS R RN
Examples
Example 2.2.4 For the path r(t) = cos(t)i + sin(t)j (i) sketch the curve, (ii) calculate r (t) and
indicate r (t) on your sketch at the point where t = /4.
Example 2.2.5 For the path r(t) = (cos t, sin t, t) (i) sketch the curve, (ii)
Exercises
Exercise 2.2.6 For each of the following functions r(t) (i) sketch the curve (ii) calculate r (t) and
(iii) indicate r (t) on your graph at the point where t = 1.
(a) r(t) = cosh ti + sinh tj;
(b) r(t) = 3i + 5tj tk
2.3
21
Tangent Lines
In some cases, the derivative of a vector function has physical significance; for instance if r(t) is
the position vector of a moving point (with t measuring time) then r (t) is the velocity of the point
at time t, notice that this is a vector.
This must not be confused with the speed of the particle as it moves along C which is the scalar
function v(t) given by the length of the derivative r (t), v : R1 R1 , t 7 kr (t)k .
In components, if r(t) = x(t)i + y(t)j + z(t)k then
r (t) = x (t)i + y (t)j + z (t)k
and
||r (t)|| =
p
x (t)2 + y (t)2 + z (t)2
(2.15)
The derivative of a path also has a geometrical meaning. Let C be a simple curve traced out by
the path r(t) as t varies and let p C be a point on the curve. Then, since C is simple, there is
a unique t0 R1 such that p = r(t0 ). Geometrically r (t0 ) := r (t)|t=t0 is a tangent vector to C
at the point p = r(t0 ).
But notice, if we change the parametrisation of C, that is, if we choose a different function c(t)
which also traces out the curve C,then just as before, there is unique t1 R1 such that p = c(t1 ),
and c (t1 ) is a tangent vector to C at the point p = r(t0 ). But this need not be the same tangent
vector as r (t0 ) the two paths need not have the same velocity.
What will be true is that all the tangent vectors to a curve at a particular point lie on the same
line: there is whole line of tangents; a copy of R1 which touches C tangentially only at p. If C
is smooth at p, then the tangent line Tp C to C is, by definition, the space of all tangent
vectors to the curve at p. This coincides with the geometric idea of a tangent line.
If C is smooth at p C, and we choose a parametrisation r : R1 C Rn of C, we can use r (t)
to write down an explicit equation for the tangent line to the curve at the point p: The tangent
line can be parametrised as
l() = r(t0 ) + r (t0 )
(2.16)
Note that changing the parametrisation may change the equation of the tangent line but it always
defines the same line of course.
kak = a2 + b2 + c2 .
Important Task: Revise the ideas of the scalar (or dot) product for vectors in R2 or R3 , and
how one uses this to compute length of vectors, the angle between two vectors in appendix A.
Revise also the vector product of two vectors, and how this is used to compute the area of the
parallelogram defined by two vectors.
FUNCTIONS R RN
22
Examples
Example 2.3.1 Write down an equation for the tangent line at the point (0, 1, /2) to the standard
unit-radius helix (spiral) in R3 , using the two parameterisations
r : (0, ) R3 ,
c(s) : ( 12 , 12 ) R3 ,
c(s) = (2s,
p
1 4s2 , cos1 2s) .
Example 2.3.2 Let f : R1 R1 be differentiable. Write down an equation for the tangent line to
graph of f at a arbitrary point (determined by t). Check your answer with the function f (x) = ex
at the point (0, 1).
23
Exercises
Exercise 2.3.3 Sketch the curves defined by the following paths.
(a) r : [ 4 , 4 ] R2 ,
How does this path (and the curve which it defines) compare to the path:
c : [0, 2 ] R2 ,
(b) r : R1 R3 ,
c(s) = ( /4 s , tan(/4 s) ) ?
r(t) = ( sin(t) , 5 cos(t) , cos(2t) ) .
Exercise 2.3.4 Compute r (0) for each of the paths in exercise 2.3.3. Hence compute, in each
case, a parametric equation of the tangent line to the curve at r(0).
Exercise 2.3.5 Suppose that a = a1 i + a2 j + a3 k is a constant vector. Show that
d
dt a
= 0.
FUNCTIONS R RN
24
2.4
We can understand the derivative r (t0 ) as the first term in the Taylor expansion of r(t) around
t = t0 . Taylors Theorem tells us that provided the derivatives
r(k) (t) =
dk
r(t)
dtk
in R3
all exist, then we can approximate the, possibly very complicated, curve C traced out by r(t) using
simple polynomials; straight lines, parabolae, cubics, quartics, . . . .
The Taylor expansion to first order (2.10) generalized to paths, i.e. vector-valued functions is:
r(t + h) = r(t) + h r (t) + o(h) ,
(2.17)
h2
r (t) + o(h2 ) .
2
(2.18)
x
(t)
d2
r (t) := 2 r(t) =
y (t)
,
dt
z (t)
This gives us a quadratic approximation (in h) around r(t) C to the actual curve C, which will
be a better approximation than the linear approximation (2.17) obtained from computing just the
first-derivative.
25
Examples
Example 2.4.1 Compute the first-order and second-order Taylor expansions around the point
(0, 1) to the path
r : R R2 ,
r(t) = (t, et )
Example 2.4.2 Prove Equation (2.17) using the result Equation (2.10) for scalar functions in the
case of R2
FUNCTIONS R RN
26
2.5
There are product rules and chain rules for vector functions. (Chain rules are considered later,
in section 4.1.) Since there are three kinds of products (product of a vector by a scalar, scalar
product of two vectors, vector product of two vectors) there are three product rules but they are
all very similar.
Theorem 2.5.1 Suppose that r(t) is a vector-valued function and (t) : R R is a scalar func-
tion. Then
d ((t)r(t))
= (t)r(t) + (t)r (t)
dt
(2.19)
Proof: we can write the path out in components and use the product rule to differentiate each
component separately
Examples
Example 2.5.2 Differentiate the function r(t) = t2 (5ti + sin tj)
Example 2.5.3 Suppose that a and b are constant vectors. Differentiate the function r(t) =
et (a + 3b).
In both examples we could, of course, have obtained the same result by expanding out the product
and then differentiating.
Exercises
Exercise 2.5.4
(b) Differentiate r(t) = 3t2 a + cos tb with respect to t, given that a and b are constant vectors.
27
Theorem 2.5.5 Suppose that g(t) and r(t) are vector-valued functions. Then
d (r(t) g(t))
= r (t) g(t) + r(t) g (t)
dt
(2.20)
Proof:
we can use Taylors theorem Equation (2.17) and substitute this into the definition of the derivative,
Equation (2.7):
The following result, relating the derivative of a vector and the derivative of its length, is often
useful.
Proposition 2.5.6 Suppose that r(t) is a vector function and n(t) = |r(t)| the scalar function
(2.21)
FUNCTIONS R RN
28
Corollary 2.5.7 Suppose that r(t) is a vector of constant (non-zero) length. Then r (t) is perpendicular to r(t). In other words, if n = const then r r = 0. Provided r(t) 6= 0 then the converse
holds
Proof:
Proof of the converse: If r is perpendicular to r then r r = 0 nn = 0 and so either n = 0 (a
Examples
Example 2.5.8 Show that the vector r(t) = 3 cos ti + 3 sin tj has constant length.
Exercises
Exercise 2.5.9 Find r (t) for each of the following functions:
(a) r(t) = (i + tj) (3ti + 4j);
(b) r(t) = (a + tb) (c + tb);
Exercise 2.5.10 Suppose that a and b are perpendicular and of equal length. Show that
d ((a + tb) (ta + tb))
= 0 when t = 21 .
dt
(2.22)
If a is a vector then a or |a| is used to denote the length of a. It is important to remember that
a = |a| = a a.
Exercise 2.5.11 Find the time t (with 0 < t < /2) at which the length of the vector r(t) =
29
The third product theorem concerns vector products. Because the vector product is not commutative it is essential to write the factors in the correct order.
Theorem 2.5.12 Suppose that r(t) and g(t) are vector-valued functions. Then
d (r(t) g(t))
= r (t) g(t) + r(t) g (t)
dt
(2.23)
SUMMARY
Let r, g : R1 Rn be vector valued functions, and : R1 R1 a scalar function.
d (r(t) + g(t))
= r (t) + g (t)
dt
d ((t)r(t))
= (t)r(t) + (t)r (t)
dt
d (r(t) g(t))
= r (t) g(t) + r(t) g (t)
dt
d (r(t) g(t))
= r (t) g(t) + r(t) g (t)
dt
(2.24)
(2.25)
(2.26)
(2.27)
FUNCTIONS R RN
30
Exercises
Exercise 2.5.14 Prove Theorem (2.5.12)
Exercise 2.5.15 Find r (t) for each of the following functions:
(a) r(t) = (3ti + 2t2 j + k) (4t3 i + j + tk);
(b) r(t) = et a (a + tb);
Exercise 2.5.16 Show that
d (r(t) r (t))
= r(t) r (t).
dt
Exercise 2.5.17 Suppose that r(t), g(t) and h(t) are vector functions. Find an expression for the
derivative (with respect to t) of the scalar triple product (r(t)g(t))h(t) in terms of r(t), g(t), h(t), r (t), g (t)
and h (t).
31
Chapter 3
Functions Rm R
In this chapter we will study derivatives of scalar functions of several variables, that is functions
f : Rm R .
We start with functions of two variables and for these we can gain many insights by considering the
functions as defining a surface in R3 . This surface can be thought of as the graph of the function
in a way we make clear in the next section.
3.1
(3.1)
(3.2)
Thus, the case of f : R1 R1 this coincides with our usual idea of the graph: If f : R R, then
FUNCTIONS RM R
32
It is important for us to be able to get a good geometric understanding of the graph of scalar
functions and to be able to sketch them. For f : R2 R the graph is a two-dimensional subset of
R3 , for f : R3 R the graph is three-dimensional subset of R4 ! A useful too for scalar functions
in higher dimensions is to look at snapshots or slices of the graph.
Horizontal Slices
One of the means which may be used to deduce the shape of the graph of a function of one variable
is to look at a horizontal slice, or level set at height c: this just means the subset of R1
Sy=c = {x R1 | f (x) = c }
(3.3)
Equivalently Sy=c is the intersection of the graph of f and the horizontal line y = c, that is the
points of Graph(f ) at height c above the xaxis.
For example, for f = x2 , the slice Sy=2 = {x|x2 = 2} = { 2, 2} consists of two points.
We can try applying the same idea in the next dimension up when looking how to sketch the graph
of a function f : R2 R1 .
For such a function three axes, labelled x, y and z, are needed. The graph z = f (x, y) then
represents the function and looks like a curved 2-dimensional subset (a surface) of 3-space
Graph(f ) = { (x, y, f (x, y)) R3 | (x, y) R2 } R3 .
Notice that the z-coordinate z = f (x, y) tells us the height of the surface above the xyplane.
33
This is useful when we come to sketch the graph. Indeed, we can again look at a horizontal slice,
or level curve at height c: this just means the 1-dimensional subset of R2
Sz=c = {(x, y) R2 | f (x, y) = c }
(3.4)
Equivalently,
Sz=c = Graph(f ) (the plane z = c)
is the curve obtained by intersecting the graph of f with the horizontal plane z = c.
In fact, one way think of a surface (arising here as a graph) is as a union of curves: a sphere is a
collection of circles and a the hyperbolic paraboloid z = x2 y 2 is a collection of hyperbolae stacked
vertically
Vertial slices
We can also take vertical slices: this means the intersection of the graph of f with a vertical
plane: for example x = c a constant:
vert
Sx=c
= {(y, z) R2 | f (c, y) = z }
(3.5)
vert
Sy=c
= {(x, z) R2 | f (x, c) = z }
(3.6)
or for y = c a constant
In this way we build up a picture of what the graph of f looks like frame by frame. In this case
the hyperbolic paraboloid z = x2 y 2 is a collection of parabolae when sliced vertically:
34
FUNCTIONS RM R
Examples
Example 3.1.2 Sketch the graph z = f (x, y) for the functions f : R2 R1 with
(a) f (x, y) = x2 y 2 .
(b) f (x, y) = x2 + y 2 .
Note that apparently similar functions can, in fact, lead to dramatically different surfaces
Notice that the use of polar coordinates made sketching the surfaces easier here: we will be often
use different coordinate systems as we go along.
35
Once we know the general shape of a particular type of function it is often easy to deduce the
graphs of other functions which differ from it by just translations or a scaling of the variables
(x 7 ax, y 7 by), or simply by using our experience to quickly spot what they must be.
Example 3.1.3 Sketch the graphs of the following functions R2 R1
g(x, y) = 9 x2 y 2 ,
h(x, y) = 4x2 + 3y 2 ,
(i)
g(x, y) = 9 x2 y 2
(ii)
h(x, y) = 4x2 + 3y 2 .
p(x, y) = e(x
+y 2 )
(3.7)
FUNCTIONS RM R
36
(iii)
p(x, y) = exp(x2 y 2 )
2
Putting x = 0, the vertical slice Sx=0 = {(y, z)|z = ey } is the normal or bell curve. Since
(iv)
the surface is the standard paraboloid of revolution. Hence, in terms of x and y it is the standard
paraboloid of revolution shifted to lie over the point (2, 3, 0).
37
Exercises
Exercise 3.1.4 Try sketching the graphs z = f (x, y) of the functions
f (x, y) = xn + y n .
Use Maple to check your ideas. (Those for n = 2k even all look similar, as do all those for
n = 2k + 1 odd.)
Exercise 3.1.5 Find the curves obtained by horizontal and vertical slices of the following surfaces
and then sketch the surfaces. Check which surface they describe by comparing with the standard
quadrics in appendix C
(1)
x2 y 2 + z 2 = 1
(2)
x2 y 2 z 2 = 0
(3) x2 y 2 + z 2 = 1
(4)
x y2 + z 2 = 0
(5)
x y2 z 2 = 0
Exercise 3.1.6 By finding the curves obtained by computing some horizontal slices (set z = c for
various values of c) and vertical slices (e.g. set x = 0) sketch the graph of z = f (x, y), where:
(1)
z = x2
(2)
z = ex
y 2
FUNCTIONS RM R
38
3.2
Directional derivatives
Using our knowledge of how to differentiate paths, we now study derivatives of scalar-valued
functions in two and three dimensions. We do this by constructing curves in the graph of the
function. A curve in R2 gives a curve in the surface in R3 which is the graph of f . The simplest
curves in R2 are straight lines and these lead to the idea of directional derivatives.
Suppose we have a scalar function
f : Rm R1
(m = 1, 2, 3). Suppose we choose a fixed unit vector u Rm . This defines a direction, and one
can look at the rate of change of a function f (x) corresponding to changes in x in the direction of
u. This leads to the definition of the directional derivative:
Definition 3.2.1 If u is a fixed unit vector, the directional derivative f u (x) of the function f (x)
in the direction u is defined to be
f u (x) = lim
h0
f (x + hu) f (x)
.
h
(3.8)
39
Hence in two and three dimensions we have to say in which direction we are going to differentiate.
Once we have chosen a direction u Rm , this defines the path r(t) = x+ tu in Rm passing through
The last component of r(t), f (r(t)) = f r(t), is clearly a scalar function R R which can be
differentiated in the usual sense of a 1-variable scalar function (Calculus I). We have the important
identity
Lemma 3.2.2 The directional derivative of a scalar function f : Rm R in the direction u is
f u (x)
d
f (x + tu)
=
dt t=0
Proof:
d
f (x + (t + h)u) f (x + tu)
f (x + tu) = lim
h0
dt
h
t=0
= lim
t=0
h0
(3.9)
f (x + hu) f (x)
= f u (x)
h
Geometrically, the derivative of the path r(t) gives us a tangent vector to the surface Graph(f ).
The derivative r (0) is a tangent vector at the point r(0). We can find this tangent vector explicitly:
r : R Graph(f ) , t 7 (r(t), f (r(t))) = (x + tu, f (x + tu))
so the vector
d
r (0) = (u, f (x + tu) ) = ( u , f u (x) )
dt
t=0
is tangent to the curve C in the graph of F and hence is tangent to the whole surface.
(3.10)
FUNCTIONS RM R
40
Examples
=
=
(x + h/3)2 + (y + 2h/3)(z + 2h/3) x2 yz
f (x + hu) f (x)
= lim
h0
h0
h
h
2x 2y 2z 5
2
lim
+
+
+ h = (x + y + z)
(3.11)
h0
3
3
3
9
3
lim
(x + t/3) + (y + 2/3t)(z + 2/3t)
= (x + y + z) (3.12)
f u (x) =
f (x + tu)
=
dt
dt
3
t=0
t=0
Example 3.2.4 Compute all tangent vectors to the standard elliptic paraboloid (i.e. the graph of
z = x2 + y 2 ) at the point (1, 1, 2).
Firstly, (1, 1, 2) is the point (1, 1, f (1, 1)) so we need to consider directions u = (cos(), sin()) and
paths x + tu = (1 + t cos(), 1 + t sin()).
d
f (x + tu)
= 2(cos() + sin())
f (x + tu) = 1 + 2t(cos() + sin()) + t
dt
t=0
2
cos()
(u, f u (x)) =
sin()
1
0
= cos() 0 + sin() 1 .
2 cos() + 2 sin()
2
2
(3.13)
41
Definition 3.2.5 Let S be a surface in R3 , and suppose that S is smooth enough near p S. A
In example Example (3.2.4) the tangent vectors all lie in the plane spanned by (1, 0, 2) and (0, 1, 2).
This is true more generally, the tangent vectors to a surface at point (usually) span a plane called
the Tangent Plane which is defined as follows.
Definition 3.2.6 Let S be a surface in R3 , and suppose that S is smooth enough near p S. The
tangent plane (or just tangent space) to S at p is the 2-dimensional plane in R3 which is spanned
by all tangent vectors to S at p.
NB: Smooth enough near p S just means that all such derivatives exist.
We can find the equation of this tangent plane as follows:
Recall the plane through a with normal n is the set of points x satisfying (xa) n = 0.
Secondly, if v and w are two non-zero non-parallel vectors in a plane then n = v w is a
non-zero normal to that plane
(3.14)
c2 (t) =
(3.15)
f u1 (x)
f u1 (x0 )
n = c1 (0) c2 (0) =
f u2 (x0 )
(3.16)
(3.17)
or
(3.18)
FUNCTIONS RM R
42
Exercises
3.3
1
13 (3i
+ 4j + 12k).
Partial derivatives
When evaluating directional derivatives it is easier to use a rule than first principles. To write that
down we first need to introduce some other special cases of directional derivatives.
Although we can differentiate in any one of infinitely many different directions in Rm (m = 2, 3),
there are nevertheless the special directions defined by the coordinate axes given by taking u =
ei , i = 1, . . . , n; thus, in
R2 :
e1 =
1
e1 = 0
=i
0
R3 :
1
0
=i
e2 =
0
1
e2 = 1
=j,
0
=j,
e2 = 0
=k.
1
These preferred choices of directions give natural generalisations of the derivative in one dimension
and define the so-called partial derivatives of a function f : Rm R1 .
Definition 3.3.1 When it exists, the ith partial derivative
f :R
f
xi
of a scalar-valued function
R at x R , is defined by
f
:= f ei (x)
xi x
(3.19)
(When all the partial derivatives exist and are continuous we say that f is differentiable at x).
Equivalently:
f
d
=
f (x0 + tei )
.
xi
dt
t=0
(3.20)
43
f
x
the x-variable on its own, treating the y and z variables as constants; likewise,
f
y
is obtained by
differentiating with respect to the y-variable on its own, treating the x and z variables as constants
and so forth.
Examples
Example 3.3.2 Compute the partial derivatives of the functions R2 R1 defined by
(i) f (x, y) = x2 y + cos x
(ii) f (x, y) = ex log y +
(iii) f (x, y) = e(x
+y 2 )
44
FUNCTIONS RM R
3.4
45
y
)
.
0
x x0
y x0
+y 2 )
(3.21)
FUNCTIONS RM R
46
3.5
We have defined directional derivatives and partial derivatives but it would still be good to define
the derivative of a function of several variables. When we try to adapt the first definition of the
derivative of a scalar function to functions f : Rm R1 with m > 1 we find a problem: We
f (x + h) f (x)
since we cannot divide by a vector.
cannot define lim
h0
h
Instead, we can adapt the second definition to define a gradient vector field which plays the role for
scalar functions of several variables that the usual derivative plays for scalar functions of a single
variable.
Definition 3.5.1
(3.22)
where (h) means that the term is so small that even when divided through by |h| the result
still tends to zero as |h| tends to zero.
x 7 f (x)
(3.23)
(3.24)
As with ordinary differentiation, one usually uses rules rather than first principles to evaluate a
gradient. The key result is that f can be written very simply in terms of the partial deriviatives
of f :
47
Theorem 3.5.2
If f : R2 R1 has partial derivatives
f f
x , y
f
f
f =
i+
j=
x
y
Similarly, if f : R3 R1 has partial derivatives
f =
f
x
f
y
f f f
x , y , z
f
f
f
i+
j+
k=
x
y
z
(3.25)
f
x
f
y
f
z
(3.26)
FUNCTIONS RM R
48
Examples
Example 3.5.3 Calculate f for f : R2 R1 with f (x) = x2 y 2 , and, sketch the gradient
The following example is important in theoretical physics for describing electric or gravitational
fields:
Example 3.5.4 If r = xi + yj + zk and n = |r| : R3 R1 , so n(x) =
r
(n) =
n
r
1
= 3.
n
n
p
x2 + y 2 + z 2
, the
(3.27)
(3.28)
(3.29)
49
Exercises
Exercise 3.5.5 Use the definition to evaluate f if f (x) = xy + zx.
[Solution: f = (y + z)i + xj + xk]
Exercise 3.5.6 Compute f where f (x, y, z) = x2 + y 2 + z 2 . Use this to show that the formula
(3.29) is true for n = 2.
FUNCTIONS RM R
50
3.5.1
Let f : R2 R1 be differentiable at (x, y) R2 . Then the equation for the tangent plane (3.21)
at the point (x0 , y0 , z0 = f (x0 , y0 )) can be rewritten using the gradient of f as follows:
z = z0 + (x x0 ) f (x0 )
(3.30)
3.6
51
We can also use the gradient vector field to deduce a simple formula for calculating any directional
derivative:
Theorem 3.6.1 Suppose that f : Rm R1 is differentiable and suppose that u Rm is a unit
vector. Then
f u (x) = u f (x)
(3.31)
NB Notation for f u varies. You may find Du f (x), Lu f (x) or simply u f used as alternatives.
By definition, the directional derivative of a function f : Rm R1 in the direction u R3 tells us
The rate of change of the value of the function f in the direction u.
In particular using directional derivatives it is easy to see in which direction a function is changing
most, or least. First note that f u (x) is the component of f (x) in the direction of u.
rapidly in the direction of f (x) Rm and decreases most rapidly in the direction of
f (x) Rm .
FUNCTIONS RM R
52
Examples
Example 3.6.2 Show that the derivative of f (x) = x3 + sin(y + z) in the direction of i + j + k is
1 (3x2
3
+ 2 cos(y + z)).
p
1 (x2 + y 2 ) is increasing
most rapidly. Sketch the vector field f and the contours of constant f . (A two dimensional
example is used, because it can be visualised.)
In two examples, Example (3.5.3) and Example (3.6.3) we have seen here that the gradient vector
field is orthogonal to the level sets of a function f : Rn R1 ,. This is a general results and the
next two sections will enable us to explain why.
Exercises
Exercise 3.6.4 Use the result Equation (3.31) to check your answer to Exercise (3.2.7).
Exercise 3.6.5 Calculate f u (x) when u = (i + j)/ 2 and f (x) = 3x/(x y).
Exercise 3.6.6 Find the derivative of f (x) = x/y at the point P = (1, 3, 5) in the direction of
3.7
53
The mathematical version of this statement is equation (3.22) which is Taylors theorem to firstorder:
f (x + h) = f (x) + h f (x) + (h) ,
(3.32)
the first two terms the terms which are linear in h = (h, k) of which determine the tangent
plane, as stated in Proposition (3.4.1):
We can rewrite Equation (3.32) as
f (x) = f (x0 ) + (x x0 ) f (x0 ) + o(x x0 )
|
{z
}
This is the equation for the tangent plane
(3.33)
However, just as for functions of 1-variable, we can do better if we compute more derivatives. By
knowing f (x) = f (x, y) and some higher-order partial derivatives to f at x = (x, y) we can get a
polynomial approximation (in the variables h, k) to the value f (x + h) = f (x + h, y + k), which is
more accurate, this is Taylors Theorem to second-order. We restrict most of our attention here
to the case of 2-variables.
By higher-order partial derivative we just mean a partial derivative of a partial derivative provided they exist. That is, we can compute /x of f /z and so on:
2f
:=
xj xi
xj
f
xi
(3.34)
(3.35)
2f
,
xy
2f
,
y 2
2f
,
zy
2f
,
xz
2f
,
yz
2f
.
z 2
(3.36)
For brevity we often use the following alternative notation for partial derivatives using just a
subscript to f :
f
= fx ,
x
f
= fy ,
y
2f
= fxx ,
x2
2f
= fxy ,
xy
f
= fxi ,
xi
etc
etc
(3.37)
FUNCTIONS RM R
54
Examples
Example 3.7.1 Compute the second partial derivatives of the functions R2 R1 defined by
(i) f (x, y) = x2 y + cos x, (ii) f (x, y) = e(x
+y 2 )
Example 3.7.2 Compute the second partial derivatives of the function R3 R1 defined by
g(x, y, z) = x2 y 2 z 2 + z cos x.
In fact, as can be seen in the above examples, we only have to compute some of these derivatives
because of the following important property:
Partial derivatives commute :
2f
2f
=
,
xy
yx
or
fxy = fyx
(3.38)
This is not true for all functions, but is true for sufficiently smooth functions, in particular for
all the functions that will occur in this course.
Outline Proof: We use the definition of the partial derivative and assume that we can interchange
the order of the limits that arise.
f
1 f
2f
= lim
(x0 + h, y0 )
(x0 , y0 )
h0 h
xy
y
y
1
= lim lim
(f (x0 + h, y0 + k) f (x0 + h, y0 ) f (x0 , y0 + k) + f (x0 , y0 ))
h0 k0 hk
Assuming we can change the order of limits, this is
1
(f (x0 + h, y0 + k) f (x0 , y0 + k) f (x0 + h, y0 ) + f (x0 , y0 ))
lim lim
hk
f
1 f
(x0 , y0 + k)
(x0 , y0 )
= lim
h0 k
x
x
2f
(3.39)
=
yx
=
k0 h0
This is not always possible, but is the case for all smooth functions.
55
Theorem 3.7.3 (Taylors Theorem to 2nd order) Let f : R2 R1 have continuous first and
second order partial derivatives. Then there is the following expansion in h, k around x0 = (x0 , y0 )
f (x0 + h, y0 + k) =
f
f
(x0 , y0 ) + k (x0 , y0 )
x
y
2
2 2
f
h f
k2 2 f
(x
,
y
)
+
hk
(x0 , y0 )
+
(x
,
y
)
+
0
0
0
0
2 x2
yx
2 y 2
+o(khk2 )) ,
f (x0 , y0 ) + h
(3.40)
where the partial derivatives are all evaluated at x0 , and the remainder o(khk2 )) is a function such
that o(khk2 ))/(h2 + k 2 ) 0 as h, k 0.
If we collect the four second-order partial derivatives into the matrixm, which is sometimes called
the Hessian matrix,
Df (x0 , y0 ) :=
fxx (x0 , y0 )
fyx (x0 , y0 )
!
fxy (x0 , y0 )
fyy (x0 , y0 )
we can rewrite (3.40) in more compact way which naturally extends (3.32):
Taylor expansion to 2nd order: compact formulation
f (x + h) = f (x) + h f (x) + 12 h Df (x0 , y0 ).h + o(khk2 )
(3.41)
The Taylor expansion to first-order is precisely the equation for tangent plane we had earlier. The
second order expansion gives us a better approximation to the graph of the function using quadrics
(paraboloids, hyperboloids, . . . ). We can see this very explicitly by looking at one of the above
examples.
Proof:
FUNCTIONS RM R
56
+y 2 )
at (0, 0) .
3.8
57
In this section it is shown how maxima and minima of a function of two variables may be identified
by investigating the first and second partial derivatives of the function. The main idea is much
as with functions of a single variable - you may expect a maximum or minimum when the first
derivatives are zero, and the second derivatives may be used to determine whether there is a
maximum or minimum or (a new possibility, for which there is no analogue for a function of a
single variable) a saddle point. The first step is a careful definition of the notion of local maximum
and minimum.
Definition 3.8.1
(a) A function f (x, y) is said to have a local maximum at the point (a, b)
or equivalently
fx = fy = 0
(3.42)
FUNCTIONS RM R
58
Theorem 3.8.2 If f is differentiable and has a local extreme value at the point (a, b) then
f
f
(a, b) =
(a, b) = 0.
x
y
(3.43)
59
Example 3.8.3 Show that the function f (x, y) = 2x2 + 2xy + y 2 4x + 9 has a local minimum at
(2, 2).
Example 3.8.4 Consider f (x, y) = x2 4y 2 . Show that the point (0, 0) is a critical point of f ,
Near the critical point the graph of f has the shape of a saddle; such a critical point (which is
neither a maximum or a minimum) is called a saddle point.
FUNCTIONS RM R
60
In order to see how second partial derivatives may be used to determine whether a critical point is
a maximum, a minimum or a saddle point, it is easiest to start by considering quadratic functions
with critical points at the origin; such a function will take the form
f (x, y) = 21 Ax2 + Bxy + 12 Cy 2 + M,
(3.44)
2 f
(a, b) = B
xy
and
2 f
(a, b) = C.
y 2
(3.45)
(3.46)
Then,
if D > 0 and A > 0, then (a, b) is a local minimum;
if D > 0 and A < 0, then (a, b) is a local maximum;
if D < 0 then (a, b) is a saddle point.
N.B. If D = 0 then the second partial derivatives are not sufficient to determine the nature of the
saddle point.
Proof:
61
Example 3.8.6 Find the critical points of the function f (x, y) = x4 + y 4 4xy + 4 and determine
their nature.
Exercise 3.8.7 Find any critical points of the function f (x, y) = x2 + y 2 + 4x 6y and determine
their nature.
Exercise 3.8.8 Find any critical points of f (x, y) = x3 3xy + y 3 and determine their nature.
Exercise 3.8.9 Show that f (x, y) = x4 + y 4 has a minimum at the origin.
FUNCTIONS RM R
62
The definition of a local extremum of a function of three variables is analogous to that for the
two variable case:
Definition 3.8.10
(a) A function f (x, y, z) is said to have a local maximum at the point (a, b, c)
Theorem 3.8.11 If f is differentiable and has a local extreme value at the point (a, b, c) then
f (a, b, c) = 0.
(3.47)
63
Chapter 4
Functions Rm Rn:
Chain rules are rules for calculating the derivatives of a function of a function. Here it is useful to
think of two machines:
(i): f : x f f (x)
(ii): g : f g g(f )
= (x + 2)2
(4.1)
= e cos y
(4.2)
= (t, t2 )
(4.3)
= (x + y z, x y + z, x + y + z)
(4.4)
(4.5)
When considering functions of functions of several variables it is vital to keep track of all the
variables in a systematic way. The chain rules then all follow the same pattern.
FUNCTIONS RM RN :
64
=
=
u x u y u z
+
+
x s
y s
z s
u x u y u z
+
+
.
x t
y t
z t
65
Exercises
Exercise 4.1.2 Evaluate r(f (2)).
Exercise 4.1.3 Referring to the above list, which of the following are defined?
(a) f (g(x, y))
(d) v(r(t))
Exercise 4.1.4 Calculate
u(x(s,t),y(s,t),z(s,t))
t
+y 2 z 2
f (u(x,y,z),v(x,y,z))
x
(in terms of
= 0 and
1
r2 .
Exercise 4.1.7 Let g(x, y) = (x + y)2 and (x(t), y(t)) = (3t, 5t2 ). Evaluate
dg(x(t),y(t))
dt
in terms
of t.
Exercise 4.1.8 * (This exercise asks you to prove the general chain rule, expressed in formal
function notation.) Suppose that f : Rm R and x : Rn Rm . Then the combined function
f x : Rn R
is defined by
(f x)(s1 , . . . , sn ) = f (x1 (s1 , . . . , sn ), . . . , xm (s1 , . . . , sn ))
(4.7)
(f x) X f xi
=
sj
xi sj
i=1
for j = 1, . . . , n.
(4.8)
FUNCTIONS RM RN :
66
4.1.1
The Chain Rule tells us that the following useful result holds. (We will use this when evaluating
integrals over surfaces.)
Theorem 4.1.9 Suppose that u : R2 R2 with u(x1 , x2 ) = (u1 (x1 , x2 ), u2 (x1 , x2 )) has inverse
x : R2 R2 with
u2
x1
u2
x2
Proof:
x2
u1
x2
u2
67
1
2 (u1
+ u2 ), ln
u1
x1
u1
x2
(u1 u2 )
2
x2
u1
x2
u2
u2
x1
u2
x2
!1
(4.9)
68
4.1.2
FUNCTIONS RM RN :
The chain rule for differentiating a function f : Rm R along a path r : R1 Rm , that is, for
differentiating f (r(t)), can be written in terms of the gradient. This turns out to be very useful.
We will be interested in the cases m = 2 and m = 3; the case m = 1 is just the usual Chain Rule
for functions of one-variable.
Example 4.1.11 Find the rate of change with t of f (x) = x2 + yz along the curve r(t) = 3ti +
t2 j + t3 k.
(4.10)
Proof:
Exercise 4.1.13 Find the rate of change of f with respect to t along the curve r(t) if f (x) =
xe(y+z) and r(t) = t2 i + 2tj + 3tk.
Exercise 4.1.14 Find the rate of change of f with respect to t along the curve r(t) if f (x) = x + y
and r(t) = p cos ti + q sin tj, where p and q are constants.
4.2. SURFACES AS LEVEL SETS, THE CHAIN RULE AND TANGENT PLANES
4.2
4.2.1
69
(4.11)
where c is a constant.
This surface is a horizontal slice through the graph of f (since f is a function of three variables
the graph of f is a 3-dimensional curved subset of flat 4-dimensional space R4 which we cannot
visualise! The level sets are a much easier way to gain insight into the function)
Conversely, we can study a surface S R3 by realizing it as the level surface of some function
f : R3 R1 .
We have been doing this for some time already, for example when we considered surfaces defined
as the solutions to equations in (x, y, z) Despite the differences between the surfaces which are the
graphs of the functions in Example (3.1.2) we can see them, along with all other quadric surfaces
a x2 + b y 2 + c z 2 + d xy + e xz + f yz = k ,
(4.12)
as belonging to one continuous family of graphs which vary as the coefficients change, in much the
same way as any plane is of the form
ax + by + cz = d ,
(4.13)
and one can move from one plane to another by varying the coefficients.
In fact every surface S R3 that is the graph of f : R2 R can also be defined as a level surface:
The surface z = f (x, y) is the level set g(x, y, z) = 0 for the function g(x, y, z) = z f (x, y).
The general construction (4.11) is important because not all surfaces are graphs of functions f :
R2 R1 just as not all curves in the xy-plane are graphs of functions R1 R1 .
Likewise, it is often more convenient to study surfaces defined by implicit equations as the level
sets (f, c) of scalar functions Given a function f (x, y, z), there is exactly one level surface of
that function through any given point x0 = (x0 , y 0 , z 0 ). It is the surface f (x, y, z) = c where
c = f (x0 , y 0 , z 0 ).
70
FUNCTIONS RM RN :
Examples
Example 4.2.2 Find the equation of the level surface of the function f (x, y, z) xyz through the
Example 4.2.3 Given that f (x, y, z) = z 2 + 5y 2 sin(3x), sketch the level surface f (x, y, z) = 6.
4.2. SURFACES AS LEVEL SETS, THE CHAIN RULE AND TANGENT PLANES
71
Example 4.2.4 It can be quite interesting to see what happens to the level surface of a function
in R3 as a parameter is continuously varied.
(1) Investigate how the surface x2 + y 2 + z 2 = 1 changes as the parameter reduces from +1
to -1.
(2) Then investigate how x2 + y 2 z 2 = changes as the number reduces from +1 to -1.
FUNCTIONS RM RN :
72
We shall prove below, the gradient vector f (x0 ) is always normal to the level surface
through (x0 , y 0 , z 0 ). Before proving this we need to say what is meant by normal to a surface.
Definition 4.2.5
surface if a is normal to every curve through P which lies in the surface, that is, normal to
the tangent vector at P of each such curve.
(2) The tangent plane at a point P is defined to be the plane through P consisting of all vectors
which are derivatives at P to curves in the surface passing through P .
Theorem 4.2.6
(1) Let f : R3 R1 . At each point (x0 , y 0 , z 0 ) the gradient f (x0 ) (if non-
(2) A point x lies on the tangent plane to the level surface f (x, y, z) = f (x0 ) through x0 if and
only if
(x x0 ) f (x0 ) = 0
(4.14)
f
f
f
+ (y y 0 ) + (z z 0 ) = 0.
x x0
y x0
z x0
(4.15)
4.2. SURFACES AS LEVEL SETS, THE CHAIN RULE AND TANGENT PLANES
73
Example 4.2.7 Sketch the level surfaces of f (x, y, z) = x2 + y 2 + z 2 for c = 1 and c = 9. Find
f at (1, 2, 2). Find the equation of the straight line in R3 which is normal to the level surface
74
FUNCTIONS RM RN :
Example 4.2.8 If f (x, y, z) = x2 + yz, find the equation of the tangent plane to the level set of f
through the point (1, 2, 3).
Example 4.2.9 Find the point on the surface xy + 3/y + 5/z + zx = 15 where the tangent plane
is horizontal.
4.2. SURFACES AS LEVEL SETS, THE CHAIN RULE AND TANGENT PLANES
75
Example 4.2.10 Deduce from Theorem 4.2.6 that if a surface S R3 arises as the graph of a
function of two-variables
g : R2 R1
then the tangent plane to S at the point (x, y, g(x, y)) S is given by equation 3.21:
g
g
z = z0 +
(x x0 ) +
(y y0 ) .
x x0
y x0
(3.21)
FUNCTIONS RM RN :
76
Exercises
Exercise 4.2.11 Let f (x, y, z) = x2 y 2 + z 2 . Find the equation of the level surface through
(1, 2, 1). Also find the equation of the straight line in R3 which is normal to this surface at
(1, 2, 1).
Exercise 4.2.12 Find the equation of the tangent plane to the surface yz 2 + 2x2 = 12 at the point
(2, 1, 2).
Exercise 4.2.13 Show that the curve r(t) = 3t1 i2t2j+2tk meets the ellipsoid x2 +3y 2 +z 2 = 25
at (3, 2, 2). Find the angle between the curve and the surface at this point.
4.2.2
Level Curves
So far we considered functions from R3 R1 . For completeness, we repeat the analysis for the
simpler case of functions of two variables g : R2 R1 . The graph of g is a curved subset of flat
3-dimensional space R3 which we can visualise, its a surface. As you will recall, a horizontal
slice through its graph is a
Level Curve = {(x, y) R2 | g(x, y) = c} .
The level curve really is a curve, a 1-dimensional subset of R2 . We can repeat in this case the
above analysis for functions of three variables to see:
Theorem 4.2.14 [1] Let g : R2 R1 . At each point x0 = (x0 , y 0 ) the gradient g(x0 ) (if
non-zero) is normal to the level curve g(x, y) = c0 , where c0 = g(x0 , y 0 ).
[2] A point x = (x, y) lies on the tangent line to the level curve g(x, y) = c0 through x0 if and
only if
(x x0 ) g(x0 ) = 0 .
(4.16)
In terms of the individual components (x, y) the equation of the tangent line is
(x x0 )
g
g
+ (y y 0 )
= 0.
x
y
(4.17)
Exercise 4.2.15 Prove this theorem. Test out part [2] on g(x, y) = x2 y 2 , and explain how this
relates to the examples in the notes in this section where this function was used when studying
functions of three variables.
4.3
77
Vector Fields
Rm an m-vector.
v(x, y, z) = ( f (x, y, z), g(x, y, z), h(x, y, z) ) = f (x, y, z)i + g(x, y, z)j + h(x, y, z)k ,
where f, g, h : R3 R1 .
These can be depicted by drawing arrows at each point in the plane R2 or each point of R3 , which
may be thought of as flow lines, or lines of force.
Example 4.3.2 Let u(x, y) = ( y4 , x4 ). Illustrate u by arrows at the points (2, 0), ( 2, 2), (0, 2),
y
z
x
,
,
x2 + y 2 + z 2 x2 + y 2 + z 2 x2 + y 2 + z 2
rows at (1, 0, 0), (0, 1, 0), (0, 0, 5) and (1, 2, 1).
Example 4.3.3 Let v(x, y, z) =
. Illustrate v by ar-
78
4.4
FUNCTIONS RM RN :
We already know how to evaluate f when f (x, y, z) is a scalar function. There are two ways in
which can act on a vector field v(x, y, z). They correspond to the scalar and vector product if
one regards as a vector differential operator
=
i+
j+
k.
x
y
z
(4.18)
Definition 4.4.1 If v(x, y, z) = v1 (x, y, z)i + v2 (x, y, z)j + v3 (x, y, z)k then
v = div v =
v2
v3
v1
+
+
x
y
z
(4.19)
It is also possible to define the divergence of a vector field on R2 ; one simply has
v(x, y) =
v1
v2
+
.
x
y
(4.20)
v = curl v =
y
z
z
x
x
y
(4.21)
Again as the notation would suggest, v is a vector quantity. It is called the curl of v or simply
curl v. As with any vector product, determinant notation can help with getting signs right.
79
Q P
x
y
Exercises
Exercise 4.4.5 Evaluate (3xi + yzj + z 2 k).
Exercise 4.4.6 Prove that (yzi + xk) = (y 1)j zk.
Exercise 4.4.7 Prove that ( v) = 0.
Exercise 4.4.8 If f is a scalar function, prove that f is zero. Hence show that yzi + xk is
not the gradient of any function.
FUNCTIONS RM RN :
80
4.5
Identities for
(I) Linearity
(v + w) = ( v) + ( w) ,
(v + w) = ( v) + ( w)
(f ) v + f ( v)
(f v)
(f ) v + f ( v)
(v w)
( v) w v ( w)
Converse: If w = 0 then on any simply-connected region one can find a vector field v
such that w = v
(f ) = 0
Converse: If w = 0 then on any simply-connected region one can find a function f such
that w = f
(f g) = 0
(f ) =
2f
2f
2f
+ 2 + 2 = fxx + fyy + fzz = 2 f
2
x
y
z
81
82
4.6
FUNCTIONS RM RN :
(I) If the surface is defined as the graph of a function, z = f (x, y) then the tangent plane at the
point x = x0 = (x0 , y0 ) and z = z0 takes the equivalent forms
f
f
z = z0 + (x x0 )
+ (y y0 )
.
x x0
y x0
z = z0 + (x x0 ) f (x0 )
(3.21)
(3.30)
(II) If the surface is defined as the level set of a function, f (x, y, z) = c then the tangent plane
at the point x = x0 = (x0 , y0 , z0 ) takes the equivalent forms
(x x0 )
f
f
f
+ (y y 0 ) + (z z 0 ) = 0.
x x0
y x0
z x0
(x x0 ) f (x0 ) = 0
(4.15)
(4.14)
Please remember that the formulae are different if the surface is defined as a graph of a function
of two variables or as the level set of a function of three variables.
4.7
83
It is often very important to know whether a vector field v can be written as the gradient of a
scalar field
v = f
(4.22)
v =u
(4.23)
4.7.1
Reason: You do not know how to do this yet, but we can define the function f (x) in terms of a
line integral
f (x) =
x0
v dr
(4.24)
this will be defined in chapter 6. This is well defined on any simply connected region, independent
of the integration contour used and satisfies f = v.
4.7.2
FUNCTIONS RM RN :
84
4.8
Miscellaneous exercises
Exercise 4.8.1 For this question you may find it helpful to read sections 2.3 and 2.4.
Consider the curve C defined by the path
r : R1 R3 ,
r(t) = ( 0, t, et ) .
(a) Sketch the curve C and mark on your sketch the point r(1) = (0, 1, e1 ).
(b) Compute r (1) and hence give a parametric equation (i.e. in the form b() = u + v) for the
equation of tangent line to C at (0, 1, e1 ). Draw this line on your sketch of C.
(c) Compute to 2nd order the Taylor expansion at the point (0, 1, e1 ) of the path t 7 r(t) (see
(d) If we ignore the error term in the 2nd order Taylor expansion at the point (0, 1, e1 ) of the
path t 7 r(t), we obtain (see equation (2.5) of the course notes) a curve which is quadratic in h:
c(h) = r(1) + h r (1) +
h2
r (1) .
2
(Note the first two terms the linear in h partgive the tangent line; hint for part (b)!). Sketch
the curve defined by h 7 c(h) near h = 0 see if you can see how it gives a better approximation
the actual curve C near the point (0, 1, e1 ) than that given by the tangent line at (0, 1, e1 ) you
computed in part (c).
Exercise 4.8.2 Compute the directional derivative gu (x), where g(x) = x2 y 2 z and u = 51 (3i+4k).
Evaluate this at x = (1, 1, 1).
Exercise 4.8.3 Let S be the surface in R3 which is the graph of the function f : R2 R1 defined
by f (x, y) = ex
y 2
Exercise 4.8.4 Let S be the surface in R3 which is the graph of the function f : R2 R1 defined
by f (x, y) = x2 y 2 .
85
Exercise 4.8.5 (a) Compute to 2nd order the Taylor expansion at the point (0, 1, e1 ) of the
function f : R2 R1 defined by f (x, y) = ex
y 2
c : R2 R1
h2
k2
c(h, k) = f (0, 1) + h fx (0, 1) + k fy (0, 1) +
fxx (0, 1) + hk fxy (0, 1) +
fyy (0, 1) .
2
2
(Note that this is quadratic in the variables h and k and that the first three terms the linear in
h partgive the tangent plane Tp S.)
Sketch the surface defined by (h, k) 7 c(h, k) near h = 0, k = 0 see if you can see how it gives
a better approximation to the actual surface S near the point (0, 1, e1 ) than that given by the
tangent plane at (0, 1, e1 ) computed in exercise 4.8.3.
Exercise 4.8.6 For each of the following vector fields
x
x
y
yx
(a) v =
y , (b) v = y , (c) v = x , (d) v = y x ,
0
0
0
0
(i) Sketch the vector field
(ii) Calculate v.
(iii) Calculate v.
FUNCTIONS RM RN :
86
4.9
The -tensor is very useful for computations with cross products. In particular, it will be very
important for proving identities for cross products of and vector fields.
Definition of the -tensor
A vector in R3 v can be thought of as an object carrying one index i, which takes the values
i = 1, 2, 3:
a vector v has components vi .
(4.25)
(4.26)
(4.27)
For each choice of i, j, k in the set {1, 2, 3} the object Tijk R is a number.
The only tensor that we will need for now is the -tensor.
Definition 4.9.1 The -tensor is a three-index object ijk , where i, j, k take values in the set
{1, 2, 3} with the following properties:
Property 1: 123 = 1
Property 2: is antisymmetric: ijk = jik
Property 3: Invariance under cyclic permutation: ijk = kij = jki
Property 4: ijk = 0 whenever two or more indices agree, e.g. 0 = 112 = 333 = 313 ...
Note that the last property follows directly from antisymmetry: consider the case with two indices
the same: iik . Then by antisymmetry iik = iik , which can only by true if iik = 0. In
1
if (ijk) = (123), (312), (231)
ijk = 1
if (ijk) = (132), (213), (321)
0
else
(4.28)
87
Theorem 4.9.2 The cross product of two vectors can be expressed using the -tensor as follows:
the ith component of the vector v w is
(v w)i =
3 X
3
X
ijk vj wk
(4.29)
j=1 k=1
Proof:
Consider the first component:
RHS1 =
3 X
3
X
1jk vj wk
j=1 k=1
3 X
3
X
1jk vj wk
using Property 4
j=2 k=2
(4.30)
=123 v2 w3 + 132 v3 w2
=123 (v2 w3 v3 w2 )
using Property 2
=v2 w3 v3 w2
using Property 1
=(v w)1
Similarly for the second component:
RHS2 =
3 X
3
X
2jk vj wk
j=1 k=1
X X
2jk vj wk
using Property 4
j=1,3 k=1,3
(4.31)
=213 v1 w3 + 231 v3 w1
=213 (v1 w3 v3 w1 )
using Property 2
=v3 w1 v1 w3
=(v w)2
And finally the third component:
RHS3 =
3 X
3
X
3jk vj wk
j=1 k=1
X X
3jk vj wk
using Property 4
j=1,2 k=1,2
(4.32)
=312 v1 w2 + 321 v2 w1
=312 (v1 w2 v2 w1 )
using Property 2
=v1 w2 v2 w1
=(v w)3
FUNCTIONS RM RN :
88
Examples
(1) The antisymmetry of the cross product follows directly from Property 2:
v w = w v
(4.33)
3
X
3
X
ijk vj wk =
j,k=1
j,k=1
ikj wk vj = (w v)i
(4.34)
(4.35)
ijk vj vk = 0
(4.36)
j,k=1
(3) Leibniz rule: Let f be a scalar function and v a vector field, then
(f v) = (f ) v + f ( v)
(4.37)
( (f v))i =
ijk
(f vk )
xj
ijk
ijk
j,k=1
3
X
j,k=1
3
X
j,k=1
f
xj
f
xj
vk + f
vk + f
vk
xj
3
X
j,k=1
ijk
vk
xj
(4.38)
(4.39)
3
X
( v)i
x
i
i=1
3
3
X
X
vk
ijk
x
x
i
j
i=1
j,k=1
3
X
i,j,k=1
=0
ijk
vk
xi xj
because of Example (2), or alternatively Property 2
(4.40)
89
(4.41)
Consider
( (f ))i =
3
X
j,k=1
=0
ijk
f
xj xk
(4.42)
This example in particular shows that this is a much more efficient way of computation, than
writing out the cross product.
90
Chapter 5
This chapter is devoted to the method of Lagrange multipliers, which allows one to find extrema
of a function f (x, y, z) when the variables x, y and z are required to obey some extra condition
g(x, y, z) = 0, and similarly for functions of two variables (or of more than three variables). When
g(x, y, z) is a simple function, direct methods can be used. For more complicated situations the
multiplier condition is much simpler to use. The main idea, as we shall see, is that f will (instead
of being zero) be parallel to the normal to the line or surface on which the variables are constrained
to lie.
We begin with some examples of functions of two variables. The first example is very simple.
Example 5.1.1 Find the maximum value taken by f (x, y) = x2 4y 2 given that x = 0.
The next example is slightly more complicated, but direct methods can still be used.
91
The need for Lagrange multiplier arises when the side condition g(x, y) is more complicated, so
that it cant be rearranged to give y as a simple function of x (or vice versa). The next example
is an intermediate step.
Example 5.1.3 Find the maximum and minimum values of f (x, y) = x2 4y 2 on the circle
(x 12 )2 + y 2 =
1
25 .
92
The use of parameterised equations to find extrema can be summarised in this theorem, which
establishes the first part of the Lagrange multiplier idea. It takes the same form for two and three
variables.
Theorem 5.1.4 Suppose that a function f (x, y, z) has a local extremum on the curve r(t) at the
point r(t0 ). Then
f (r(t0 )) r (t0 ) = 0.
(5.1)
Before a final example, which introduces the other part of the Lagrange multiplier idea, we need
to recall theorem 4.2.6, and derive the equivalent version of this theorem for functions of two
variables.
Theorem 5.1.5 At each point x0 = (x0 , y 0 ) the gradient f (x0 ) (if non-zero) is normal to the
93
Exercises
Exercise 5.1.7 Prove theorem 5.1.5.
Exercise 5.1.8 Complete Example (5.1.6) to show that f has local minima at (2
q
q
q
q
10 10
10 ) and (4
(2 53 , 2 53 ), and local maxima at (4 10
,
,
3
3 ).
3
3
Exercise 5.1.9 Show that the function f (x, y) = ex
2y 2
5
3 , 2
5
3)
and
mine whether it is a local maximum, a local minimum, a saddle point, or none of these.
Exercise 5.1.10 Find all the critical points of the function f (x, y) = x2 + 2xy y 2 + 3y and for
each of these determine whether it is a local maximum, a local minimum, a saddle point, or none
of these.
94
5.2
The idea we have been using in the preceding section can be generalised, as in the following
theorem:
Theorem 5.2.1 (Lagrange multiplier theorem)
If the function f (x) has an extremum (subject to g(x) = c) at the point x0 , then the vectors f (x0 )
and g(x0 ) are parallel. Thus, if g(x0 ) is non-zero, there exists a unique constant (known as
f (x0 ) = g(x0 ).
(5.2)
The proof of this theorem will be given first for the case of functions of two variables and then for
the case of functions of three variables.
95
Example 5.2.2 Show that the maximum value of the function f (x, y, z) = xyz subject to the side
condition x3 + y 3 + z 3 = 1 in the region where x 0, y 0 and z 0 is
1
3.
96
Example 5.2.3 Find the distance from the point (6, 0) to the curve y 2 4x = 0.
Exercises
Exercise 5.2.4 Use the Lagrange multiplier method to maximise f (x, y) = xy given that x+y = 6.
[Solution: 9].
Exercise 5.2.5 Maximise the function 2x + 4y + 4z on the sphere x2 + y 2 + z 2 = 36
Exercise 5.2.6 A factory can produce three products in quantities q1 , q2 , q3 respectively, making a
profit P (q1 , q2 , q3 ) = 2q1 + 8q2 + 24q3 . Find the values of q1 , q2 and q3 which maximise profit given
that production is constrained by q12 + 2q22 + 4q32 = 9 103 .
The distance of a point P to a line or curve or plane or surface is defined to be the distance from
P to the nearest point (or points) on the line, curve etc.
Exercise 5.2.7 Use the method of Lagrange multipliers to find the distance of the origin from the
plane 2x 2y + z = 5.
97
Chapter 6
6.1
f ds = lim
N
X
f (ri ) si .
(6.1)
i=0
This can thought of as the surface area of the two-dimensional strip between the curve C and the
graph of f over C:
98
The integral (6.1) is an abstract mathematical quantity. An amazing fact, however, is that if we
choose a parametrisation of C that is, we choose a coordinate for C then we can give the
integral a simple formula.
Recall that a parametrisation of a differentiable curve C R3 means a path
r : (a, b) or [a, b] Rm
(or sometimes r : R1 Rm ) which is differentiable, and also one-to-one and onto (i.e. bijective). In particular, onto ensures that r maps its domain precisely to Cwhat are the other
conditions there for?
When C is a closed curve (that is, its starting point and finishing point coincide so its a loop) we
then often write the integral over C as
f ds
(6.2)
different ways of giving a coordinate to the curve. But, as far as the integral (6.1) is concerned,
this does not matter:
Theorem 6.1.1 Suppose that r : [a, b] C Rm is any parametrisation of a curve C in Rm .
f ds =
f (r(t)) kr (t)k dt .
(6.3)
Notice that the integrand and the limits of integration on the right-side of (6.3) will be different
for different parametrisations of C the important point is that the number which results from
evaluating that integral will be the same whatever parametrisation we choose to employ.
Proof:
99
Examples
Example 6.1.2 Calculate the integral
0t4 ,
and
which lies between the planes z = 0 and z = 2, and where f : R3 R1 is the function
f (x, y, z) = zex
+y 2 +z 2
100
6.2
Arc length
dimensional strip between the curve C and the graph of f over C. In particular, if we take f to
be the constant function f (x) = 1 we obtain the length of the curve C:
ds .
As with the general definition of integrals over curves, although this is an abstract definition once
we make a choice of parametrisation of C then we can give a concrete formula for the arc-length:
Theorem 6.2.2 Suppose that r(t) : [a, b] Rm is any parametrisation of a curve C in Rm .
Then the length l of the arc is
|r (t)| dt .
(6.4)
q
x1 (t)2 + x2 (t)2 + . . . + xm (t)2 dt .
(6.5)
l=
Proof:
101
Example 6.2.3 Calculate the length of the arc of the curve r(t) = cos(t)i + sin(t)j, t [0, ].
Example 6.2.4 (Final Exam 2000) Show that the length of the arc of the curve
r(t) = sin(3t)i + cos(3t)j + 2t3/2 k, between the points r(0) and r(1) is equal to 2(2 2 1)
Notice that the right-side of the formula (6.4) (or (6.5)) will change if we change the parametrisation. The arc-length, the number l, will not, as in this example:
Example 6.2.5 Show that the arcs r(t) = ti + t2 j, 0 t 4 and h(s) = 4 sin(s)i + 8(1
cos(2s))j, 0 s /2 have the same length.
These are the same arcs as in Example (6.1.3), so we already know that
p
|r| = 1 + 4t2
l=
q
|h | = 4 cos(s) 1 + 64 sin2 (s)
l=
/2
s=0
p
1 + 4t2 dt
q
4 cos(s) 1 + 64 sin2 (s) ds
102
6.3
103
Line integrals
We start in two dimensions. Suppose that v(x, y) is a vector field (that is, v : R2 R2 ) and that
C is an arc of a curve in the (x, y)-plane R2 .
(6.6)
To actually calculate a line integral the formula in the following proposition is useful.
Proposition 6.3.1 Suppose that C is the arc of the curve r(t) corresponding to a t b. Then
Z
Proof:
v dr =
b
a
(6.7)
104
The definition given of line integral along a curve may seem rather arbitrary; there are several
good reasons however for making this definition, among them:
(a) The line integral corresponds to useful quantities in many applications; suppose for instance
that v is the strength of an electric field and that a particle of unit charge moves along the
R
curve r. Then the (signed) energy gained by the particle is C v dr.
(b) The integral is intrinsically defined; it depends on the curve and the function v, but not on
the particular parametrisation of the curve.
(c) The line integral relates to higher dimensional integrals in a natural way, and provides three
of a family of integral theorems.
Example 6.3.2 Evaluate
and v is the vector field
Exercise 6.3.4 * The arcs r(t) = ti+t2 j, 0 t 4 and h(s) = 4 sin si+8(1cos 2s)j, 0 s /2
were considered in example 6.2.5. They define the same arc in the (x, y)-plane. Show that the
integral of the function xi + xyj is the same along each arc.
105
In three dimensions the definition of an integral along a curve is very similar. Suppose that
v(x, y, z) is a vector field (that is, v : R3 R3 ) and that C is an arc of a curve in three-dimensional
(6.8)
Again, to actually calculate a line integral the formula in the following proposition is useful.
Proposition 6.3.5 Suppose that C is the arc of the curve r(t) in R3 corresponding to t1 t t2 .
Then
v dr =
t2
t1
(6.9)
The proof of this proposition exactly corresponds to that for Proposition (6.3.1).
Example 6.3.6 Evaluate
5tk, 0 t 10.
ALTERNATIVE NOTATION: if v(x, y, z) = P (x, y, z)i + Q(x, y, z)j + R(x, y, z)k, then, expanding
R
dr = dxi + dyj + dzk, C v dr may also be expanded as
Z
P (x, y, z)dx + Q(x, y, z)dy + R(x, y, z)dz.
C
dy = y (t) dt
and dz = z (t) dt
(6.10)
and thus
v dr =
=
t2
t1
P (x(t), y(t), z(t))x (t) + Q(x(t), y(t), z(t))y (t) + R(x(t), y(t), z(t))z (t) dt.
106
Example 6.3.7 If C is the circle in the (x, y)-plane with radius 2 and centre the origin, evaluate
Z
(x + y) dx (x + y) dy + 2z dz.
(6.11)
C
(6.12)
C (xi
Exercise 6.3.10 Integrate xi + yj + zk around the circle centre (0, 0, 1) which passes through
(0, 0, 2) and (0, 1, 1).
Exercise 6.3.11 Evaluate
We have done this before, in the first notation. Which example is being repeated here?
6.4. FTC I
Exercise 6.3.12 Evaluate
107
Z
x = 2 cos t, y = 2 sin t, z = t, 0 t 2.
6.4
FTC I
(6.13)
Proof:
and
v(x, y, z) = i+zj+yk. Also show that v = f where f (x, y, z) = (x+yz) and verify Theorem 6.4.1
in this case.
108
There are two simple corollaries of Theorem 6.4.1 which are useful. The first of these is closely
related to Greens theorem, which is the subject of the next section.
Corollary 6.4.3 If C is a closed arc (that is, its starting point and finishing point coincide) and
v = f for some function f , then
v dr = 0.
(6.14)
Proof:
Corollary 6.4.4 If v = f for some function f and C1 and C2 are two arcs which begin at the
same point and end at the same point, then
Z
Z
v dr =
C1
Proof:
C2
v dr.
(6.15)
6.4. FTC I
109
Exercises
Exercise 6.4.5 Use the fundamental theorem of calculus for line integrals to find a function f
such that f (x, y, z) = 2xyi + x2 j + k.
Exercise 6.4.6 Use Theorem 6.4.1 to evaluate
t2 i + tj + tk, 0 t 2.
Exercise 6.4.7 Evaluate
C (yi
Exercise 6.4.10
(a) Show that v = 0 for the vector field v = xi + yj + zk.
(b) Find a parametrisation r(t) of the straight line C from 0 to x with r(0)=0 and r(1)=1.
R
(c) Show that the function f (x) = C v dr satisfies f = v
Each of the following vector fields satisfies v = 0. Use the fundamental theorem of calculus
for line integrals to find a function f such that v = f and check that this is indeed true for the
x
y
y
2
2
3/2
2
2
x +y
(x +y )
, (b) v = x , (c) v = 2 y2 3/2 (d) v = 2 x 2 .
(a) v =
0
x +y
(x +y )
z
0
0
0
Note: in some cases you may not be able to start the line integral at the origin, in which case
you will have to choose a different starting point. In one of these examples, the result of the line
integral will not be a function defined uniquely everywhere - which case is it?
110
Chapter 7
7.1
means, how it may be evaluated and what use it might be. Here U is a region of the (x, y) plane
and f (x, y) is a function of two real variables x and y.
limit where the number of strips becomes infinite, which geometrically can be viewed as the area
under the curve between x = a and x = b.
RR
111
f (x, y) dx dy is the volume under the graph of f (x, y) and over the
region U , which for now we assume to be a rectangular region. The formal definition is then
Definition 7.1.1 Suppose that U is the region U = (x, y)|a x b, p y q then
Z Z
XX
f (x, y)xy
f (x, y) dx dy =
lim
U
x0,y0
(7.1)
112
However, when it comes to actually evaluating such an integral, a different method is used.
RR
Z Z
x(5 y 2 ) dx dy if U = (x, y)|3 x 5, 1 y 2 .
x(5 y ) dx dy
Z 5 Z
3
=
=
=
x(5 y )dy dx
2
Z 5 h
y 3 iy=2
dx
x(5y )
3 y=1
3
Z 5
8
x dx
3 3
64
3
We can also perform the integrations in the opposite order, that is to find the area of a slice at
fixed y (do the x integration first) and then do the y integration second see exercise 7.1.5
Example 7.1.3 Let U be the region (x, y)| 1 x 1, 0 y 1 R2 .
We can also write this as [1, 1] [0, 1].
Let f (x, y) = x2 + y 2 .
Z Z
f (x, y) dxdy can be evaluated in two ways. We can start by:
Then
U
(i) Find the area of slices at fixed y first = do x integral first, then do y integral second
or
(ii) Find the area of slices at fixed x first = do y integral first, then do x integral second
113
11111111111
00000000000
00000000000
11111111111
00000000000
11111111111
y=0
1
Z 1
1
1
x3
dy =
+ xy 2
+ y 2 y 2 dy
=
3
3
3
y=0
y=0
1
1
Z 1
2
4
2
2
2 2
0=
=
+ 2y 2 dy =
y + y3 =
+
3
3
3
3 3
3
y=0
0
Z
x=1
y=0
1
Z 1
y3
1
x2 +
0dy
dx =
3 0
3
x=1
x=1
1
Z 1
1
1 1
4
1
1
1 1
x2 +
dy =
=
x + y3
+
=
=
3
3
3
3 3
3 3
3
x=1
1
x2 y +
RR
f (x, y) dx dy when
(a) U = (x, y)|0 x 10, 0 y 4 and f (x, y) = 2x + y 2 [Answer 1840/3]
(b) U = (x, y)|0 x 2, 0 y 2 and f (x, y) = (x + y)2
(c) U = (x, y)| 1 x 1, 1 y 1 and f (x, y) = sin((x + y)). [sketch optional]
Exercise 7.1.5 Evaluate the integral in example (7.1.2) by carrying out the x integration before
the y integration. (Draw a diagram to show the corresponding slicing.)
114
Summary
If U is a rectangular region of the form U = (x, y)|a x b, p y q then
Important Note
If the integration region U in an integral
RR
written as product of two functions depending on x and y alone, that is f (x, y) = g(x)h(y), then
the integrals can be done separately:
7.2
115
If U is not a rectangle with sides parallel to the axes, things can be more complicated.
In general we still have
Z Z
f (x, y) dx dy =
M1
1
X NX
lim
x0,y0
M ,N
Z Z
f (xi , yj )xi yj
(7.2)
i=0 j=0
3(x2 + y 2 )dx dy
if U is the region of the (x, y) plane bounded by the x-axis, the line y = 2x and the line x = 1.
Z Z
3(x2 + y 2 )dx dy
Z 1 Z
0
2x
3(x2 + y 2 ) dy dx
Z 1h
iy=2x
=
3x2 y + y 3
dx
y=0
14x3 dx
h 7x4 i1
2
= 7/2.
We can also perform the integrations in the opposite order, that is to find the area of a slice at
fixed y (do the x integration first) and then do the y integration second see exercise 7.2.6
Example 7.2.2 Find the volume of a hemisphere of radius a.
116
0
1
y=2x y=x
0
1
11111111111
00000000000
0000000
1111111
0
1
00000000000
11111111111
0000000
1111111
0
1
00000000000
11111111111
0000000
1111111
0
1
00000000000
11111111111
0000000
1111111
0
1
00000000000
11111111111
0000000
1111111
0
1
00000000000
11111111111
0000000
1111111
0
1
00000000000
11111111111
0000000
1111111
00000
11111
0
1
00000000000
11111111111
0000000
1111111
00000
11111
0
1
00000000000
11111111111
0000000
1111111
00000
11111
0
1
00000000000
11111111111
0000000
1111111
00000
11111
0
1
00000000000
11111111111
0000000
1111111
00000
11111
0
1
00000000000
11111111111
0000000
1111111
00000
11111
0
1
00000000000
11111111111
0000000
1111111
0
1
00000000000
11111111111
0000000
1111111
0
1
00000000000
11111111111
0000000
1111111
0
1
00000000000
11111111111
0000000
1111111
0
1
00000000000
11111111111
0000000
1111111
0
1
00000000000
11111111111
0000000
1111111
0
1
00000000000
11111111111
0000000
1111111
0
1
00000000000
11111111111
0000000
1111111
0
1
00000000000
11111111111
0000000
1111111
0
1
00000000000
11111111111
0000000
1111111
0
1
0
1
0
1
y=2
y=1
We can again choose to (i) fix y first and integrate first over x with y fixed or (ii) fix x first and
integrate first over y with x fixed.
(i) If we first take slices at fixed y
1
0
0
1
0
1
0
1
00000000000
11111111111
000000
111111
0
1
00000000000
11111111111
000000
111111
0
1
00000000000
11111111111
000000
111111
0
1
00000000000
11111111111
000000
111111
0
1
00000000000
11111111111
000000
111111
0
1
11111111111
00000000000
00000000000
11111111111
000000
111111
0
1
0000
1111
0000
1111
00000000000
11111111111
000000
111111
slice with y
0
1
0000
1111
0000
1111
00000000000
11111111111
000000
111111
0
1
00000000000
11111111111
000000
111111
0
1
11111111111
00000000000
00000000000
11111111111
000000
111111
0
1
00000000000
11111111111
000000
111111
0
1
00000000000
11111111111
000000
111111
0
1
00000000000
11111111111
000000
111111
0
1
00000000000
11111111111
000000
111111
0
1
00000000000
11111111111
000000
111111
0
1
11111111111111111
00000000000000000
00000000000
11111111111
000000
111111
0
1
00000000000
11111111111
000000
111111
0
1
00000000000
11111111111
000000
111111
0
1
00000000000
11111111111
000000
111111
0
1
00000000000
11111111111
000000
111111
0
1
0
1
0
1
fixed
then x varies between the line y = 2x and the line y = x i.e. x varies over the range y/2 x y.
This means that the integral can be evaluated as
Z Z
f (x, y) dxdy
y=1
f (x, y) dx dy
x=y/2
y=1
x=y/2
xy dx dy =
2
y=1
x2 y
2
y
dy
y/2
2
Z
3 2 3
y3
3 y4
y3
dy =
y dy =
2
8
8 y=1
8 4 1
y=1
3 16 1
45
=
.
8
4
32
117
(ii) If we first take slices at fixed x then we must split U up into 2 regions.
(1,2)
(1,2)
11
00
00
11
00
11
00
11
00
11
00
11
00
11
00
11
00
11
00
11
00
11
00
11
U=
(1/2,1)
(1,1)
(2,2)
1
0
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
(1,1)
For the first region, 1/2 x 1, y varies over the range 1 y 2x; for the second region, where
1 x 2, y varies over the range x y 2 instead.
This means that the integral can be evaluated as
Z Z
f (x, y) dxdy =
U
x=1/2
Z
2x
xy dy dx +
y=1
x=1/2
=
=
=
xy 2
2
x=1
2x
1
dx +
Z
xy dy dx
y=x
x=1
xy 2
2
2
dx
y=x
Z 2
x
x3
2x
dx +
dx
2
2
x=1/2
x=1
1
2
4
x4
x2
x
+ x2
2
4 1/2
8 1
1
45
1 1
1
1
+ (4 2) 1
=
2 4
32 16
8
32
Z
2x3
(7.3)
Note:
You may need to split the integration region into two or more pieces.
How you choose to cut up the region can make the computation easier/harder!
Exercise 7.2.4 Evaluate
RR
f (x, y) dx dy when
(a) U is the region in the (x,y) plane where y 0, 0 x 2 and y x2 and f (x, y) = x + y.
[Answer 36/5]
(b) U is the finite region in the first quadrant bounded by the line y = 3x and the curve y = x2
and f (x, y) = 2x3 + y 2 . [Answer
35 73
140 ]
(c) U is the triangle in the (x, y) plane bounded by the lines y = x, y = x and y = 2
and f (x, y) = x + y 2xy. [Answer 16/3]
Exercise 7.2.5 Use a double integral to find the volume of the tetrahedron with vertices at (0, 0, 0), (1, 0, 0),
(0, 3, 0) and (0, 0, 2).
118
7.2.1
Double integrals may also be used to calculate areas of regions in the (x, y) plane. The key formula
is:
Area of U =
Z Z
1 dx dy
(7.4)
Example 7.2.7 Use double integration to calculate the area of U where U is the region bounded
by the axes and the line y + 2x = 6
Exercise 7.2.8 Use double integration to calculate the area of U where U is the disc x2 + y 2 9
Example 7.2.9 Find the area of the ellipse x2 /a2 + y 2 /b2 = 1 in R2 .
7.3
Changing variables
As is often the case, a difficult problem may be made simpler if the coordinates are well chosen.
This is equally so for double integrals, the choice of coordinate system may have a radical effect
on how difficult or easy the integrals is to evaluate. For example, the double integral we have just
looked at to compute the area of a disc is much simpler in polar coordinates. One of the skills to
develop is how to choose a good coordinate system this will depend on the function you are
integrating and the shape of the region over which you are integrating.
We begin with a reminder about the change of variable rule for single integrals. Suppose that
u = u(x) and that as x increases from a to b then u(x) increases from p to q. Then
Z
f (x)dx =
f (x(u))
dx
du.
du
(7.5)
dx
u so that We are going to derive the
du
119
analogous rule for double integrals. To illustrate the ideas involved we will consider the following
problem:
Example 7.3.1 Evaluate
RR
2
U (x + y)
x + y = 2, 2y x = 0 and 2y x = 4.
It would be possible (but unnecessarily laborious) to evaluate this integral by direct means. Change
of variable makes it much simpler.
120
The method for changing variables in a double integral is summarised in the following theorem:
Theorem 7.3.2 Suppose that the pair of functions u = u(x, y) and v = v(x, y) are invertible so
that x = x(u, v) and y = y(u, v). Also suppose that the region U in the (x, y)-plane corresponds to
the region U in the (u, v)-plane. Then
Z Z
Z Z
f (x, y) dxdy =
(x, y)
f (x(u, v), y(u, v))
dudv
(u,
v)
where
(x, y)
= det
(u, v)
x
u
x
v
y
u
y
v
(7.6)
(7.7)
(x,y)
(u,v) .
RR
x + y = 9, x + y = 25, x y 2 = 1, x2 y 2 = 9.
121
Example 7.3.4 Find the area of the region U in the xyplane bounded by the curve xy = 1,
xy = 2, x = y and y = 2x with x > 0 and y > 0.
1
0
0
1
0
1
0
1
000000000000000
111111111111111
0000000
1111111
0
1
000000000000000
111111111111111
0000000
1111111
0
1
000000000000000
111111111111111
0000000
1111111
0
1
y=2x
y=x
000000000000000
111111111111111
0000000
1111111
0
1
000000000000000
111111111111111
0000000
1111111
0
1
0
1
000000000000000
111111111111111
0000000
1111111
0
1
0 (1,2)
1
000000000000000
111111111111111
0000000
1111111
0
1
0
1
000000000000000
111111111111111
0000000
1111111
0
1
0
1
000000000000000
111111111111111
0000000
1111111
0
1
0
1
000000000000000
111111111111111
0000000
1111111
0
1
0
1
000000000000000
111111111111111
0000000
1111111
0
1
0
1
000000000000000
111111111111111
0000000
1111111
1111
0000
0
1
0
1
000000000000000
111111111111111
0000000
1111111
0
1
0
1
000000000000000
111111111111111
0000000
1111111
0
1
0
1
000000000000000
111111111111111
0000000
1111111
0
1
0 (1,1)
1
000000000000000
111111111111111
0000000
1111111
0
1
xy=2
000000000000000
111111111111111
0000000
1111111
0
1
000000000000000
111111111111111
0000000
1111111
0
1
000000000000000
111111111111111
0000000
1111111
0
1
000000000000000
111111111111111
0000000
1111111
0
1
000000000000000
111111111111111
0000000
1111111
0
1
xy=1
000000000000000
111111111111111
0000000
1111111
0
1
000000000000000
111111111111111
0000000
1111111
0
1
000000000000000
111111111111111
0000000
1111111
0
1
000000000000000
111111111111111
0000000
1111111
0
1
11111111111111111111
00000000000000000000
000000000000000
111111111111111
0000000
1111111
0
1
000000000000000
111111111111111
0000000
1111111
0
1
000000000000000
111111111111111
0000000
1111111
0
1
000000000000000
111111111111111
0000000
1111111
0
1
We can do this in at least the following three ways:
(i) A =
RR
RR
Method (i)
In this case we need to split U into two regions On the first, x varies over [ 12 , 1] and on this region
for fixed x, y varies over 1/x y 2x. On the second, x varies over [1, 2] and on this region
1
0
0
1
0
1
0
1
0
1
0
y=2x 1
0
1
0
1
0
1
0
1
0
1
0
1
0 +
1
0
1
0
1
0
1
0
1
y=1/x 1
0
0
1
0
1
0
1
y=2/x
1
0
0
1
0
1
0
1
0
1
0
1
0y=x
1
Z Z
=
=
dxdy =
x=1/ 2
2x
dy
y=1/x
Z 2
dx +
x=1
2/x
y=x
dy dx
2
2
1
1
2
x2
2x
dx +
x dx = x ln(x) 1/2 + 2 ln(x)
x
x
2 1
x=1
x=1/ 2
1
1
1
1
(1 0) ( ln( )) + (2 ln( 2) 1) (0 ) = ln 2
2
2
2
2
122
Method (ii)
In this case we again need to split U into two regions On the first, y varies over [1, 2] and on
this region for fixed y, x varies over 1/y x y. On the second, y varies over [ 2, 2] and on this
x=y/2
x=2/y
00
11
1111
0000
+
x=1/y
1111x=y
0000
y=1
y= 2
x=1/y
2/y
dx dy
x=y/2
2
2
2
Z 2
2 y
y
y2
1
dy +
dy
=
+
2
ln(y)
ln(y)
= =
y
y
y
2
2
4 y=2
y= 2
y=1
y=1
1
1
1
= (1 ln( 2)) ( 0) + (2 ln( 2) 1) (2 ln( 2) ) = ln 2
2
2
2
Method (iii)
We first find the region U . The four bounding lines of U are simple straight lines in the uvplane,
corresponding to u = 1, u = 2, v = 1 and v = 2. This makes U the region {1 u 2, 1 v 2}.
Next the Jacobian is
(x, y)
(u, v)
(u, v) 1 u
= x
=
v
(x, y)
x
1
u
y
v
y
y
= y
2
x
1
x
1
.
= (2y/x)1 =
1
2v
x
Z 2 Z 2
1
dv
du
dxdy =
dudv =
A =
v=1 2v
U 2v
U
u=1
2
Z 2
Z 2
2
1
1
1
1
ln(v) du =
ln(2)du = ln(2) u 1 = ln 2
=
2
2
u=1 2
u=1 2
1
Z Z
Z Z
We get the same answer by each method, but the integration in method (iii) is simpler.
Moral:
Changing variables involves some work in calculating the Jacobian but this may be more than
compensated for by a simpler integration region, even for simple integrands.
Exercise 7.3.5 Show that the modulus of the Jacobian
(x,y)
(u,v)
123
RR
7.4
2.
Polar coordinates
One of the most frequent change of variables used is from Cartesian to polar coordinates, possibly
slightly adapted to a specific situation. In two dimensions polar coordinates are useful if the region
has some circular properties, such as a disc, or the integrand has a simple expression in terms of
r2 = x2 + y 2 and .
We can now use them to calculate, for example, the area of a disk of radius R, centered at the
origin:
124
RR
With double integration some integrals lend themselves to the use of polar coordinates, or to
slightly modified versions for elliptical regions.
Example 7.4.2 Evaluate using a double integral the area of the region U enclosed by the ellipse
y2
x2
+ 2 =1 ,
2
Notice that in this example if we set = = 1 then we get back to first computation we did of
the area of a disc and the case of standard polar coordinates.
R +
125
2
ex dx.
(The solution to this example is a key result which you will find coming up in other contexts. It
cannot be evaluated analytically as an integral of 1-variable, but can nevertheless be computed
through an elegant artifice using polar coordinates and double integrals. It can also be evaluated
by contour integration.)
126
Example 7.4.4 Evaluate
x
p
dx dy
2
x + y2
Exercise 7.4.5 Sketch the graph of r = 2 + cos + sin and calculate the area it encloses.
Exercise 7.4.6 Suppose U is the region in the (x, y)-plane where x 0, y 0 and x2 + y 2 5.
RR p
Sketch U and use polar coordinates to evaluate
x2 + y 2 dx dy. [Answer 5 65 ]
U
Exercise 7.4.7 Use polar coordinates to evaluate the integral in example 7.2.1.
[Hint: to do the integration make the substitution u = tan .]
Exercise 7.4.8 Sketch the cardioid r = 1 + cos, 0 2 and calculate its area.
Exercise 7.4.9 Find the area of one petal of the curve r = sin 3. [Answer /12]
7.5
127
We have seen that when the integrand is the gradient of a function, a line integral around a closed
curve in R3 is zero, see Corollary 6.4.3. In general of course the integrand will not be a gradient.
Greens theorem relates the integral around a closed curve C which lies in a flat plane R2 to a
double integral over the 2-dimensional region bounded by C. It is a nice theorem, of great use;
its discoverer, Green, was a miller from Nottingham who also discovered Greens functions which
are of great use in solving partial differential equations, quantum field theory etc etc.
Theorem 7.5.1 (FTC II) Let C be a simple closed curve in R2 and be the interior of C. Also
let v : R2 R2 be a vector field on R2 , given in components by v(x, y) = P (x, y)i + Q(x, y)j.
Then, if C is parametrised in an anti-clockwise direction,
I
I
Z Z
Q P
P dx + Q dy = v dr
dx dy =
x
y
C
Proof:
(7.8)
128
Example 7.5.2 Verify Greens theorem when C is the circle r(t) = cos ti + sin tj, 0 t 2 and
v(x, y) = yi + 2xj.
Two of the uses of Greens theorem are to simplify integrals and to establish relationships between
(for example, physical) quantities.
Example 7.5.3 Evaluate
y
x
i+ 2
j.
x2 + y 2
x + y2
129
Greens Theorem can be given the following invariant form (meaning we do not have to mention
the components P, Q).
Corollary 7.5.5 (FTC II) With the assumptions of Theorem 7.5.1, the equality (7.8) can be
restated as
Z Z
( v) k dx dy =
v dr .
(7.9)
In particular, this provides a second proof of Corollary 6.4.3 for the case where C is a simple closed
curve in R2 . That is, for any scalar function f : R2 R1
I
f dr = 0
C
(7.10)
then v is not a gradient vector field that is, in this case, v 6= f for any scalar function
f : R2 R1 .
130
. Proof:
Example 7.5.6 Use both Greens Theorem and also a direct method to show that the vector field
v(v, y) = yi + xj on R2 is not a gradient vector field.
A beautiful theorem about integration on surfaces tells that in fact the formula (7.9) generalises
to curved 2-dimensional spaces, such as a hemisphere. That theorem is Stokes Theorem, and to
formulate it we need to generalise our ideas about integration from flat 2-dimensional regions to
curved 2-dimensional spaces. This is what we do next.
131
Chapter 8
The aim of this section is to show what a double integral over a curved surface S embedded in R3
such as
Z Z
g d
(8.1)
132
Z Z
g d =
lim
N,M
N
1 M=1
X
X
g(ri,j ) i,j .
(8.2)
i=0 j=0
8.2
133
Similarly, to parametrise a surface (which is a 2-dimensional object) we need such a map from a
subset of R2 :
Definition 8.2.1 A parametrisation of a surface S R3 means a differentiable map from a region
U R2 to S
r : U R2 S R3 ,
(u, v) 7 r(u, v) ,
The simplest case of a surface is a plane, even the xy-plane which we can think of as R2 . When
we refer to R2 we already have the basic Cartesian, or rectangular, coordinates.
But these are not always a good choice of coordinate to perform computations such as 2dimensional integrals (these will be defined in a later Chapter) or for writing down equations,
such as the equations of a surface.
One well-known system of coordinates in R2 are polar coordinates, or circular coordinates.
134
However, there are an infinite variety of different coordinate systems in R2 (a coordinate system
for R2 is a way of assigning uniquely two numbers (a, b) to each point of R2 ).
y = 3r sin 2
135
136
Now think about curved surfaces: the surface S defined by x2 + y 2 + z 2 = 1 can be parameterised
by
r : [0, ] [0, 2] S R3
(, ) 7 r(, ) ,
(8.3)
8.2.1
137
Parametrising graph-surfaces
An important way in which surfaces enter into our studies here are as graphs of scalar valued
functions f : R2 R1 . That is, such a surface S is the subset of R3
Graph(f ) = {(x, y, z)|z = f (x, y)}
In this case, one method for parametrising the surface is to use x and y as parameters and
r(x, y) = xi + yj + f (x, y)k.
(8.4)
Example 8.2.6 Show that the portion of the sphere of radius 3, centre the origin which lies in the
region z 0 may be parametrised as
r(x, y) = xi + yj +
p
9 x2 y 2 k, x2 + y 2 9.
(8.5)
(Note that usually the values of the parameters have to be restricted to some subset of R2 . In
this example is the disc x2 + y 2 9.)
138
Example 8.2.7 Show that the portion of the sphere of radius 3, centre the origin which lies in the
region z 0 may be parametrised as
r(x, y) = xi + yj +
p
9 x2 y 2 k, x2 + y 2 9.
Exercises
Exercise 8.2.8 Show that the plane x + 2y 3z = 5 may be parametrised by
x = 6t 10s + 5,
y = 5s,
z = 2t.
0 s 1, 0 t 2.
(8.6)
8.3
139
Once we have a parametrisation of S we can calculate the fundamental vector product N(u, v)
R3 at each point p = r(u, v) S. This vector product defines a vector field which is normal to the
surface S at each point and where kN(u, v)k is the area of an infinitesimal parallelogram in the
tangent space Tp S to S at p.
140
y
z
x
(u, v)i +
(u, v)j +
(u, v)k
u
u
u
and
x
y
z
(u, v)i +
(u, v)j +
(u, v)k
v
v
v
be partial derivatives of r with respect to u and v respectively. Then the vector
rv (u, v) =
Theorem 8.3.2 The fundamental vector product N(u, v) is perpendicular to the surface at r(u, v).
141
Corollary 8.3.3 If the surface S is described by the equation z = f (x, y), then it can be parametrised
as
r(x, y) = xi + yj + f (x, y)k
(8.7)
f
f
i
j + k.
x
y
(8.8)
142
Example 8.3.5 Compute the fundamental vector product to the sphere of radius 2 centred at the
origin .
8.4
143
With a parametrisation of the surface S at hand, we obtain the following formula for a surface
integral:
Proposition 8.4.1 For a scalar function g : R3 R1 and a surface parametrised by u and v,
Z Z
Z Z
g d =
g(r(u, v)) kN(u, v)k dudv.
S
144
(8.9)
Corollary 8.4.4 If the surface S is described by the equation z = f (x, y), (x, y) , then
Z Z s
f
f
(x, y))2 + (
(x, y))2 + 1 dx dy.
(8.10)
Area of S =
(
x
y
Notation: the infinitesimal area |N(u, v)| du dv is often written d. It is the analogue for surfaces
of the infinitesimal arc length ds = |r (t)| dt for a curve.
145
Example 8.4.5 Find the area of the part of the surface z 2 = x2 + y 2 enclosed between the planes
z = 0 and z = 4.
Exercise 8.4.6 Use the preceding theorem to show that the area of a sphere of radius 3 is 36.
Exercise 8.4.7 Prove this corollary, using equation (8.8).
Exercise 8.4.8 Find the area of the portion of the plane x + y + z = 4 that lies within the cylinder
x2 + y 2 = 4.
Exercise 8.4.9 Find the area of the portion of the sphere z =
the planes z = 0 and z = 1.
p
1 x2 y 2 which lies between
146
8.5
Just as we extended in Chapter 6 the definition of integrals of functions over paths to integrals of
vector fields over paths, we can also easily extend our definition here to integrals of vector fields
over surfaces.
Definition 8.5.1 Let S be a surface in R3 of finite extent and let v : R3 R3 be a vector field
on R3 . Also suppose that at each point of S n is a unit vector normal to S. Then the integral of
v over S or, the flux of v across S in the direction of n is defined by
Z Z
v n d =
lim
N,M
N X
M
X
i=0 j=0
(8.11)
Thus the flux is the integral over the surface of the component of the vector field normal to the
surface at each point. (You may have come across the idea of the flux of a field in electromagnetism.)
This kind of surface integral appears in the two further integral theorems (Stokes theorem and
the divergence theorem) which form the final part of this course.
147
When actually calculating a flux we use a parametrisation of the surface S. We then obtain the
following formula for the vector nd:
Proposition 8.5.2 For a surface parametrised by u and v,
nd := N(u, v)dudv.
Hence
Z Z
v nd =
Z Z
v N(u, v)dudv.
Example 8.5.3 Evaluate the flux of v(x, y, z) = xi + yj out of the surface S which is the sphere
x2 + y 2 + z 2 = 1.
First parametrise the surface. (This is simpler in this case than solving for z.)
148
In order to calculate the flux of a vector field over a surface given by an equation z = f (x, y), the
following proposition is useful:
Proposition 8.5.4 If v is a vector field on R3 and S is the surface determined by the equation
z = f (x, y),
(x, y) ,
(8.12)
149
Example 8.5.5 Calculate the flux of v = xi + yj + zk out of the surface S where S is the portion
of the elliptic paraboloid z = 9 (x2 + y 2 ) for which z 0.
p
1 x2 y 2
z 0.
150
8.6
Stokes theorem
v dr by
151
Example 8.6.2 Verify Stokes theorem if S is the portion of the elliptic paraboloid z = 9(x2 +y 2 )
for which z 0 and v is the vector field yi xj.
Z Z
( v) n d
Z Z
( v) n d
v = (z + 1)(yi + xj).
152
We can conclude with the following interesting properties compare these with those at the end
of the previous Chapter.
Corollary 8.6.5 Suppose that the surface S is closed; that is, it is contained in a finite region of
space and has no boundary (such as a sphere). Then
Z Z
( v) n d = 0 .
(8.14)
Conversely, if F is a vector field and there exists a closed surface S such that
Z Z
F n d 6= 0 ,
S
then F is not the curl of any vector field in R3 , i.e. F 6= u any vector field u.
(8.15)
153
(8.16)
C2
C1
v dr
C2
v dr by computing
RR
S (
v) n d over
154
the portion of P for which z 0. Let C be the curve which is the intersection of P with the plane
z = 0.
(5 5 1) .
6
Z Z
v n d =
Z Z
v k dxdy ,
where n is the outward unit normal vector field to the surface S and d is the area
element of S.
(iii) Show that
Z Z
v n d =
3
.
2
(iv) Hence, or otherwise, prove that there does not exist any function f : R3 R1 for
which f = v.
8.7
155
Miscellaneous Exercises
y2
x
and
v(x, y) = xy .
(x, y)
(u, v) .
y2
log
x
y2
x
dx dy ,
ZZ
ZZ
unit normal to S and d the area element. (iii) Use Stokes Theorem and your answer to (ii) to
evaluate the line integral
( 2x2 y dx + 2xy 2 dy z 3 dz ) .
(iv) Deduce that there does not exist a function f : R3 R1 such that f = v.
156
Chapter 9
9.1
Z Z
f (x) dx =
f (x, y) dx dy
lim
x0
lim
f (x) x
x0,y0
XX
f (x, y) x y.
157
Guided by this we are led to define a triple integral, for a function of three variables x, y and z
over a region V R3 , by
Z Z Z
f (x, y, z) dx dy dz =
V
lim
x0,y0,z0
XXX
f (x, y, z) x y z.
(9.1)
158
For functions of three variables the geometric meaning of the integral (9.1) is the 4-dimensional
volume between the 3-dimensional region V and the 3-dimensional graph of f : V R3 R1
which sits over V this is not possible to visualise, so when we work with triple integrals we have
to content ourselves for the most part just with analytic methods, aided by experience of integrals
of functions of one and two variables.
In practice, the portion V of three-dimensional space which the integral is over is specified by
finding appropriate limits for x, y and z. The simplest case is when the volume of integration is a
cuboid, as in the following example.
Example 9.1.1 Evaluate
Z Z Z
(x + yz) dxdydz
where V is the cuboid (x, y, z)|0 x 1, 0 y 3, 0 z 5 .
If we choose to do the z integration first, then the y integration and finally the x integration, we
must evaluate
1
0
Z 3 Z 5
( ( (x + yz) dz)dy)dx
0
(9.2)
First, we determine the smallest and largest values of the x variable in the cuboid. Then, for a
given x in that range, the y and z variables determine a 2-dimensional slice inside of which we next
determine the smallest and largest values of the y variable (set z = 0). Finally, for a given x and
y, we look for the smallest and largest values of the z variable.
159
In fact, it is easy to see that the order of integration is unimportant: for any function
we have
Z Z Z
f : V = (x, y, z)|0 x a, 0 y b, 0 z c R1
f (x, y, z) dx dy dz =
f (x, y, z) dx dy dz =
cZ b
0
f (x, y, z) dz dy dx = . . . .
f (x, y, z) dy)dz)dx
(9.3)
RRR
1 dxdydz if V is the volume (x, y, z)|0 x a, 0 y b, 0
RRR
xyz dxdydz if V is the volume (x, y, z)|1 x 2, 0 y 4, 0
When V is a more complicated shape than a cuboid it is still true that the order of integration
does not matter, provided the function being integrated is continuous, but now great care must be
taken that the correct limits are inserted the limits will change when the order of integration
is changed. A three-dimensional sketch of V is usually essential. In this situation the limits on
the inner-integrals will, in general, not be constants but will depend on the variables (there are six
possibilities):
Z Z Z
f (x, y, z) dx dy dz
x=a
z=c
= ... .
h2 (x)
y=h1 (x)
r2 (z)
y=r1 (z)
g2 (x,y)
f (x, y, z) dz dy dx
z=g1 (x,y)
q2 (y,z)
x=q1 (y,z)
f (x, y, z) dx dy dz
160
Z Z Z
1 dxdydz
(9.4)
Z Z Z
(x + y) dxdydz
(9.5)
161
Triple integrals can be used to find volumes of 3-dimensional regions (just as double integrals can
be used to find areas of 2-dimensional regions), by computing the integral of the constant function
1 over the region:
Z Z Z
1 dxdydz = lim
XXX
xyz = volume of V.
(9.6)
Example 9.1.8 Express as a repeated integral the volume of the cone bounded above by the plane
p
z = 2 and below by the surface z = x2 + y 2 .
Using the first formulation, we find an expression which can be evaluated by standard methods:
! !
Z 2 2
Z
Z
z
Vol(V )
z y
y=z
z=0
z=0
z=0
y=z
Z
z=0
x=
dx dy
dz
!
iz2 y2
x
dy dz
2
2
z y
p
2
2
2 z y dy dz
y=z
!
Z
z
/2
(9.7)
z 2 y 2
2z 2 cos2 () d dz
=/2
/2
1
(cos(2) + 1) d
=
2z
z=0
=/2 2
/2
Z 2
2 1
2z
=
sin(2) +
dz
4
2 /2
z=0
Z 2
8
z 2 dz =
=
3
z=0
2
dz
We will find that changing to cylindrical polar coordinates which make this much easier to evaluate
Using the second formulation, we get
Z 2x2
Z 2
Vol(V ) =
x=2
y= 2x2
z=
x2 +y 2
dz
dy
dx
(9.8)
Exercise 9.1.9 Check that the integral for Vol(V ) in 9.8 evaluates to 8/3
Triple integrals can also be used to calculate the mass of objects with varying density. If the
density of an object occupying the region V is (x, y, z) then its mass is
Z Z Z
M=
(x, y, z) dxdydz
(9.9)
Exercise 9.1.10 Express the mass of the cone in the previous example as a repeated integral, given
that the density at any point is equal to its distance from the origin.
162
9.2
As with double integrals, sometimes it is very helpful to change to a special coordinate system
which makes the integration regions simpler.
In three dimensions R3 there are two standard systems of coordinates that are often useful.
9.2.1
9.2.2
163
Example 9.2.1 Specify in spherical coordinates the volume V bounded below by the cone z =
p
x2 + y 2 and above by the sphere x2 + y 2 + z 2 = 1.
Exercise 9.2.2 Find the spherical polar coordinates of the point with Cartesian coordinates (2, 2, 2).
Exercise 9.2.3 Sketch the following regions in R3 and find the ranges of spherical polar coordinates to which they correspond
(i) {1 < x2 +y 2 +z 2 < 4},
(ii) {x2 +y 2 +z 2 < 1, y > 0},
p
(iii) { x2 +y 2 +z 2 >2 , z> 3(x2 +y 2 ) }
(iv) {x > 0, y < 0, z < 0},
9.3
Changing variables
With triple integrals, just as with double integrals, it can often be much easier to evaluate a particular triple integral if we utilise a different coordinate system to standard Cartesian coordinates
(x, y, z). In three dimensions there are two systems of coordinates that are particularly useful:
cylindrical polar coordinates (r, , z), and spherical polar coordinates (, , ).
However, in order to use different coordinate systems we need the change of variable formula for
triple integrals. Recall that for a double integral this says that:
Z Z
Z Z
(x, y)
f (x, y) dxdy =
f (x(u, v), y(u, v))
dudv
(u,
v)
U
U
!
y
x
(x, y)
u
u
= det
.
where
y
x
(u, v)
v
v
(9.10)
164
Theorem 9.3.1 Suppose that the triple of functions u = u(x, y, z), v = v(x, y, z) and w =
w(x, y, z) are invertible so that x = x(u, v, w), y = y(u, v, y) and z = z(u, v, w). Also suppose
that the volume V in (x, y, z)-space corresponds to the volume V in (u, v, w)-space. Then
Z Z Z
Z Z Z
(x, y, z)
f (x(u, v, w), y(u, v, w), z(u, v, w))
f (x, y, z) dxdydz =
dudvdw
(u,
v,
w)
V
V
(9.11)
where
(x, y, z)
= det
(u, v, w)
x
u
x
v
x
w
y
u
y
v
y
w
z
u
z
v
z
w
(x,y,z)
Note that in the integrand it is the modulus of the Jacobian (u,v,w)
.
Proof:
Example 9.3.2 Show that the Jacobian for transforming from Cartesian coordinates (x, y, z) to
cylindrical polar coordinates (r, , z) is
(x, y, z)
= r.
(r, , z)
(9.12)
165
Example 9.3.3 Using cylindrical polars we can now evaluate the integral in example 9.1.8 easily:
Evaluate the volume of the cone bounded above by the plane z = 2 and below by the surface
p
x2 + y 2 .
z=
Exercise 9.3.4 Find the volume of the solid bounded above by the elliptic paraboloid z = 1 (x2 +
y 2 )and below by the (x, y)-plane.
166
The other standard of coordinates in three dimensions are spherical polar coordinates.
Example 9.3.5 Show that the Jacobian for changing from Cartesian coordinates to spherical polar
coordinates is 2 sin .
167
Example 9.3.6 Find the volume of the solid contained within both the sphere = a and the cone
= (where 0 /2).
168
Example 9.3.7 By changing to spherical polar coordinates evaluate the triple integral
Z Z Z
1
dxdydz ,
2
2
2 3/2
V (x + y + z )
where V is the volume in R3 which is situated in the region y 0 and bounded between the surfaces
x2 + y 2 + z 2 = 1 and x2 + y 2 + z 2 = 9.
Exercise 9.3.8 Find the mass of a ball of radius 2 given that its density at each point is equal to
four times the distance of the point from the centre.
Exercise 9.3.9 Let V be the volume bounded below by the cone z =
R R R (x2 +y2 +z2 ) 32
dxdydz.
sphere x2 + y 2 + z 2 = 1. Evaluate
V e
p
x2 + y 2 and above by the
9.4
169
The divergence theorem is a 3-dimensional FTC, and an analogue of the flat-space 2-dimensional
FTC Greens theorem. The proof is quite similar.
Theorem 9.4.1 Suppose that V is a solid in R3 which is bounded by the closed surface S, and
that v is a vector field on R3 . Then
Z Z Z
v dx dy dz =
Z Z
v n d.
(9.13)
170
Example 9.4.2 Verify the divergence theorem when S is the sphere x2 +y 2 +z 2 = 1 and v = xi+yj.
p
x2 + y 2 + z 2 (xi + yj + zk)
If the sphere is region V R3 and its surface is S with outward unit normals n then the flux out
of S is
Flux =
Z Z
v n d
(x x2 + y 2 + z 2 ) +
(y x2 + y 2 + z 2 ) +
(z x2 + y 2 + z 2 )
v =
x
y
z
2
2
2
p
x
+y
+z
= 3 x2 +y 2 +z 2 + p
x2 +y 2 +z 2
p
= 4 x2 +y 2 +z 2
It is now a good idea to change to spherical polar coordinates (, , ) with
dx dy dz = 2 sin d d d. In these variables v = 4 and so
Z R Z 2 Z
Flux =
4 2 sin d d d
r=0
=
=
=0 =0
iR h i2 h
44 /4
cos()
R4 2 2 = 4R4 .
i
0
171
Example 9.4.4 Let v(x, y, z) = 5x i y j + exy k in R3 , and let S be the unit sphere with outward
unit normal vector n(x, y, z) at each point (x, y, z) S.
(a) Calculate .v and v.n .
(b) Use the Divergence Theorem to show that
Z Z
16
(5x2 y 2 + zexy ) d =
,
3
S
where d is the area element of S.
172
Exercises
Exercise 9.4.5 Use the divergence theorem to evaluate the flux of v = xyi + yzj out of the unit
cube 0 x 1, 0 y 1, 0 z 1.
Exercise 9.4.6 Show that, if S is a closed surface and v is a vector field, then the flux of v
out of S is zero.
Exercise 9.4.7 .
Let a, b be non-zero numbers, and let V be the volume enclosed between the surface
x2
y2
+ 2 z2 = 0
2
a
b
and the planes z = 1 and z = 2. By making the change of coordinates
x = ar cos(),
evaluate the triple integral
ZZZ
y = br sin(),
x2
y2
z=z
ze( a2 + b2 +z ) dx dy dz.
173
x2 + y 2 z 2 0,
y 0,
z0.
174
Appendix A
Vectors in R2
Definitions
A vector in R2 can be thought of an arrow or directed line segment and is defined by its components
along the x and y axes. We can write the vector from the point P to the point Q as P~Q. !
If P has
da
Cartesian coordinates (a, b) and Q has coordinates (d, e) then P~Q has components
eb
You will see vectors written as u (printed), u
(on the board) or ~u (US notation).
A.1.2
Unit vectors
The vectors from the origin to the points (1, 0) and (0, 1) have special names
!
!
1
0
=i,
=j
0
1
We also sometimes use the names e1 = i and e2 = j.
Any vector in R2 can be written as a linear combination of i and j in a unique way
!
a
= ai + bj
b
A.1.3
a2 + b 2 .
A.2. VECTORS IN R3
A.1.4
175
Given two vectors u and v then their scalar or dot product is a number. It is equal to the product
of their lengths times the cosine of the angle between them. It is written u v. We have
u v = ||u|| ||v|| cos()
If u =
a
b
and v =
then u v = ac + bd
1. u u = ||u||2
2. u v = v u for all vectors u and v.
3. If u v = 0 then u and v are orthogonal.
4. If u v = ||u|| ||v|| then u and v are parallel
5. The unit vectors in R2 satisfy i i = j j = 1 ,
ij=0.
They are orthonormal. This means they are orthogonal and have unit length.
A.2
A.2.1
Vectors in R3
Definition
f c
A.2.2
Unit vectors
The vectors from the origin to the points (1, 0, 0), (0, 1, 0) and (0, 0, 1) have special names.
1
0 = i ,
0
0
1 = j ,
0
0
0 = k
1
176
A.2.3
a2 + b 2 + c2 .
A.2.4
Given two vectors u and v then their scalar or dot product is a scalar, that is, a number.
It is equal to the product of their lengths times the cosine of the angle between them. It is
written u v. We have
a
d
If u = b and v = e
then u v = ad + be + cf
c
f
1. u u = ||u||2
2. u v = v u for all vectors u and v.
3. If u v = 0 then u and v are orthogonal.
4. If u v = ||u|| ||v|| then u and v are parallel
5. The unit vectors in R2 satisfy i i = j j = k k = 1 ,
ij= ik =jk= 0.
They are orthonormal. This means they are orthogonal and have unit length.
A.2.5
A.2. VECTORS IN R3
177
a
d
a
d
bf ce
If u =
b and v = e then u v = b e = cd af .
c
f
c
f
ae bd
Geometrically, u v is a vector of length ||u|| ||v|| sin() which is orthogonal to both u and v, i.e.
You can remember which direction u v points along by the right-handed rule. If u and v point
along the thumb and first fingers of the right hand respectively then uv points along the direction
of the second finger of the right hand.
The length of u v is also equal to the area of the parallelogram which has u and v for two sides.
The unit vectors in R3 satisfy
ii=0
ij=k
j i = k j j = 0
ki = j
A.2.6
i k = j
jk=i
k j = i k k = 0
Identities
178
A.3
Exercises
179
Appendix B
Lower case
Name
Upper case
Lower case
Name
Alpha
Nu
Beta
Xi
Gamma
Omicron
Delta
Pi
Epsilon
Rho
Zeta
Sigma
Eta
Tau
Theta
Upsilon
Iota
Phi
Kappa
Chi
Lambda
Psi
Mu
Omega
Aleph (Hebrew)
180
QUADRIC SURFACES
Appendix C
Quadric Surfaces
A quadric surface is one defined by a quadratic equation of the variables (x, y, z), i.e an equation
of the form
ax2 + bxy + cxz + dy 2 + eyz + f z 2 + gx + hy + jz + k = 0
The classification of the different forms of equation is beyond this course. Suffice to say that by
changing variables one can put the equation into one of 17 different standard forms, some of which
have no real solutions.
Six of standard forms occur very frequently in the notes as examples:
The ellipsoid, ax2 + by 2 + cz 2 = 1
This includes the sphere and spheroids as special cases. If a = b = c then the surface is a
sphere. If a = b 6= c then it is a spheroid. If the spheroid is flattened (c > a) it is called
181
Typical examples of some of these are the standard surfaces
The paraboloid of revolution, which is a particular case of the elliptic paraboloid. The
standard example we use is z = x2 + y 2
2
1
0
-1
-2
4
2
1
0
-2
-1
0
1
2
1
0
-1
-2
4
0
-2
-4
-2
-1
0
1
2
182
QUADRIC SURFACES
4-4
2
-4
4
-2
-2
4
-2
-2
-4
4
-4
4
-2
-2
-4
-4
4-4
2
0
-2
-4
4
-2
-4
-2
183
The circular cylinder x2 + y 2 = 1 which is a particular case of the elliptic cylinder.
1-1
0.5
-0.5
0.5
-0.5
-1
1
0.5
-0.5
-1
-0.5
0.5
-0.5
-1
2
0
0.5
0.25
-1
1
0
-0.25
0.5
-0.5
-1
-2
-0.5
-0.5
0
0.5
1 -1
Oblate
Prolate
-0.5
2
0.5
0.5
0.5
-0.5
-1
Parabolic, y = x2
-2
-2
-0.5
-1
Hyperbolic, x2 y 2 = 1
184
PROOFS OF THEOREMS
Appendix D
Proofs of theorems
D.1
We need to prove
Z Z
( v) n d =
v dr
(8.13)
0
0
v1
u1 (x, y, z) = v1 (x, y, z)i = 0 , u2 = v2 j = v2 , u3 = v3 k = 0 ,
v3
0
0
and clearly v = u1 + u2 + u3 , so that to prove Stokes theorem, all we need to do is prove it for
each of the vector fields ui , that is
I
Z Z
ui dr
( ui ) n d =
for i = 1, 2, 3
We will do the case i = 1, the others will clearly be true using the same method.
We will next assume that S is the graph of a function f (x, y) lying over the region in the )x, y)plane. If S is not the graph of a function, we can split it into pieces which are graphs and combine
the result for each piece to arrive at the theorem.
Now we consider u1 = v1 (x, y, z)i
u1 =
v1
v1
j
k
z
y
185
u1 nd
=
=
=
=
=
=
Z Z
v1
v1
(
j
k) (fx i fy j + k) dx dy
y
z
Z Z
v1 f
v1
dx dy
z y
y
Z Z
D.2
0110
u
0110
v
If the vertices of the original cuboid are (u, v, w), (u + u, v, w), (u, v + v, w), (u, v, w + w),
(u + u, v + v, w), (u + u, v, w + w), (u, v + v, w + w), (u + u, v + v, w + w), then this cuboid
has volume uvw in (u, v, w) space. It is approximately mapped to the parallelepiped defined
by vertices r(u, v, w), r(u + u, v, w), r(u, v + v, w) and r(u, v, w + w) which has edges
a =
b
c =
r
+ o(u) ,
u
r
r(u, v + v, w) r(u, v, w) = v
+ o(v) ,
v
r
r(u, v, w + w) r(u, v, w) = w
+ o(w) ,
w
r(u + u, v, w) r(u, v, w) = u
186
PROOFS OF THEOREMS
(u,v,w+ w)
111
000
000
111
(u,v,w)
(u+ u,v,w)
r (u,v,w+ w)
r (u,v+ v,w)
b
11
00
r (u,v,w)
a1 a2
|a (b c)| = det b1 b2
c1 c2
In components,
a =
b
c =
a3
b3
c3
r
x y z
+ o(u) = u( ,
,
) + o(u)
u
u u u
x y z
r
+ o(v) = v( ,
,
) + o(v)
v
v
v v v
x y z
r
+ o(w) = w(
,
,
) + o(w)
w
w
w w w
y
x
z
u u u
(u, v, w)
x y z
u v w = vol(x,y,z)
det v v v uvw =
(x, y, z)
y
x
z
w
w
w
This is the volume element in (x, y, z) space which we conventionally write as x y z, so that
D.3
187
Z Z Z
v dx dy dz =
Z Z
v n d.
where n is the outward normal to the surface S which bounds the volume V
As with the proof the Stokes theorem, we can consider the vector field v component by component.
Lets take the z component as an example and consider just the case
v = v3 (x, y, z)k
We will describe V by identifying a region in the (x, y) plane underneath V and specifying the
allowed range of z for each (x, y) . We will assume that this splits S into an upper surface S2
and a lower surface S1 so that we can take S1 to be the graph of a function f1 and S2 to be the
graph of a function f2 . If V is more complicated, then we can split it into sub-volumes so that this
simplified analysis works and then add the results for each sub-volume together.
0110
z = f (x,y)
10
S
0011 2
1010
2
1010
11001100
10
1010
z = f (x,y)
00000000000000000000000000000000000000000000000000000000000000000000000
11111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000
1111111111111111111
1
0000000000000000000
1111111111111111111
00000000000000000000000000000000000000000000000000000000000000000000000
11111111111111111111111111111111111111111111111111111111111111111111111
S
1
1111111111111111111
00000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
00000000000000000000000000000000000000000000000000000000000000000000000
11111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000
0000000000000000000
1111111111111111111
00000000000000000000000000000000000000000000000000000000000000000000000
11111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
11111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000
1111111111111111111
00000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
00000000000000000000000000000000000000000000000000000000000000000000000
11111111111111111111111111111111111111111111111111111111111111111111111
11001100
0000000000000000000
1111111111111111111
1111111111111111111
00000000000000000000000000000000000000000000000000000000000000000000000
11111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
Above the point (x0 , y0 ), z ranges over f1 (x0 , y0 ) z f2 (x0 , y0 ), so that for any function
g(x, y, z),
Z Z Z
g dx dy dz =
Z Z
f2 (x,y)
z=f1 (x,y)
g dz
dx dy
z=f1 (x,y) z
Z Z
=
v3 (x, y, f2 (x, y)) v3 (x, y, f1 (x, y)) dx dy
Z Z
=
v3 (x, y, f2 (x, y))k N1 v3 (x, y, f1 (x, y))k N2 dx dy
where Ni =
since N k = 1.
188
PROOFS OF THEOREMS
Now we note that Ni are upward pointing normals to the surfaces Si , so that if n are outward
pointing unit normals to S we have that
N2 dx dy = n d ,
N1 dx dy = n d
n points up and out
11111
00000
00000
11111
S2
S1
This means that
Z Z Z
v dx dy dz
=
=
1111
0000
0000
1111
Z Z
Z Z
Z Z
v N dx dy
Z Z
v n d +
S2
Z Z
as required.
v n d
S1
v N dx dy
v n d