Вы находитесь на странице: 1из 117

MATH1007

Mathematical Methods
for Physical Sciences
Skeletal Notes
Magnus O. Borgh
based on notes by J.A. Vickers, L. Barack, T.J. Sluckin, D.A. Ross, Colin Please
School of Mathematics
University of Southampton
January 2013
CONTENTS i
Contents
1 Multiple Integration 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Properties of the integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Evaluation of double integrals . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.1 Simple and regular domains . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.2 Evaluation of an integral over a simple domain . . . . . . . . . . . . . 4
1.3.3 Examples of evaluating integral . . . . . . . . . . . . . . . . . . . . . 6
1.3.4 Common integrals that arise in practice . . . . . . . . . . . . . . . . . 8
1.4 Double integrals in polar coordinates . . . . . . . . . . . . . . . . . . . . . . 9
1.4.1 Polar coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.4.2 The use of polar coordinates in double integrals . . . . . . . . . . . . 10
1.5 Changes of variables in double integrals . . . . . . . . . . . . . . . . . . . . . 13
1.6 Triple integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.7 Change of variables in triple integrals . . . . . . . . . . . . . . . . . . . . . . 21
1.7.1 Cylindrical Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.7.2 Spherical polar coordinates . . . . . . . . . . . . . . . . . . . . . . . . 25
1.7.3 Changes of variables in triple integrals . . . . . . . . . . . . . . . . . 28
2 The Gradient, Divergence, and Curl 30
2.1 Directional Derivatives and the gradient of a scalar function . . . . . . . . . 30
2.2 Divergence of a vector function . . . . . . . . . . . . . . . . . . . . . . . . . 34
2.3 Curl of a vector function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3 Curves and Line Integrals 40
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.2 Parametric Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
ii CONTENTS
3.3 The length of a curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.4 Line integral of a function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.5 Curves in three or more dimensions . . . . . . . . . . . . . . . . . . . . . . . 45
3.6 Vector Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.7 Line integrals of vector elds . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4 Surfaces, surface integrals, ux integrals 53
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.2 Parametric representation of surfaces . . . . . . . . . . . . . . . . . . . . . . 53
4.3 Area of a surface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.4 Surface integral of a function . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
4.5 Surface integrals of vector functions: ux integrals . . . . . . . . . . . . . . . 61
4.6 Relationship between multiple, ux and line integrals . . . . . . . . . . . . . 63
4.6.1 The divergence theorem . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.6.2 Stokess Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5 Complex Numbers 65
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
5.2 Powers of i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.3 Argand Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.4 Modulus and Argument of a Complex Number . . . . . . . . . . . . . . . . 67
5.5 Complex Conjugates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.6 Addition and subtraction of complex numbers . . . . . . . . . . . . . . . . . 70
5.7 Multiplication of Complex Numbers . . . . . . . . . . . . . . . . . . . . . . 71
5.8 Division of Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . 74
5.9 Complex Exponentials and Trigonometric Functions . . . . . . . . . . . . . 75
5.10 Further examples of complex numbers in polar form . . . . . . . . . . . . . 77
CONTENTS iii
5.11 Multiplying Complex Numbers in Exponential Form . . . . . . . . . . . . . 78
5.12 Dividing complex numbers in exponential form . . . . . . . . . . . . . . . . 79
5.13 Calculating Powers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
5.14 de Moivres Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
5.15 Applications of de Moivres Theorem . . . . . . . . . . . . . . . . . . . . . . 80
5.16 Solving Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
6 Dierential Equations 87
6.1 Types of Ordinary Dierential Equation . . . . . . . . . . . . . . . . . . . . 87
6.2 Simple Dierential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . 88
6.3 Separation of Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
6.4 Homogeneous Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
6.5 First Order Linear Dierential Equations . . . . . . . . . . . . . . . . . . . 97
6.6 Exact Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
7 Linear ODEs of the Second Order 107
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
7.2 Homogeneous case: f = 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
7.2.1 Case p
2
> 4q: real and distinct roots . . . . . . . . . . . . . . . . . . 109
7.2.2 Case p
2
= 4q: equal real roots . . . . . . . . . . . . . . . . . . . . . . 110
7.2.3 Case p
2
< 4q: complex conjugate roots . . . . . . . . . . . . . . . . . 111
7.3 Boundary and Initial Conditions . . . . . . . . . . . . . . . . . . . . . . . . . 112
1
1 Multiple Integration
1.1 Introduction
You have already seen the integral of a function of one variable y = f (x) over an interval:
_
b
a
f(x) dx
The geometrical meaning of this symbol is the area of the plane region bounded by the
curve y = f (x), the x-axis and the lines x = a and x = b.
Consider now the meaning of a double integral of a function of two variables f (x, y) over
a domain D in the xy-plane.
By analogy this is the volume of a three dimensional region S, bounded above by the
surface z = f (x, y), the xy-plane and the (irregular) cylindrical sides parallel to the z-axis,
passing through the boundary of D.
The region D is called the domain of integration. We will represent the volume integral
with the symbol
__
D
f(x, y) dA =
__
D
f(x, y) dx dy
1.2 Properties of the integral
i) The area of D is given by
__
D
1 dA =
__
D
dA
At rst sight this looks like the volume of an irregular cylinder with base D and height
1, which indeed it is. But we also know the general formula for the volume of a cylinder is:
2 1 MULTIPLE INTEGRATION
1.2 Properties of the integral 3
Volume = area of D height of cylinder
Since the height of the cylinder is 1, the numerical value of the volume (beware units!) is the
same as the area of D. Therefore, we can use double integrals to measure the are of regions
of the plane.
Area of D =
__
D
1 dA =
__
d
dx dy .
1. The integral is linear:
__
D
(f(x, y) +g(x, y)) dA =
__
D
f(x, y) dA+
__
D
g(x, y)) dA
(where and are constants)
2. Inequalities are preserved:
If f(x, y) g(x, y) then
__
D
f(x, y) dA
__
D
g(x, y) dA
3. The triangle inequality holds.

__
D
f(x, y) dA

__
D
|f(x, y)| dA
4. Additivity of domains:
If D
1
, D
2
, D
3
, . . . , D
k
are non-overlapping domains in the xy plane on each of which
f (x, y) is integrable, then f (x, y) is integrable over the union of these domains: D =
D
1
D
2
D
3
. . . D
k
.
4 1 MULTIPLE INTEGRATION
1.3 Evaluation of double integrals
1.3.1 Simple and regular domains
The evaluation of an integral is easiest when the domain of integration is said to be simple.
y-simple domain: bounded by two verti-
cal lines x = a, x = b and two continuous
graphs y = c (x) , y = d (x)
x-simple domain: bounded by two hori-
zontal lines y = c, y = d and two continu-
ous graphs x = a (y) , x = b (y)
A domain that is not simple but which can be split up into x-simple and y-simple parts
is called regular. An integral over a regular domain is evaluated as the sum of integrals over
each constituent simple domain (section 2.2 property v.).
Example: Regular domain into simple domains.
1.3.2 Evaluation of an integral over a simple domain
Suppose that D is y-simple and is bounded by x = a. x = b, y = c (x) , y = d (x). The
integral
_
D
f (x, y) dA
1.3 Evaluation of double integrals 5
is the volume of the vertical cylinder of base D and bounded at the top by z = f (x, y). See
diagram on the left below. Consider a very thin slice of the solid perpendicular to the x-axis
at a point x. The value of x does not vary across the slice and y is bounded between
c(x) y d(x)
The area of the slice is one-dimensional integral of the form:
(x) =
_
y=d(x)
y=c(x)
f(x, y)dy ( with x constant)
We can think of the cylinder as if it were like loaf of bread formed from (innitely) many
such slices. The volume of the cylinder is then obtained by summing up the contribution of
all such thin slices of area (x) and thickness dx between x = a and x = b. Therefore it is
given by:
__
D
f(x, y) dA =
_
b
a
(x) dx =
_
b
a
_
_
d(x)
c(x)
f(x, y) dy
_
dx
_
b
a
_
d(x)
c(x)
f(x, y) dy dx
_
b
a
dx
_
d(x)
c(x)
dy fx, y)
If D is x-simple, we can repeat the same procedure but with each slice perpendicular to the
y-axis.
We have the following fact:
Fact: If f (x, y) is continuous on the bounded y-simple domain D given by a x b
and c (x) y d (x), then
__
D
f(x, y) dA =
_
b
a
_
d(x)
c(x)
f(x, y) dy dx .
6 1 MULTIPLE INTEGRATION
A similar rule hold for x simple regions. If f (x, y) is continuous on the bounded x-simple
domain D given by c y d and a (y) x b (y) then
__
D
f(x, y) dA =
_
d
c
_
b(x)
a(x)
f(x, y) dx dy .
1.3.3 Examples of evaluating integral
These examples stress the importance of drawing the domain of integration in the xy-plane.
It gives geometrical insight that can lead to considerable simplication.
Example 1: Find the volume of the solid lying above the square dened by 0 x 1,
1 y 2 and below the plane z = 4 x y.
V =
__
D
z(x, y) dA =
__
D
(4 x y) dx dy
Start by drawing the region D!!
Notice that the square is both x- and y-simple so the double integral can be evaluated
either way: You will get the same answer!
Note: The limits on the inner integral do not depend here on the integration variable of
the outer integral. This is because in this example the integration domain D is rectangular
(a square). If it were not a rectangle, the inner limits would depend on the outer integration
variable.
1.3 Evaluation of double integrals 7
Example 2: Evaluate
__
T
xy dA
where T is the interior of the triangle with vertices (0, 0), (1, 0) and (1, 1).
Draw the region!!
D
(1,1)
(1,0)
(0,0)
x
y
Notice that the triangle is both x- and y-simple so again the double integral can be
evaluated either way.
y-simple region is described by 0 < x < 1, 0 < y < x
x-simple region is described by 0 < y < 1, y < x < 1
Hence integral can be written in either of the following two ways
_
1
0
__
x
0
xy dy
_
dx
_
1
0
__
1
y
xy dx
_
dy
evaluate either of these to nd
_
1
0
__
x
0
xy dy
_
dx =
_
1
0
_
xy
2
2
_
x
0
dx =
_
1
0
x
3
2
dx =
_
x
4
8
_
1
0
=
1
8
8 1 MULTIPLE INTEGRATION
Sometimes altering the order of integration can make the integral easier to evaluate and
the following is an example of this.
Example 3: Evaluate
I =
__
D
e
y
3
dA
where D is a region bounded by x = 0, y = 1 and y =

x with 0 y 1
This region is both x-simple and y-simple so the solution should be the same which ever
order we use.
Note (we might like to write the region as bounded by x = 0, y = 1 and x = y
2
)
x-simple is 0 < x < 1

x < y < 1
_
1
0
_
1

x
e
y
3
dydx
This integral cant be evaluated as it is since we dont know the integral of exp (y
3
) (if
you dont believe me just try to nd it in a table of integrals or use Maple or Mathematica).
We can try to swap the order of integration. The domain of integration D is also y-simple.
y-simple is 0 < y < 1 0 < x < y
2
_
1
0
_
y
2
0
e
y
3
dxdy
and this can be evaluated to give
_
1
0
_
e
y
3
_
y
2
0
dy =
_
1
0
y
2
e
y
3
dy =
1
3
_
e
y
3
1
_
1.3.4 Common integrals that arise in practice
Note there are a number of problems were double integrals arise naturally. We have already
seen one of these when we considered the area of a region D.
Area of D =
__
D
dA
1.4 Double integrals in polar coordinates 9
Other examples are:
The average value of a function f(x, y) over a region D
Average of f =
__
D
f(x, y) dA
__
D
dA
The centre-of-mass of a region D is given by the point ( x, y) where
x =
__
D
x dA
__
D
dA
y =
__
D
y dA
__
D
dA
.
The total mass of a region D which has density (x, y) is given by
Mass of D =
__
D
(x, y) dA
In each case the necessary integrals need to be caluclated.
1.4 Double integrals in polar coordinates
1.4.1 Polar coordinates
Some integrals are much simpler to evaluate if they are expressed in alternative coordinate
representations. When you have a circular domain of integration, or a radially-symmetric
integrand it is often easier to evaluate the integral in terms of polar rather than Cartesian
coordinates.
Recall that in polar coordinates there is an origin called the pole and denoted by O, and
a polar axis which is a half line extending from O.
The position of a point in the plane is determined by its polar coordinates (r, ) where:
r is the distance from O to P.
is the angle that the vector OP makes with the polar axis, counterclockwise angles
being considered as positive.
10 1 MULTIPLE INTEGRATION
NB: polar coordinates are not unique (r, ) and (r, + 2n) are the same point when n
is an integer.
The conversion formulae that relate Cartesian and polar coordinates are as follows:
x = r cos
y = r sin
_

_
r =
_
x
2
+y
2
= tan
1
_
y
x
_
1.4.2 The use of polar coordinates in double integrals
To illustrate the use of polars, consider the problem of nding the volume V of the solid
region lying above the xy-plane (so that z 0) and beneath the paraboloid z = 1 x
2
y
2
(so that z 1 x
2
y
2
).
Note that the paraboloid intersects the xy-plane in the circle x
2
+ y
2
= 1. Hence the
region is both x-simple and y-simple and the volume is given in Cartesian coordinates by
the following.
V =
_
x=1
x=1
_
y=

1x
2
y=

1x
2
(1 x
2
y
2
) dx dy
1.4 Double integrals in polar coordinates 11
The integral is a mess. It is much neater to convert to polar coordinates.
The domain of integration is:
x
2
+y
2
1
and if we use polar coordinates this becomes
0 r 1 , 0 2
The integrand becomes
1 x
2
y
2
= 1 (r cos )
2
(r sin )
2
= 1 r
2
So that the integral can now be written as
V =
__
D
(1 r
2
) dA
where D is 0 r 1, 0 2.
If we were using Cartesian coordinates (x, y) then the area element, dA, is just dxdy.
To nd this area element consider being at any point (x, y) and ask what area is described
if we change position by dx and dy.
However, in cylindrical polar coordinates dA it is NOT just dr d as can be seen from
the following diagram:
Therefore we have for Cartesian and cylindrical polar coordinates
dA = dx dy = r dr d
12 1 MULTIPLE INTEGRATION
In general whenever you change coordinates in a multidimensional integral you have to
be very careful about what dA becomes. (We study a systematic way of working this out
in the next section.)
In polars the original integral therefore converts to
V =
_
x
2
+y
2
1
(1 x
2
y
2
)dx dy =
_
0r1
02
(1 r
2
)r dr d
Thus (only) because of the integrand and the shape of the domain of integration we have
achieved a dramatic simplication. Indeed, as the domain of integration in the (r, ) plane
in this example is now a rectangle the order of the integration is irrelevant (but in general
may still be important).
V =
_
=2
=0
_
r=1
r=0
(1 r
2
)r dr d
=
_
=2
=0
_
r
2
2

r
4
4
_
1
0
d
=
_
=2
=0
1
4
d =

2
Summary: To change to polar coordinates:
1. Express the integrand as a function of r and .
2. Express the domain of integration in polar coordinates
3. Write the area element as dA = r dr d
4. Evaluate the integral
Example Evaluate the integral
__
R
y
2
x
2
dA
where R is the part of an annulus given by
a
2
x
2
+y
2
b
2
, x 0, y 0, y x
1.5 Changes of variables in double integrals 13
Again using Cartesian coordinates is very awkward so we use cylindrical polar coordi-
nates.
The integrand becomes
y
2
x
2
=
_
r sin
r cos
_
2
= tan
2

The domain of the region is now given by


a r b, 0

4
The integral therefore becomes
__
R
y
2
x
2
dA =
_
=/4
=0
_
r=b
r=a
r tan
2
dr d
=
_
=/4
=0
_
b
2
a
2
2
_
(sec
2
1) d =
_
b
2
a
2
2
_
_
1

4
_
1.5 Changes of variables in double integrals
The transformation of double integrals to polar coordinates is just a special case of a general
change of variables formula in double integrals. Often a general change of variables can help
to simplify the representation of a domain of integration, or to exploit a symmetry of the
integrand.
A transformation of coordinates in a double integral is a set of two functions
u = U (x, y) v = V (x, y)
that give a relationship between the old variables (x, y) and the new ones (u, v).
We suppose that this transformation is locally invertible, that is there exist inverse func-
tions
x = X (u, v) y = Y (u, v) .
These functions map the domain of integration D in the (x, y) to a domain D

in the (u, v)
plane. Thus we have
__
D
f (x, y) dA =
__
D

f (x (u, v) , y (u, v)) dA

14 1 MULTIPLE INTEGRATION
The goal is to nd out how the elemental unit of area transforms from dA = dx dy to dA

in the (u, v)-plane.


Consider the innitesimal rectangular patchwork dA = dx dy at the point (x, y). Label
the four corners of this as A, B C, D. Under the transformation u = U (x, y), v = V (x, y),
these map to A

, B

, C

and D

. Due to the innitesimal size of the original rectangle this


new innitesimal patchwork dA

will approximately be a parallelogram. The coordinates of


its vertices will be:
A : (x, y) A

: (U (x, y) , V (x, y))


B : (x +dx, y) B

: (U (x +dx, y) , V (x +dx, y))


C : (x +dx, y +dy) C

: (U (x +dx, y +dy) , V (x +dx, y +dy))


D : (x, y +dy) D

: (U (x, y +dy) , V (x, y +dy))


The area of the parallelogram will dA

be given by
dA

= |A

|
where
A

= (U (x +dx, y) U (x, y)) i + (V (x +dx, y) V (x, y)) j,


A

= (U (x, y +dy) U (x, y)) i + (V (x, y +dy) V (x, y)) j.


These can be expanded about (x, y)using Taylors theorem to yield
A

= U
x
dx i +V
x
dx j +O
_
(dx)
2
_
,
A

= U
y
dy i +V
y
dy j + O
_
(dy)
2
_
.
Thus in the limit as dx, dy 0 we have
dA

i j k
U
x
dx V
x
dx 0
U
y
dy V
y
dy 0

U
x
U
y
V
x
V
y

dx dy =

(U, V )
(x, y)

dA
Thus the transformed innitesimal element depends on the Jacobian of the transformation
functions at that point. Our initial assumption that a local inversion of the functions existed
means that the Jacobian is non-vanishing. Hence using the reciprocity property of Jacobians
we have
dA =

(X, Y )
(u, v)

dA

.
Finally we can then write:
__
D
f (x, y) dx dy =
__
D

f (X (u, v) , Y (u, v))

(X, Y )
(u, v)

du dv .
1.5 Changes of variables in double integrals 15
We can summarise this result by writing
dA = dx dy =

(x, y)
(u, v)

du dv
Example: We can verify this result in the case of polar coordinates:
x = r cos y = r sin
dx dy =

x
r
x

y
r
y

dr d =

cos r sin
sin r cos

dr d = r dr d.
The recipe for changing variables in double integral from (x, y) to (u, v) is therefore
1. Express the integrand as a function of u and v.
2. Write the boundaries of the domain of integration in terms of u and v.
3. Write the area element as dA = |J (u, v)| dudv.
16 1 MULTIPLE INTEGRATION
Example : Use the change of variables
u = x +y, v =
y
x
to nd the integral
__
R
1
xy
dx dy
where the region is dened by the interior of the quadrilateral bounded by
x +y = 1, x +y = 3, y = x, y = 2x
Note we can rearrange the denitions to nd
x =
u
1 +v
y =
uv
1 +v
The integrand then becomes
1
xy
=
(1 +v)
2
u
2
v
The boundaries become
x +y = 1 u = 1, x +y = 3 u = 3,
y = x v = 1, y = 2x v = 2
The change of coordinates gives us
dA = dxdy =

1
1+v

u
(1+v)
2
v
1+v
u
(1+v)
2

dudv
The integral then becomes
_
3
1
_
2
1
1
uv
dudv =
_
3
1
1
v
ln 2 dv = (ln 3)(ln 2)
1.5 Changes of variables in double integrals 17
Example : Use an appropriate change of variables to nd the area of an elliptic disk
with shape given by x
2
/a
2
+y
2
/b
2
1.
Area of the disk is given by
_
dA =
_
dxdy
where the region of the integral is given by the interior of the ellipse
_
x
a
_
2
+
_
y
b
_
2
= 1
So a very simple change of variables would be to take
x = au y = bv
The integrand in this case is just 1 so ther eis no need to modify that The boundary of the
regions becomes the circle with radius of one
u
2
+v
2
= 1
and the area element becomes
dA = dxdy =

a 0
0 b

dudv = ab dudv
So that the integral now becomes
_
dA =
_
ab dudv
where the integral is over the circle of radius equal one. You coudl evaluate this integral
by doing a change of vairables to polar coordinates but in this case we know that a cirle of
radius equal to one has area 2 Hence
_
dA =
_
ab dudv = ab
_
dudv = 2ab .
18 1 MULTIPLE INTEGRATION
1.6 Triple integrals
Once it is clear how to extend denite integration to two-dimensional domains, the extension
to three (or more) dimensions is relatively straightforward.
If f (x, y, z) is a function dened on a domain D in three-dimensional space, then we can
dene the integral of this function by
___
D
f(x, y, z) dV
where dV denotes a small volume element. In Cartesian this takes the form dV = dxdy dz.
This integral can either be interpreted as a hyper-volume (a volume in four dimensions -
cf. double integral case) or, more intuitively for example, as the mass of an object D, whose
density is f (x, y, z).
The procedure for evaluating the integrals in 3-D is eectively the same as that studied
for 2-D: we integrate the three variables in succession.
Example 1: Let B be a rectangular box 0 x a, 0 y b, 0 z c. Evaluate
the integral
I =
___
B
_
xy
2
+z
3
_
dV .
Using the diagram to show the slicing.
1.6 Triple integrals 19
This region is simple (x-simple, y-simple and z-simple) and can be sliced in dierent ways
and below we choose on of these.
Consider slicing the region rst into planes where z is constant (perpendicular to the z
axis.
The integral over all these planes, the z integral, will be done last.
In each of theses planes the region of interest is the rectangle 0 y b, 0 x a.
Each of these planes can then be sliced in, for example the y direction where y is constant.
The integral over each of these slices, the y integral will be done before the z integration.
Along each line z =constant , y =constant we do the x integral.
Hence we do the x integral then the y integral and nally the z integral.
I =
___
B
_
xy
2
+z
3
_
dV =
_
z=c
z=0
_
y=b
y=0
_
x=a
x=0
_
xy
2
+z
3
_
dx dy dz .
The integral can now be easily calculated to give
I ==
_
z=c
z=0
_
y=b
y=0
_
a
2
y
2
2
+az
3
_
dy dz .
I ==
_
z=c
z=0
_
a
2
b
3
6
+abz
3
_
dz .
I ==
a
2
b
3
c
6
+
abc
4
4
.
Note that, as with the earlier simplest examples of integrals in two-dimensions, because the
region is a simple rectangle the order of integration is not very important, however this is
usually NOT the case.
20 1 MULTIPLE INTEGRATION
Example 2: If T is the tetrahedron with vertices (0, 0, 0) , (1, 0, 0) , (0, 1, 0) and (0, 0, 1),
evaluate
___
T
y dV .
The diagram shows the direction in which we consider slicing the volume.
In this case consider starting by slicing the region into planes each with y being constant.
Each of these planes is then cut into lines each of which has x is a constant.
Along each line we need to do the integral in z.
Hence we do the z integral rst, then the x integral then the y integral. Consider each line
where y and x are constant. Along this line the values of z are in the range 0/lez/le1xy.
Now consider each plane and in each of these slices where y is constant x takes values in the
range 0 x 1 y.
Finally there are slices for all values of y in the range 0 y 1
The integral therefore becomes
I =
__
T
y dV. =
_
y=1
y=0
_
y=1y
x=0
_
z=1xy
z=0
y dz dx dy ..
and this can be easily evaluated to give
I =
1
8
1.7 Change of variables in triple integrals 21
1.7 Change of variables in triple integrals
There are several commonly occurring alternative coordinate systems in 3-D which may be
used to simplify the evaluation of triple integrals when either the domain of integration
and/or the integrand possess certain symmetries.
1.7.1 Cylindrical Coordinates
The cylindrical coordinate system is a straightforward extension of the 2-D polar coordinate
system to 3-D. It uses the 2-D polar system in planes parallel to the xy-plane, while retaining
the Cartesian z coordinate for measuring vertical distances, hence the name cylindrical.
The relationship between Cartesian (x, y, z) and cylindrical coordinates (r, , z) is given by:
x = r cos , y = r sin , z = z
or
r =
_
x
2
+y
2
, = tan
1
(y/x) , z = z .
The cylindrical system is very useful for problems that are symmetric about a central
axis. For example a cylindrical annulus, or a pipe or wire.
In cylindrical polars the volume element dV can be represented by considering the picture
on the associated handout. We conclude that
dV = r dr d dz
22 1 MULTIPLE INTEGRATION
Example 1: Evaluate
___
D
_
x
2
+y
2
_
dV
where the region D is in the rst octant (x 0, y 0, z 0) bounded by the cylinders
x
2
+ y
2
= 1 and x
2
+ y
2
= 4 and the planes z = 0, z = 1, x = 0 and x = y. The region
is shown in the diagram.
1.7 Change of variables in triple integrals 23
This problem can be done in Cartesian coordinates (x, y, z). However, we shall use (r, , z)
because i) the region is much easier to dene and ii) we will nd that the integrations are
much easier to perform. The steps necessary are the same as used for two-dimensional
integrals.
First step is to dene the region in terms of (r, , z). Taking the boundaries we nd
x
2
+y
2
= 1 r = 1
x
2
+y
2
= 4 r = 2
z = 0 z = 0
z = 1 z = 1
x = 0 = /2
x = y = /4
Hence the region is the simple rectangle
1 r 2 ,

4


2
, 0 z 1
Next we change the integrand and this becomes
x
2
+y
2
= r
2
24 1 MULTIPLE INTEGRATION
Finally we consider the element dV and either by using the denition given above or by
exploiting Jacobians, as we did in the two-dimensional integrals earlier
dV = r dr d dz
Hence the problem becomes
I =
___
D
_
x
2
+y
2
_
dV =
___
D
r
2
r dr d dz
I =
_
r=2
r=1
_
=/2
=/4
_
z=1
z=0
r
3
dz d dr
I =
7
12
Example 2: Evaluate the volume of the solid obtained by:
rotating the parabola x = 1 z
2
(with 1 z 1) around the z-axis.
See diagram for what this region looks like. The region is shown in the diagram.
We start by noting that the volume of a region D is given by
V =
___
D
1 dV
We will use cylindrical coordinates to dene the region and hence if we rst slice the
region into planes each given by =constant. Then the region has planes where 0 2.
If we take each of these planes and slice it into lines each with z = constant then then are
lines for values of z in the range 1 z 1.
1.7 Change of variables in triple integrals 25
Each of these lines can be seen to go from r = 0 to r = 1 z
2
.
The integral is therefore
V =
___
D
1 dV =
_
=2
=0
_
z=1
z=1
_
r=1z
2
r=0
r dr dz d
V =
_
=2
=0
_
z=1
z=1
(1 z
2
)
2
2
dz d
V =
_
=2
=0
_
z
2

z
3
3
+
z
5
10
_
z=1
z=1
d
V =
_
=2
=0
8
15
d =
16
15
1.7.2 Spherical polar coordinates
The spherical polar coordinate system is similar to (but not exactly the same as) the coor-
dinate system that locates places on the surface of the earth, namely latitude and longitude.
A point P in 3-D is represented in spherical polars by (r, , ) where
r is the distance of P from the origin.
is the angle that the radial line OP makes with the positive z axis, i.e., (90-latitude)

.
is the angle between the plane containing P and the z-axis and the xz -plane, i.e.,
longitude.
These are shown in the diagram The region is shown in the diagram.
26 1 MULTIPLE INTEGRATION
It is conventional to consider r 0, 0 , 0 2 ( = 0 corresponds to the
north pole while = corresponds to the south pole). The relations between Cartesian
and spherical polars are:
x = r sin cos , y = r sin sin , z = r cos ,
r =
_
x
2
+y
2
+z
2
, = tan
1
(
_
x
2
+y
2
/z) , = tan
1
(y/x)
Example 1: Find the Cartesian coordinates of the point P with spherical coordinates
(2, /3, /2).
r = 2 = /3 = /2
x = 2 sin(/3) cos(/2) = 0
y = 2 sin(/3) sin(/2) =

3
z = 2 cos(/3) = 1
Example 2: Find the spherical polar coordinates of the point Q with Cartesian coor-
dinates (1, 1,

2).
r =
_
(1)
2
+ (1)
2
+ (

2)
2
= 2
= arctan
_
_
(1)
2
+ (1)
2

2
_
= arctan(1) =

4
1.7 Change of variables in triple integrals 27
= arctan
_
1
1
_
= arctan(1)
Beware because the simple use of a calcualtor would indicate that = /4 however a sketch
woudl reveal that the correct solution is
=
5
4
and it is always possible to add any multiple of to solutions involving tan

1. A small
sketch will indicate which value of is correct.
The spherical polar coordinate is then (r, , ) = (2, /4, 5/4)
Spherical polars are very useful for problems which have a spherical symmetry, for exam-
ple in the study of the gravitational force of a planet. In spherical polars the volume element
dV can be represented by considering the diagram. The region is shown in the diagram.
We conclude that
dV = r
2
sin dr d d
Example: Evaluate the mass of a half-ball H of radius a and of density (x, y, z) =
x
2
+y
2
+z
2
.
Recall that the total mass of a region is found by integrating the density. Hence we are
seeking
M =
__
H
dV =
__
H
(x
2
+y
2
+z
2
) dV
28 1 MULTIPLE INTEGRATION
where M is the region with z 0 and z
_
a
2
x
2
y
2
.
We could again use Cartesian coordinates to do this integral but, as you might suspect,
the region is easier to dene in spherical polar coordinates and we will nd the integrals
much easier to evaluate.
The boundaries are
x
2
+y
2
+z
2
= a
2
r = a
z = 0 = /2
Care must be taken in deciding on how these boundaries dene the region D in (r, , )
space but we nd that
0 r a , 0 /2 , 0 2
which is a simple rectangular region.
If we now consider the integrand then we nd
(x, y, z) = x
2
+y
2
+z
2
= r
2
The volume element for spherical polar coordinates
dV = r
2
sin dr d d
Hence the integral of interest is given by
M =
__
H
(x
2
+y
2
+z
2
) dV =
_
a
0
_
/2
0
_
2pi
0
r
2
r
2
sin dr d d
M =
_
a
0
_
/2
0
2r
4
sin dr d
M =
_
a
0
2r
4
dr =
2a
5
5
1.7.3 Changes of variables in triple integrals
There are unfortunately numerous problems where it is necessary to change variable to
dene a region or evaluate an integral but where cylindrical or spherical polar coordinates
are inappropriate. It is therefore necessary to consider how general coordinate changes can
be incorporated.
1.7 Change of variables in triple integrals 29
The formulae we studied for 2-D transformations can be easily extended to 3-D. Very
briey and roughly, a coordinate transformation is an invertible set of three functions R
3

R
3
If we have the Cartesian coordinate (x, y, z) as the old coordinates and we wish to
change to new coordinates (u, v, w) then we assume that we can write
x = x(u, v, w)
y = y(u, v, w) (x, y, z) (u, v, w)
z = z(u, v, w)
A region of space can be described either using the (old) coordinates (x, y, z) or the (new)
coordinates (u, v, w).
The volume element in the (new) coordinates is given by
dV = dx dy dz = |J(u, v, w)| du dv dw
where J (u, v, w) is the determinant of the Jacobian matrix
J(u, v, w) =

(x, y, z)
(u, v, w)

x
u
x
v
x
w
y
u
y
v
y
w
z
u
z
v
z
w

We can verify these formulae in the case of spherical polars by using


x = r sin cos , y = r sin sin , z = r cos ,
So that
J(r, , ) =

sin cos r cos cos r sin sin


sin sin r cos sin r sin cos
cos r sin 0

= |r
2
sin |
Because r
2
is positive and spherical polars are restricted to 0 the absolute value
symbol is unnecessary so we nd
dV = dxdydz = r
2
sin drdd
NB: remember if you are changing the variables in the integral you need to i) change
the domain of integration, ii) change the integrand iii) use the correct volume element!
30 2 THE GRADIENT, DIVERGENCE, AND CURL
2 The Gradient, Divergence, and Curl
2.1 Directional Derivatives and the gradient of a scalar function
Given a curve y = f(x) we can work out the gradient (slope) of the curve at each point by
dierentiating f:
Slope =
df
dx
It is unique: for a smooth function with no kinks there is only one slope at each point.
Now, suppose you are standing on a hill. What is the slope of the hill at that point? A
little thought should tell you that it is not unique: It depends on the direction in which you
are looking. For example, you could walk around the hill, on a level contour and keeping
the same height. In that case the slope is zero in the direction you walk at each point. You
could also aim for the summit, in which case you have to go uphill and the gradient will be
far from zero!
We therefore must introduce the idea of a directional derivative.
Denition: The directional derivative is the slope of a surface z = f (x, y) in a specied
direction n and is given by:
f
n
= f n
where n is a unit vector in the direction of interest and f is the gradient of f, or grad
f dened as:
f (x, y) =
f
x
i +
f
y
j.
The symbol , is an upside-down Greek capital delta (like a d for derivative) and so is
called del. Note that the gradient, f, is a vector.
2.1 Directional Derivatives and the gradient of a scalar function 31
Example 1:
Evaluate the gradient of the function f (x, y) = e
(x
2
+y
2
)
.
f =
f
x
i +
f
y
j
= 2xe
(x
2
+y
2
)
i 2ye
(x
2
+y
2
)
j
= 2e
(x
2
+y
2
)
(x i +y j)
Example 2:
Evaluate the directional derivative of the above function at the point (x, y) = (1, 1) in the
directions (a) i + j and (b) i j
f
n
= f n, f = 2e
(x
2
+y
2
)
(x i +y j)
where n is a unit vector in the direction of n
(a) n = i + j, hence |n| =

1
2
+ 1
2
=

2
So that n = n/

2 =
1

2
i +
1

2
j
At (1, 1), f = 2e
2
( i + j)
So that f n = 2e
2
(
1

2
+
1

2
) =
2

2
e
2
(b) n = i j, hence |n| =

1
2
+ 1
2
=

2
So that n = n/

2 =
1

2
i
1

2
j So that f n = 2e
2
(
1

2

1

2
) = 0
y
x
32 2 THE GRADIENT, DIVERGENCE, AND CURL
Example 3:
Evaluate the directional derivative of the above function at (x, y) = (0, 0) in every direction.
Why is it the same in every direction?
f
n
= f n, f = 2e
(x
2
+y
2
)
(x i +y j)
where n is a unit vector in the direction of n
At (0, 0) we have f = 2e
(x
2
+y
2
)
(0 i + 0 j) = 0
Hence f n = 0 n = 0, so that f does not change in any direction.
Thus (0, 0) is a critical point of f.
Properties of grad
1. Extension to 3-D : In 3-D the gradient is dened as
f (x, y, z) =
f
x
i +
f
y
j +
f
z
k
2. Leibniz rule The gradient is a derivative and has the same properties of derivatives.
e.g.,
(fg) = f g +g f
3. The gradient turns a scalar function f into a vector function!
4. Physical examples of the use of gradients include the force F (x, y, z) generated by a
potential energy V (x, y, z), which is given by
F = V.
5. The local direction of steepest ascent/descent at any point on a hill z = f (x, y) is in
the direction of f. Why? From the denition of the dot-product, if is the angle
between n and the vector f, the directional derivative is given by
f
n
= f n = |f| cos
Hence the directional derivative is a maximum when cos = 1 and hence = 0 so
that n is in the same direction as f. Thus f must be the direction of steepest
ascent/descent.
2.1 Directional Derivatives and the gradient of a scalar function 33
Similarly, the level contours along which the direction derivative is zero are perpendicular
to f, since there = /2 and so cos = 0. The corollary is that f is perpendicular to
the level contours.
grad f
Example :
Show that the gradient of the function f (r), where r is the radial distance from the origin
r =
_
x
2
+y
2
+z
2
, is given by
f(r) =
df
dr
r
(see later for applications in polar coordinates).
f =
f
x
i +
f
y
j +
f
z
k
We rst work out r by considering the special case f = (x
2
+y
2
+z
2
)
1/2
= r. Then
f
x
=
1
2
(x
2
+y
2
+z
2
)
1/2
2x =
x
_
x
2
+y
2
+z
2
=
x
r
Similarly we have
f
y
=
y
r
,
f
z
=
z
r
So that
r =
x
r
i +
y
r
j +
z
r
k
=
1
r
(x i +y j +z k) =
r
r
= r
We now work out the general case with f(r). By the chain rule
f(r)
x
=
df
dr
r
x
,
f(r)
y
=
df
dr
r
y
,
f(r)
z
=
df
dr
r
z
,
34 2 THE GRADIENT, DIVERGENCE, AND CURL
so that
f(r) =
df
dr
r =
df
dr
r .
The gradient derivative of a scalar function f(x, y),
f(x, y, z) =
f
x
i +
f
y
j +
f
z
k
is an example of a vector eld. We next introduce two derivative operators that can act on
vector elds. These are related to the dot and vector products, and are called respectively
the divergence and the curl of F. We deal with these in turn.
2.2 Divergence of a vector function
Denition: The divergence of a vector function
F(x, y, z) = F
1
(x, y, z) i +F
2
(x, y, z) j +F
3
(x, y, z) k
is the scalar given by
F(x, y, z) =
_

x
i +

y
j +

z
k
_
(F
1
i +F
2
j +F
3
k)
=
F
1
x
+
F
2
y
+
F
3
z
Note: the divergence of the vector function F, or divF, is a scalar. The derivative
operators and components of F here interact like the scalar product of two vectors, hence
the dot notation between them.
Physical Motivation:
The physical motivation for calculating the divergence of a eld F is associated with the
sources and sinks of the eld. A source is a region of space from which eld lines ow
outwards, e.g., electric eld in the neighbourhood of a positive charge, or uids streamlines
in the neighbourhood of a water source. A sink is the region of space where the eld lines
converge, e.g., the electric eld in the neighbourhood of a negative charge, or the uid
streamlines near to the plughole in your bath (assuming its not clogged up with hair!).
Many physical theories employ the divergence of a vector function. For example the law of
mass conservation (= no mass can spontaneously vanish) for a uid of density (x, y, z, t)
2.2 Divergence of a vector function 35
with velocity v(x, y, z, t) at each point can be expressed as:

t
+ (v) = 0
If you now call (x, y, z, t) the charge density, this is also the equation that expresses the
conservation of charge in electromagnetism.
Given a charge density (x, y, z, t), Maxwells classical theory of electromagnetism states
that the associated electric eld E(x, y, z, t) is the given by the solution of the divergence
equation:
E = /
0
If the divergence of a eld is zero, then it implies that there is no source or sink (convergence
or divergence of its eld lines). Thus if B is the magnetic eld another of Maxwells equations
is that
B = 0 everywhere,
which just says that there are no (known) magnetic monopoles (magnetic equivalent of
point charges).
In uid dynamics, a uid is said to be incompressible if the velocity v satises
v = 0 everywhere.
(note does NOT mean that (x, y, z, t)=const, see a uid dynamics course for an explanation
or consider ow of water with oil droplets in it - each uid is incompressible but the density
is dierent in the two uid parts).
Example 1:
If the velocity of a uid is given by v(x, y, z) = y i x j + xcos y k, show that it is
incompressible.
Consider the divergence of the velocity so that
v(x, y, z) =
y
x

x
y
+
xcos y
z
= 0
Since this is zero the ow must be incompressible.
Example 2:
Can the vector function B(x, y, z) = xy i xz j +yz k represent a real magnetic eld?
36 2 THE GRADIENT, DIVERGENCE, AND CURL
Consider the divergence of the magnetic eld so that
B(x, y, z) =
xy
x

xz
y
+
yz
z
= y + 0 +y = 2y
hence this cannot be a magnetic eld.
2.3 Curl of a vector function 37
2.3 Curl of a vector function
Denition: The curl of a vector eld
F(x, y, z) = F
1
(x, y, z) i +F
2
(x, y, z) j +F
3
(x, y, z) k
is another vector eld, given by
F(x, y, z) =
_

x
i +

y
j +

z
k
_
(F
1
i +F
2
j +F
3
k)
=

i j k

z
F
1
F
2
F
3

=
_
F
3
y

F
2
z
_
i +
_
F
1
z

F
3
x
_
j +
_
F
2
x

F
1
y
_
k
Note: the curl of the vector function F, or curlF, is a vector. The derivative operators and
components of F here interact like the vector product of two vectors, hence the notation
between them. It is easier to remember how to evaluate a curl of a vector function by using
the determinant shorthand, provided that when you expand the determinant you always
write the dierential operator before the component of F it is meant to be dierentiating.
Properties of curl:
(i) If g is a scalar function and F a vector eld, then
(gF) = g(F) +g F
(ii) The curl of the gradient of a function is always zero:
(f) = 0
(see problem sheet).
Physical Motivation:
The physical motivation for calculating the curl of a eld F is to calculate how much the
eld is rotating. The vorticity w(x, y, z) of a uid moving with speed v(x, y, z) is given
by
w = v
and gives an indication how rotational the ow is at that point. A ow with no rotation is
called irrotational and has
w = v = 0
38 2 THE GRADIENT, DIVERGENCE, AND CURL
everywhere.
In electromagnetism, if a magnetic eld B(x, y, z, t) at a point in free space varies in time t,
then this induces an electric eld E(x, y, z, t) given by the solution of the equation
E =
B
t
Example :
Calculate the vorticity of the shear uid ow v = (y, 0, 0)
v =
_

x
i +

y
j +

z
k
_
(y i + 0 j + 0 k)
=

i j k

z
y 0 0

= 0 i + 0 j
F
1
y
k
Hence the rotation is uniform everywhere in the uid (this is a simple shear ow where all
the uid travels in the x-direction but the variation in uid velocity makes the uid particles
rotate).
Example :
If the electric eld at a point in free space is given by E(x, y, z, t) = sin (z) j, nd how the
associated magnetic eld B is changing with time. We have that
B
t
= E =
_

x
i +

y
j +

z
k
_
(0 i sin(z) j + 0 k)
=

i j k

z
0 sin(z) 0

= cos(z) i + 0 j + 0 k
Hence this gives
B
t
= cos(z) i + 0 j + 0 k
and hence (by integrating this equation) the magnetic eld must have an unsteady part that
varies like
B = sin(z) i + 0 j + 0 k
2.3 Curl of a vector function 39
and there may be any steady magnetic eld added to this.
40 3 CURVES AND LINE INTEGRALS
3 Curves and Line Integrals
3.1 Introduction
A particle that moves in space describes a trajectory, a line or a curve. There are some
natural questions that arise:
How is it described?
What is the length of the trajectory?
What work is done by the forces acting on the particle as it moves?
We answer the last question later. Here we focus on the rst two. We rst consider curves
in 2-D before generalising to 3-D.
3.2 Parametric Curves
If a particle moves, its x and y coordinates are functions of time, x(t) , y (t). As t changes
the position of the particle describes a trajectory in space(-time).
Given the functions f and g, then x = f (t) , y = g (t) are the parametric equations of the
trajectory or curve. The parameter t will lie in some interval a t b.
Note that a parametric curve has a direction as t increases. Recall that the vector position
of the particle on the trajectory is given by
r(t) = x i +y j = f(t) i +g(t) j
3.2 Parametric Curves 41
Example 1:
A straight line.
x = t y = t + 1 t R
x = t
2
y = t
2
+ 1
Example 2:
A circle.
x = cos t y = sin t 0 t < 2
x = cos t y = sin t 0 t < 2
Note that these examples demonstrates that there is no unique set of parametric equations
for a single curve. We can exploit this property to choose the representation that is most
suitable to the problem we wish to solve. Note also that the direction of travel of the curve
is dierent in the two cases.
Example 3:
An ellipse.
x = 4 cos t y = sin t 0 t < 2
42 3 CURVES AND LINE INTEGRALS
Example 4:
A triangle.
_

_
0 t < 1 x = t y = t
1 t < 2 x = t/2 y = 1
2 t < 3 x = (t 3)/2 y = 3 t
This example shows that it may sometimes be necessary to have dierent parameterizations
for dierent portions of a curve (usually those with discontinuities in one of their slopes).
3.3 The length of a curve
Consider the case where the parameter t measures time. Recall that the velocity of a particle
with position vector
position = r(t) has velocity = r(t)
dr
dt
.
Suppose a particle is constrained to move along a curve/trajectory with t being time and
position given by the vector equation
r(t) = f(t) i +g(t) j .
The tangent to the curve at time t, which is by denition is the velocity is then given by
dr(t)
dt
= r(t) =
df(t)
dt
i +
dg(t)
dt
j .
The distance travelled along the trajectory in the short time dt is then just the speed mul-
tiplied by dt. This is approximately

dr(t)
dt

dt
In the limit as dt 0 this becomes exact. Summing over all these small time intervals we
can obtain an expression for the length of the curve as
length =
_
b
a

dr(t)
dt

dt
3.3 The length of a curve 43
Note that the limits of the integral are the limits of the range of variation of t (with t = a
being the beginning of the curve and t = b being the end). The term

dr
dt

dt is represented
by the scalar symbol ds, which is called the arc length element. Thus
ds =

dr
dt

dt
and the length of the curve is represented by
length =
_
b
a
ds .
Note also that if the curve has the representation r(t) = f(t) i + g(t) j then ds can be
written down as follows:
length =
_
b
a
ds =
_
b
a

dr(t)
dt

dt =
_
b
a

_
df
dt
_
2
+
_
dg
dt
_
2
dt .
Example 1:
A straight line.
x = t y = t + 1
nd the length from (1, 2) (corresponding to t = 1) to (2, 3) (corresponding to t = 2.
length =
_
b
a
ds =
_
b
a

_
df
dt
_
2
+
_
dg
dt
_
2
dt
_
2
1

1 + 1 dt =

2 .
Example 2:
A circle of radius a.
x = a cos t y = a sin t
nd the length from (a, 0) (corresponding to t = 0) to (a, 0) (corresponding to t = .
length =
_
b
a
ds =
_
b
a

_
df
dt
_
2
+
_
dg
dt
_
2
dt
_

0
_
(a sin t)
2
+ (a cos t)
2
dt = a .
Example 3:
44 3 CURVES AND LINE INTEGRALS
Consider a much more general case where we seek to nd the length of the curve y = f (x)
where a x b.
This curve can be (most easily) parameterised as:
x = t
y = f (t)
_
where a t b r(t) = t i +f(t) j
We can then follow the rules above to obtain the line element of this curve as
ds =

_
dx
dt
_
2
+
_
dy
dt
_
2
dt =

1 +
_
df
dt
_
2
dt.
For example, consider the curve y = x
2
/2, 0 x 1. Its parametric form is
x = t
y = f (t) = t
2
/2
_
0 t 1.
The line element is then
ds =

_
d (t)
dt
_
2
+
_
d (t
2
/2)
dt
_
2
dt =

1 +t
2
dt.
The length of the curve is then given by
length =
_
C
ds =
1
_
0

1 +t
2
dt =
_
t
2

1 +t
2
+
1
2
log

t +

1 +t
2

_
t=1
t=0
=

2
2
+
1
2
log(1 +

2)
3.4 Line integral of a function
It is possible to extend the concept of the one dimensional integrals you are used to if we
make use of the method to evaluate the length of a curve we have just discussed.
An ordinary 1-D integral of a function f (x) over a x b can be thought of as the area of
a straight fence whose height changes from point to point according to f (x). The fence can
be thought of as being made up of a sequence of thin fence panels at position x of width dx
and height f (x). The area is then the sum of all these innitesimal fence panels,
A =
_
b
a
f (x) dx .
3.5 Curves in three or more dimensions 45
Suppose the fence is no longer straight, but its base is a curve C in the xy-plane given by the
position vector r(t) = f(t) i + g(t) j. How do we work out the area of this fence? We can
repeat the same argument as above and consider the fence as being made up of a sequence
of thin fence panels at position r(t) with width now ds, the arc length element, and with
corresponding height f(r(t)). The corresponding area is then given by
A =
_
C
f (r (t)) ds =
_
t=b
t=a
f (r (t))

dr
dt

dt .
Note that the height function f is a scalar function with a vector input. It must be evaluated
on the curve C itself. Thus the value of the integral will, in general, be dierent for dierent
curves.
Example 1:
Evaluate the integral of the function f (x, y) = x
2
y
2
over curve C which is a circle of radius
2, centred at the origin.
The circle has vector parametric equations:
x = 2 cos t y = 2 sin t 0 t 2
The arc length element is:
ds =
_
(2 sin t)
2
+ (2 cos t)
2
dt = 2 dt
The function evaluated on the curve is:
f (x, y) = x
2
y
2
= (2 cos t)
2
(2 sin t)
2
Therefore the integral is:
_
C
f(x, y) ds =
_
2
0
(2 cos t)
2
(2 sint)
2
(2 dt) =
_
2
0
32 cos
2
t sin
2
t dt)
_
8 sin t cos
3
t + 4 cos t sin t + 4t

2
0
= 8
3.5 Curves in three or more dimensions
The above results can be easily generalised to three (or more) dimensions.
A curve C in 3-D can be described by three functions of a parameter:
x = x(t)
y = y (t)
z = z (t)
_
_
_
a t b r(t) = x(t) i +y(t) j +z(t) k
46 3 CURVES AND LINE INTEGRALS
The vector tangent to the curve is
dr
dt
=
dx
dt
i +
dy
dt
j +
dz
dt
k
The arc length element is then
ds =

dr
dt

dt =

_
dx
dt
_
2
+
_
dy
dt
_
2
+
_
dz
dt
_
2
dt.
The length of the curve C is then
L(C) =
_
C
ds =
_
t=b
t=a

dr
dt

dt.
The line integral of a function f (x, y, z) along C is
_
C
fds =
t=b
_
t=a
f (x (t) , y (t) , z (t))

dr
dt

dt.
Example :
Find the length of the circular helix r(t) = Acos t i + Asin t j + Bt k between the points
(A, 0, 0) and (A, 0, 2B).
The curve C is described by three functions of a parameter:
x = Acos t
y = Asin t
z = Bt
_
_
_
0 t 2
The vector tangent to the curve is
dr
dt
= Asin t i +Acos t j + k
The arc length element is then
ds =

dr
dt

dt =
_
A
2
sin
2
t +A
2
cos
2
t + 1 dt. =

A
2
+ 1 dt.
The length of the curve C is then
_
C
ds =
_
t=2
t=0

A
2
+ 1 dt. = 2

A
2
+ 1 .
3.6 Vector Fields 47
3.6 Vector Fields
Previously we examined the integral of a scalar function along a curve. It is also possible to
integrate a vector function along a curve. Before we do this, we shall introduce briey some
notions about vector elds.
Consider an electrically charged sphere. Then take a small charged particle and place it near
to the sphere. There will be a force acting on the particle, either pulling towards or repelling
it away from the sphere. At each point that force will be in a dierent spatial direction
(although by strength (radially as 1/r
2
). The force at each point thus has a magnitude and
a direction.
This can be represented mathematically by a vector eld, or a words we have a vector F
whose components depend on x, y and z.
F(r) F(x, y, z) = F
1
(x, y, z) i +F
2
(x, y, z) j +F
3
(x, y, z) k
NB: In 2-D a vector eld is generically given by F(x, y) = F
1
(x, y) i + F
2
(x, y) j. A simple
function of the coordinates which has no direction, e.g., the temperature on a weather map,
is called a scalar eld.
There are many examples of vector elds:
Electrostatic elds: the force around a charged body.
Gravitational elds: the force around a massive body.
Velocity elds of uids (e.g., air on a weather map): the velocity depends on where the
observation point is in the uid.
Gradient elds: if two bodies are in contact and have dierent temperatures, heat ows from
one to the other. These temperatures themselves are scalar elds, but the ow of the heat
is a vector eld. Such gradient elds exist because a certain quantity, e.g., temperature, has
dierent values across a body.
Fields are usually represented with arrow plots, where the length of the arrow is proportional
to the strength of the eld, i.e., to |F(r)|.
Example 1:
The gravitational eld of a point mass m, located at the origin is:
F(x, y, z) =
km
|r|
3
r = km
x i +y j +z j
(x
2
+y
2
+z
2
)
3/2
48 3 CURVES AND LINE INTEGRALS
Example 2:
The velocity eld of a solid rotating about the z-axis with angular velocity w = k is
v(r) = v(x, y, z) = w r = y i +x j
3.7 Line integrals of vector elds
We now answer the question: what is the work done by a force acting on a particle that
moves on a given trajectory?
We represent the force by a vector eld:
F(r) F(x, y, z) = F
1
(x, y, z) i +F
2
(x, y, z) j +F
3
(x, y, z) k
We represent the trajectory by the curve C:
r(t) = x(t) i +y(t) j +z(t) k, a t b
with tangent vector
dr
dt
=
dx
dt
i +
dy
dt
j +
dz
dt
k, a t b.
With these denitions, the force experienced by the particle will (in general) dier at each
point of the trajectory. Thus the force is not constant and so we cant apply the usual
formula (see any [old] A-level physics text) of
Work done = Component of force in direction of motion distance moved
However, we can split the trajectory into very small sections of length dr over which the
force is approximately constant.
We can then apply the above formula for each small section and obtain:
dW = F dr = F
_
dr
dt
dt
_
=
_
F
dr
dt
_
dt
3.7 Line integrals of vector elds 49
The total work done is just the sum of all these small eorts:
W =
_
C
F dr =
_
C
F(r(t))
dr
dt
dt =
_
t=b
t=a
_
F(r(t))
dr
dt
_
dt
Note that work is a scalar (its an energy), but the integrand is formed from the scalar/dot
product of two vectors, the force evaluated along the trajectory and the tangent to the
trajectory.
We have introduced this type of integral using the concept of work, but it is generally dened
for any vector eld F(r), independently of its physical meaning. If the curve C is closed,
this integral is also called the circulation of F around C.
Example 1:
Evaluate the work done by the force eld F(x, y) = 4y i + 4x j along:
(a) the semicircle that joins (1, 0) with (1, 0) in the upper half plane,
(b) the semicircle that joins (1, 0) with (1, 0) in the upper half plane,
(c) the straight line segment which joins (1, 0) with (1, 0).
(a) The trajectory r(t) is:
r(t) = x(t) i +y(t) j +z(t) k
x = cos t y = sin t z 0 0 t
r(t) = cos t i + sin t j 0 t
The tangent vector is:
dr
dt
= sin t i + cos t j
The force eld on the trajectory is:
F(x, y) = 4y i + 4x j = 4 sin t i + 4 cos t i
The work done is:
W =
_
C
F dr =
_
C
F(r(t))
dr
dt
dt =
_
t=
t=0
(4 sin t i + 4 cos t i) (sin t i + cos t j) dt
=
_
t=
t=0
4 dt = 4
(b) The trajectory r(t) is: The trajectory r(t) is:
r(t) = x(t) i +y(t) j +z(t) k
50 3 CURVES AND LINE INTEGRALS
x = cos t y = sin t z 0 t 2
The tangent vector is:
dr
dt
= sin t i + cos t j
The force eld on the trajectory is:
F(x, y) = 4y i + 4x j = 4 sin t i + 4 cos t i
The work done is:
W =
_
C
F dr =
_
C
F(r(t))
dr
dt
dt =
_
t=2
t=
(4 sin t i + 4 cos t i) (sin t i + cos t j) dt
=
_
t=2
t=
4 dt = 4
Note that (a) and (b) demonstrate that the line integral of a vector eld depends the curve
and the end points of the curve. Note if the direction is changed, the sign of the line integral,
and hence the work, is changed as well.
(c) The trajectory r(t) is:
r(t) = x(t) i +y(t) j +z(t) k
x = 1 t y = 0 z 0 0 t 2
r(t) = (1 t) i
The tangent vector is:
dr
dt
= i
The force eld on the trajectory is:
F(x, y) = 4y i + 4x j = 4(1 t) j
The work done is:
W =
_
C
F dr =
_
C
F(r(t))
dr
dt
dt =
_
t=2
t=
(4(1 t) j ( i) dt = 0
Conclusion: In general the value of a line integral of a vector function depends on the path,
not just the end-points.
Note there is a very important exception to this rule. The exception to these are the so
called conservative vector elds.
Note that the parameterisation of a given trajectory does not aect the answer.
Example 2:
3.7 Line integrals of vector elds 51
If F(x, y) = y
2
i + 2xy j calculate
_
C
F dr from (0, 0) to (1, 1) along:
(a) the parabola y = x
2
(b) the path formed from straight line segments (0, 0) to (0, 1) to (1, 1).
(a) The trajectory r(t) is:
r(t) = t i +t
2
j, 0 t 1
The tangent vector
dr
dt
is:
dr
dt
= i + 2t j, 0 t 1
The force eld on the trajectory is:
F(r(t)) = y
2
i + 2xy j = (t
2
)
2
i + 2(t
2
.t) j = t
4
i + 2t
3
j, 0 t 1
The work done is:
F(r(t))
dr
dt
= (t
4
i + 2t
3
j) ( i + 2t j) = t
4
+ 4t
4
= 5t
4
So that
W =
_
C
F dr =
_
C
F
dr
dt
dt
_
t=1
t=0
5t
4
dt =
_
t
5

1
t=0
= 1
(b) The trajectory F is made up of two segments:
C
1
from (0, 0) to (0, 1), r(y) = y j, 0 y 1
C
2
from (0, 1) to (1, 1), r(x) = x i + j, 0 x 1
Note here we use y to parameterise the rst part of the curve and x for the second. It is also
possible to write this in alternative forms such as
C
1
from (0, 0) to (0, 1), r(t) = t j, 0 t 1
C
2
from (0, 1) to (1, 1), r(t) = (t 1) i + j, 1 t 2
and the result is exactly the same.
The respective tangent vectors
dr
dt
are:
On C
1
from (0, 0) to (0, 1),
dr
dy
= j, 0 y 1
On C
2
from (0, 1) to (1, 1),
dr
dx
= i, 0 x 1
52 3 CURVES AND LINE INTEGRALS
The force elds on the respective trajectories are:
On C
1
, F(r) = y
2
i + 2xy j = y
2
i + 2(0.y) j = y
2
i, 0 y 1
On C
2
, F(r) = y
2
i + 2xy j = 1
2
i + 2(x.1) j = y i + 2x j, 0 x 1
The work done is then:
W =
_
C
F dr =
_
C
1
+C
2
F
dr
dt
dt
=
_
C
1
(y
2
i) ( j)dy +
_
C
2
( i + 2x j) ( i)dx
=
_
1
0
0dy +
_
1
0
1dx = 1
In this case the line integrals along the dierent segments turn out to produce the same
result. It is possible to prove that for this particular eld the line integral is independent of
the path, i.e., that it is conservative.
53
4 Surfaces, surface integrals, ux integrals
4.1 Introduction
Knowledge of surfaces are often required in physical problems. Consider, for example:
Find the mass of a thin sheet of metal.
Find the electric eld generated by a distribution of charges on a surface.
Find how much water per unit time exits for the mouth of a pipe (ux).
In this section and later we try to answer the following questions:
How do we describe a surface mathematically.
How do we nd its area.
How do we integrate functions of physical quantities across a non-at surface.
How do we nd the ux of physical quantities across it.
4.2 Parametric representation of surfaces
Intuitively a curve is a one-dimensional object. If a point is known to lie on a given curve it
can be located by one coordinate, usually the arc length or perhaps the time roughly a one
dimensional object is described by one parameter). For a point lying on a two-dimensional
surface, we thus require two coordinates, for example the latitude and longitude on a surface
or the (x, y) coordinate in a plane (roughly a two dimensional surface can be described by
two parameters).
54 4 SURFACES, SURFACE INTEGRALS, FLUX INTEGRALS
We now use u and v as parameters to describe a surface in x, y, z space. A 2-D surface
is given by a vector
r(u, v) = x(u, v) i +y(u, v) j +z(u, v) k
whose components are functions of two scalar variables u and v which lie in some domain
D of the u,v plane. The equivalent parametric equations are:
x = x(u, v)
y = y (u, v)
z = z (u, v)
_
_
_
(u, v) D.
Often, we can simplify many problems by being able to recognise the parametric or vector
equations of simple surface.
Example 1:
The surface r(u, v) = a cos u i + a sin u j + v k, 0 u 2, 0 v 5, represents the
surface of a cylinder of radius a and height 5, symmetric about the z-axis.
Clue: A slice perpendicular to the z-axis, where v= constant, gives the parametric/vector
equations of a circle of radius a.
Example 2:
The surface r = v cos u i + v sin u j + v k, 0 u 2, 0 v 5, represents a cone of
height 5, symmetric about the z-axis.
Clue: A slice perpendicular to the z-axis, where v= constant, gives the parametric/vector
equations of a circle of radius v.
4.3 Area of a surface 55
Example 3:
The surface
r(, v) = a cos u sinv i +a sin u sin v j +a cos v k, 0 v , 0 u 2,
is the surface of a sphere, centred on the origin, of radius a.
Clue: The coordinates x(u, v)
2
+y (u, v)
2
+z (u, v)
2
= a
2
.
Example 4:
The surface z = f (x, y) with (x, y) D can be represented vectorially as r(u, v) = x i +
y j +f(x, y) k.
4.3 Area of a surface
To compute the area of a surface r(u, v), (u, v) D, we divide D up into small rectangles
such that the actual surface also becomes a patchwork of curvilinear subdivisions of area dS
the surface area element (note the capital S).
The area of the surface is then just the sum of all these innitesimally small patches
Surface Area =
__
S
dS
56 4 SURFACES, SURFACE INTEGRALS, FLUX INTEGRALS
The problem is to nd a way of representing the dS patches in terms of the parameters u
and v. The argument to determine the small area on the surface due to changing u, by very
small distances du, dv is very similar to the argument used to determine the change of area
earlier in integrals.
Consider a point on the lattice in the uv-plane, with uv-coordinates (u
i
, v
j
)
The points where u = u
i
(a constant) become, by r(u, v), a curve in 3-D space,
r(u
i
, v) .
Consider two lines one at u = u
i
and another at u = u
i
+ du. The vector between two of
these lines is
du
r
u

u=U
(Note the use of a partial derivative as r is a function of 2 variables.)
The points where v = v
j
(a constant) become, by r(u, v), a curve in 3-D space, r(u, v
i
).
The vector between two of these lines at v
j
and v
j
+dv is
dv
r
v

v=v
j
.
This now gives the vectors determining the sides of the parallelogram.
r
u
du and
r
v
dv.
Now from previous work on vectors we know that if a parallelogram has vectors a and b for
its sides the area is |a b|. Thus the area of the parallelogram (area element) is given by
dS =

r
u
du
r
v
dv

r
u

r
v

dudv.
Hence the area of the surface can be written as a double integral over the domain D in the
uv-plane:
A =
__
S
dS =
__
D

r
u

r
v

dudv.
4.3 Area of a surface 57
Example 1:
Find the surface area of the vertical portion of the cylinder of radius a, height h, centred
on the z-axis, with the base in the xy-plane.
Parameterise the surface:
x = a cos u y = a sin u z = v
with 0 u 2 0 v 5
so that the surface is given by the vector
r = a cos u i +a sin u j +v k
Now compute the element of area
dS =

r
u

r
v

dudv =

i j k
a sin u a cos u 0
0 0 1

dudv
= |a cos u i +a sin u j + 0 k| dudv
=
_
(a cos u)
2
+ (a sin u)
2
dudv = a dudv
Hence we nd that
Surface area =
_
2
0
_
5
0
a dudv = 10a
58 4 SURFACES, SURFACE INTEGRALS, FLUX INTEGRALS
Example 2:
Find the surface area of a hemisphere of radius a.
Parameterise the surface:
x = a cos sin y = a sin sin z = a cos
with 0 2 0 5
so that the surface is given by the vector
r = a cos sin i +a sin sin j +a cos k
Now compute the element of area
dS =

dd =

i j k
a sin sin theta a cos sin 0
a cos cos a sin cos a sin

dd
=

a cos sin
2
i +a sin sin
2
j + (a
2
sin
2
sin cos a
2
cos
2
sin cos ) k

dd
= a
2
sin dd
Hence we nd that
Surface area =
_
2
0
_
/2
0
a
2
sin dd = 2a
2
4.4 Surface integral of a function 59
4.4 Surface integral of a function
Consider a thin sheet of metal given by the position vector r(u, v) but which has variable
density f(r). What is its mass?
Suppose that the metal sheet can be thought of as being made up of elemental patchwork
parallelograms of area dS, with dS so small that the density is approximately constant over
the parallelogram. Then the mass of the thin sheet is just the sum of the masses of these
patchwork pieces, or
M =
__
S
f dS =
__
S
f(r(u, v)) dS =
__
D
f(r(u, v))

r
u

r
v

dudv.
Example 1:
Find the mass of the thin-walled cylinder of radius a and height h if the density is given by
f(x, y, z) = z(x
2
+y
2
)
This problem has a surface that is identical to that used earlier so much of the working
is similar although the integral being computed is dierent. We are trying to nd
__
S
f dS
Parameterise the surface:
x = a cos u y = a sin u z = v
with 0 u 2 0 v h
so that the surface is given by the vector
r = a cos u i +a sin u j +v k
Now compute the element of area
dS =

r
u

r
v

dudv =

i j k
a sin u a cos u 0
0 0 1

dudv
= |a cos u i +a sin u j + 0 k| dudv
=
_
(a cos u)
2
+ (a sin u)
2
dudv = a dudv
We now determine what the function is on the surface and get
f(x, y, z) = z(x
2
+y
2
) = (v)((a cos u)
2
+ (a sin u)
2
) = a
2
v
Hence we nd that
__
S
f dS =
_
2
0
_
h
0
(a
2
v)a dudv = a
3
h
60 4 SURFACES, SURFACE INTEGRALS, FLUX INTEGRALS
Example 2:
Find the moment of inertia about the z-axis of the parametric surface
x = 2uv, y = u
2
v
2
, z = u
2
+v
2
, 0 u
2
+v
2
1, v 0.
where the denisty of the surface is a constant, . The moment of inertia about the z axis is
given by
__
S
(
_
x
2
+y
2
dS
Where
_
x
2
+y
2
is the distance of any point from the z-axis. Parameterise the surface (this
is given already):
x = 2uv y = u
2
v
2
z = u
2
+v
2
with 0 u
2
+v
2
1 0 v
so that the surface is given by the vector
r = 2uv i + (u
2
v
2
) j + (u
2
+v
2
) k
Now compute the element of area
dS =

r
u

r
v

dudv =

i j k
2v 2u 2u
2u 2v 2v

dudv
=

8uv i (4v
2
4u
2
) j + (4v
2
4u
2
) k

dudv
=

32v
4
+ 32u
4
+ 64uv dudv = 4

2(u
2
+v
2
) dudv
We now determine what the function is on the surface and get
f(x, y, z) =
_
x
2
+y
2
=

u
2
+v
2
)
So one possible way of writing the integral is in the form
__
S
f dS =
_
1
0
_
+

1v
2

1v
2

u
2
+v
2
4

2(u
2
+v
2
) dudv =
_
1
0
_
+

1v
2

1v
2
4

2(u
2
+v
2
)
3/2
dudv
This can be evaluated or we can notice that the region in u, v is more easily described by
using polar coordinates where
u = r cos v = r sin with 0 r 1 0
Using this change of coordinates (recall this requires changing the integrand 4

2(u
2
+v
2
)
3/2
=
4

2 r
3
and the elemental area dudv = r ddr. Hence we get
_ _
S
f dS =
_
1
0
_
/2
0
4

2r
4
ddr =
2

2
5

4.5 Surface integrals of vector functions: ux integrals 61
4.5 Surface integrals of vector functions: ux integrals
The functions we have integrated over surfaces so far have all been scalars. Just as in the
line integrals chapter, it is also possible to evaluate integrals of vector elds over a surface.
Such integrals are called ux integrals.
Physical examples of ux integrals include:
The ow of water out of a pipe, where the ux integral is over the velocity eld of the water
and the surface of the pipe mouth. The result is the total volume of water out of the pipe
in unit time.
A version of Faradays law, where the ux integral is over the magnetic eld density through
a surface. The rate of change with time of the value of this integral is the total circulation
of the electric eld around the line-boundary of the surface.
A ux integral takes the following form:
__
S
F dS
where
S is a surface r(u, v) D.
dS is an oriented surface element: one which has a magnitude |dS| = dS and a direction
which is one of the normals to the surface (there are two, since an orientable surface has two
sides).
F is the vector eld, evaluated on the surface of integration.
F dS is the component of ux normal to the surface.
From earlier we already know that
r
u

r
v
is a vector normal to the surface. Thus all we have to do is remove the modulus signs from
the denition of the surface element dS 6.4 to get the oriented surface element dS:
dS =
_
r
u

r
v
_
dudv or dS =
_
r
v

r
u
_
dudv
depending on whether you want to evaluate the ux coming out of or going in to the
surface.
62 4 SURFACES, SURFACE INTEGRALS, FLUX INTEGRALS
Thus in a more explicit form the above ux integral becomes,
__
S
F dS =
__
D
F(r(u, v)) dS =
__
D
F(r(u, v))
_
r
u

r
v
_
dudv
As the surface has two normals it is important to check that you pick the correct one as the
following example shows. The example also shows the standard way in which you evaluate
these integrals.
Example 1:
Find the ux of
F(x, y, z) =
2x i
x
2
+y
2
+
2y j
x
2
+y
2
+ k
downwards through the surface S dened parametrically by
r(u, v) = u cos v i +u sin v j +u
2
k, 0 u 1, 0 v 2.
It is not necessary to be able to visualise the surface to evaluate a ux integral, but for this
case it is a bowl shaped object symmetric about the z axis.
First calculate the surface element dS:
dS =
_
r
u

r
v
_
dudv or dS =
_
r
v

r
u
_
dudv
r
u
= cos v i + sin v j + 2u k
r
v
= u sin v i +u cos v j
r
u

r
v
=

i j k
cos v sin v 2u
u sin v u cos v 0

= u cos
v
k +u sin
2
v k 2u
2
sin v j 2u
2
cos v i
= 2u
2
cos v i 2u
2
sin v j +u k
Now since u 0 on the surface (see parameter range above) the k-component of this
normal is also positive and so is actually pointing upwards. This means we have to reverse
the orientation of dS to obtain the downwards normal for the downwards ux. This can be
achieved by setting
dS =
_
r
v

r
u
_
dudv
=
_
r
u

r
v
_
dudv
= (+2u
2
cos v i + 2u
2
sin v j u k) dudv
4.6 Relationship between multiple, ux and line integrals 63
Evaluate the eld F on the surface:
F(r(u, v)) =
2x i
x
2
+y
2
+
2y j
x
2
+y
2
+ k
=
2u cos v i
u
2
cos
2
v +u
2
sin
2
v
+
2u sinv j
u
2
cos
2
v +u
2
sin
2
v
+ k
=
2 cos v
u
i +
2 sin v
u
j + k
Evaluate the elemental ux F dS on the surface:
F dS =
_
2 cos v
u
i +
2 sin v
u
j + k
_
(+2u
2
cos v i + 2u
2
sin v j u k) dudv
= (4u cos
2
v + 4u sin
2
v u) dudv
= (4u u) dudv
= 3u dudv
Compute the integral:
__
S
F dS =
__
D
F(r(u, v))
_
r
v

r
u
_
dudv
=
_
1
u=0
_
2
v=0
3u dudv
= 3
_
u
2
2
_
1
u=0
[v]
2
v=0
= 3
4.6 Relationship between multiple, ux and line integrals
There are several key relationships between all the types of integrals we have studied in this
course. They are encompassed in the following results which are stated here without any
(required) proof. Both of the following theorems are used extensively in physical situations
such as uid dynamics, or electromagnetism.
4.6.1 The divergence theorem
Let V be a volume bounded by a simple closed surface S and let F be a continuously
dierentiable vector eld dened in V and S. Then:
__
S
F dS =
___
V
FdV
64 4 SURFACES, SURFACE INTEGRALS, FLUX INTEGRALS
In other words the ux integral of a vector eld F is equal to the volume integral of the
divergence of F. This relationship can sometimes be used to evaluate ux integrals by
relating them to simpler volume integrals and vice versa.
4.6.2 Stokess Theorem
Let C be an oriented closed curve and S be any oriented surface with C as a boundary.
Suppose that the orientations are such that when we look through S in the direction of its
normal C is traversed clockwise. Then for a continuously dierentiable vector eld F we
have
_
C
F dr =
__
S
(F) dS
In other words, the line integral of the vector eld F around C is equal to the ux integral
of the curl of F through any surface bounded by C and vice versa. From a practical point
of view a major importance of this result lies in the idea that any S can be used and so you
can chose one that simplies the evaluation of the integral.
These two theorems allow many integrals to be computed by two dierent methods. In
many cases one of these methods is much easier than the other.
Historical note: This theorem has nothing to do with Stokes! It was thought up by Lord
Kelvin at the University of Glasgow in the 19
th
century. He wrote to his friend Stokes at
Cambridge and said, Hey look at this great result. Stokes immediately set it as a question
in the Cambridge nal degree examinations. This was the rst time the result had appeared
publicly and so Cambridge typically attributed it to one of their own rather than the true
author!
65
5 Complex Numbers
5.1 Introduction
When we try to solve quadratic equations, such as
x
2
+ 1 = 0,
or
x
2
2x + 2 = 0,
we nd that they do not have solutions which are real numbers. In order to solve such
equations, we introduce a quantity i which has the property that
i
2
= 1.
We then dene complex numbers by:
z = x +iy, x, y R.
Thus z = 2 +i6 or 2 + 6i is an example of a complex number.
For z = x +iy we call x the real part of z and write
Re(z) = x,
and we call y the imaginary part of z and write
Im(z) = y.
Notice that both the real part and the imaginary part of z are real.
It is now possible to solve quadratic equations such as the ones above.
66 5 COMPLEX NUMBERS
Example 1
x
2
2x + 2 = 0
(x 1)
2
= 1
x 1 = i
x = 1 i
5.2 Powers of i
i
2
= 1 so, multiplying both sides by i gives
i
3
= i
i
4
= 1
i
5
= i
i
6
= 1
i
1
=
1
i
=
1
i
_
i
i
_
=
i
i
2
=
i
1
= i
i
2
=
1
i
2
= 1
i
3
=
1
i
3
=
1
i
=
1
i
= i
5.3 Argand Diagrams
We can associate the complex number z = x + iy with the point in the Euclidean plane
with Cartesian coordinates (x, y). Conversely, any point in the x, y-plane corresponds to a
5.4 Modulus and Argument of a Complex Number 67
complex number z = x +iy.
z=x+iy
r

y
x
So we can think of the x-axis as the real axis, and the y-axis as the imaginary axis. A
diagram of the complex plane thought of in this way is called an Argand diagram.
5.4 Modulus and Argument of a Complex Number
Instead of using x and y as coordinates, we can use polar coordinates r and , where:
x = r cos , y = r sin
r =
_
x
2
+y
2
, tan =
y
x
Note: The angle must be such that it is in the correct quadrant as given by the signs of x
and y. This means we may have to add or subtract to the value given by arctan = tan
1
.
In polar coordinates we may write
z = x +iy
= r cos +ir sin
= r(cos +i sin ).
The number r is called the modulus of z and we write the modulus of z as |z|:
68 5 COMPLEX NUMBERS
|z| = r =
_
x
2
+y
2
The number is called the argument of z, which we write as arg z. Note that the argument
is not unique but it is only dened up to multiples of 2.
Example
1 +i =

2
_
cos
_

4
_
+i sin
_

4
__
=

2
_
cos
_

4
+ 2
_
+i sin
_

4
+ 2
__
=

2
_
cos
_

4
2
_
+i sin
_

4
2
__
In general,
1 +i =

2
_
cos
_

4
+ 2k
_
+i sin
_

4
+ 2k
__
, where k Z.
Although the argument of a complex number is not unique, we dene the principal value of
the argument to be the value of the argument in the range < .
Thus for z = x +iy the principal value of the argument is given by that value of in the
range < such that:
tan =
y
x
,
sin =
y
r
=
y
_
x
2
+y
2
,
cos =
x
r
=
x
_
x
2
+y
2
.
It should be noted that this value does not always coincide with arctan
y
x
= tan
1
y
x
.
5.5 Complex Conjugates 69
For example, if z = 1 +i

3 then x = 1 and y =

3 so that
r =

1 + 3 = 2 and tan =

3
and we would conclude corrrectly that
= tan
1

3 =

3
.
To check this note that
z = r
_
cos

3
+i sin

3
_
= 2
_
1
2
+i

3
2
_
= 1 +i

3,
as required.
On the other hand, if z = 1 +i

3 then x = 1 and y =

3 so that
r =

1 + 3 = 2 and tan =

3
and we would conclude incorrrectly that
= tan
1
(

3) =

3
.
To check this note that
z = r
_
cos
_

3
_
+i sin
_

3
__
= 2
_
1
2
i

3
2
_
= 1 i

3.
In fact, in this case we have
=

3
+ =
2
3
5.5 Complex Conjugates
If z = x +iy, then we dene the complex conjugate z by
z = x iy
Note: the complex conjugate of z is often written as z

.
In the Argand diagram, taking the complex conjugate is just a reection in the real axis:
70 5 COMPLEX NUMBERS
z=x+iy
r

r
z=x-iy
Im
Re
Note from this diagram that
|z| = |z| = r and arg z = = arg z.
If
z = r(cos +i sin ) then z = r(cos i sin ).
However this is not in polar form because of the negative sign.
To put it in polar form we write
z = r(cos() +i sin())
so that |z| = r and arg z = , as required.
5.6 Addition and subtraction of complex numbers
Addition and subtraction Let z
1
= x
1
+y
1
and z
2
= x
2
+y
2
. We then dene
z
1
+z
2
= (x
1
+x
2
) +i(y
1
+y
2
)
and
z
1
z
2
= (x
1
x
2
) +i(y
1
y
2
).
5.7 Multiplication of Complex Numbers 71
Addition in the Argand Diagram
Z
Z
2
1
Z + Z
2 1
Note that for z = x +iy and z = x iy we have
z +z = 2x = 2 Re(z)
and
z z = 2iy = 2i Im(z).
Conversely, we have
Re(z) =
1
2
(z +z)
and
Im(z) =
1
2i
(z z).
5.7 Multiplication of Complex Numbers
To nd the rule for the multiplication of complex numbers we assume that complex numbers
obey the ordinary rules of arithmetic. Hence the product of z
1
= x
1
+iy
1
and z
2
= x
2
+iy
2
is given by
72 5 COMPLEX NUMBERS
z
1
z
2
= (x
1
+iy
1
)(x
2
+iy
2
)
= x
1
x
2
+x
1
iy
2
+x
2
iy
1
+iy
1
iy
2
= x
1
x
2
+ix
1
y
2
+iy
1
x
2
y
1
y
2
.
Thus z
1
z
2
= (x
1
x
2
y
1
y
2
) +i(x
1
y
2
+y
1
x
2
).
We in fact take the nal line as our denition of the product of complex numbers (and the
previous lines as motivation).
Example: Let z
1
= 3 + 5i and z
2
= 2 3i. Then
z
1
z
2
= (3 + 5i)(2 3i)
= 6 + 9i + 10i 15(i
2
)
= 9 + 19i,
and
z
2
z
1
= (2 3i)(3 + 5i)
= 6 + 10i 9i 15(i
2
)
= 9 + 19i.
Notice that z
1
z
2
= z
2
z
1
.
More generally, with our denition of multiplication we can verify that complex numbers
satisfy all the usual rules of arithmetic, so that:
z
1
z
2
= z
2
z
1
(multiplication is commutative),
z
1
(z
2
z
3
) = (z
1
z
2
)z
3
(multiplication is associative),
(z
1
+z
2
)z
3
= z
1
z
3
+z
2
z
3
(multiplication is distributive over addition).
5.7 Multiplication of Complex Numbers 73
It is often useful to use the fact that
zz = (x +iy)(x iy) = x
2
ixy +iyx (i)
2
y
2
= x
2
+y
2
.
Hence
|z|
2
= zz
For example, if z = 3 + 4i we have
zz = (3 + 4i)(3 4i) = 9 + 16 = 25
The rule for multiplication of complex numbers is simpler if we write the complex number
in polar form.
Let z
1
= r
1
(cos
1
+i sin
1
), z
2
= r
2
(cos
2
+i sin
2
)
Then:
z
1
z
2
= r
1
r
2
(cos
1
+i sin
1
)(cos
2
+i sin
2
)
= r
1
r
2
[(cos
1
cos
2
sin
1
sin
2
) +i(sin
1
cos
2
+ cos
1
sin
2
)]
= r
1
r
2
[cos(
1
+
2
) +i sin(
1
+
2
)].
Hence
|z
1
z
2
| = r
1
r
2
= |z
1
||z
2
| (multiply moduli),
arg(z
1
z
2
) =
1
+
2
= arg(z
1
) + arg(z
2
) (add arguments).
74 5 COMPLEX NUMBERS
5.8 Division of Complex Numbers
To perform division, the trick is to multiply the numerator and denominator of the quotient
by the complex conjugate of the denominator:
z
1
z
2
=
z
1
z
2

z
2
z
2
=
1
|z
2
|
2
(z
1
z
2
).
In Cartesian form:
z
1
z
2
=
x
1
+iy
1
x
2
+iy
2
=
x
1
+iy
1
x
2
+iy
2

x
2
iy
2
x
2
iy
2
=
x
1
x
2
+y
1
y
2
x
2
2
+y
2
2
+i
y
1
x
2
x
1
y
2
x
2
2
+y
2
2
.
Example: Let z
1
= 3 + 5i and z
2
= 2 3i. Then
z
1
z
2
=
3 + 5i
2 3i
=
(3 + 5i)(2 + 3i)
(2 3i)(2 + 3i)
=
6 9i + 10i 15
4 + 9
=
21
13
+
1
13
i.
In polar form:
z
1
z
2
=
r
1
(cos
1
+i sin
1
)
r
2
(cos
2
+i sin
2
)
=
r
1
(cos
1
+i sin
1
)(cos
2
i sin
2
)
r
2
(cos
2
+i sin
2
)(cos
2
i sin
2
)
=
r
1
(cos
1
cos
2
+ sin
1
sin
2
) +i(sin
1
cos
2
cos
1
sin
2
)
r
2
(cos
2

2
+ sin
2

2
)
=
r
1
r
2
[cos(
1

2
) +i sin(
1

2
)].
5.9 Complex Exponentials and Trigonometric Functions 75
Hence,

z
1
z
2

=
r
1
r
2
=
|z
1
|
|z
2
|
(divide moduli)
arg
_
z
1
z
2
_
=
1

2
= arg(z
1
) arg(z
2
) (subtract arguments)
5.9 Complex Exponentials and Trigonometric Functions
Let z be a complex number. We dene
e
z
= 1 +z +
z
2
2!
+
z
3
3!
+
z
4
4!
+. . .
Now let z = e
i
, where R, then:
e
i
= 1 +i

2
2

i
3
3!
+

4
4!
+. . .
=
_
1

2
2
+

4
4!
+. . .
_
. .
(1)
+i
_


3
3!
+

5
5!
+. . .
_
. .
(2)
(1) is the Taylor series for cos and (2) is the Taylor series for sin . Hence:
e
i
= cos +i sin (A)
Since we can write any complex number in polar form,
z = r(cos +i sin ),
we see that any complex number can be written as
76 5 COMPLEX NUMBERS
z = re
i
.
Or, since the argument is not unique,
z = re
i(+2k),
where k Z.
From (A), replacing by we get
e
i
= cos() +i sin()
e
i
= cos i sin . (B)
Adding (A) and (B) and dividing by 2 gives
cos =
e
i
+e
i
2
.
Subtracting (B) from (A) and dividing by 2i gives
sin =
e
i
e
i
2i
.
5.10 Further examples of complex numbers in polar form 77
5.10 Further examples of complex numbers in polar form
Example 1.
Let z
1
= 3 + 3i, and z
2
= 2e
i

3
. Calculate z
1
z
2
in both Cartesian and polar form.
z
2
= 2
_
cos
_

3
_
+i sin
_

3
__
= 2
_
1
2
+i

3
2
_
= 1 +i

3
so that z
1
z
2
= (3 + 3i)(1 +i

3)
= (3 3

3) +i(3 + 3

3).
On the other hand,
z
1
= 3 + 3i = 3

2
. .
(1)
_
1

2
+i
1

2
_
. .
(2)
(1) is the modulus and to put (2) in the form cos +i sin we must have =

4
, so
z
1
= 3

2
_
cos
_

4
_
+i sin
_

4
__
= 3

2e
i

4
,
and z
1
z
2
= (3

2e
i

4
)(2e
i

3
) = 6

2e
i
7
12
= 6

2
_
cos
_
7
12
_
+i sin
_
7
12
__
.
Example 2: Find the possible values of e
ik
2
, where k Z.
78 5 COMPLEX NUMBERS
k = 1 :
k = 2 :
k = 3 :
k = 4 :
e
i

2
= cos
_

2
_
+i sin
_

2
_
= i
e
i
= cos +i sin = 1
e
3i
2
= cos
_
3
2
_
+i sin
_
3
2
_
= i
e
2i
= cos (2) +i sin (2) = 1
/2 /2
/2 /2 Z
Z
Z
Z
4
1
2
3
5.11 Multiplying Complex Numbers in Exponential Form
If z
1
= r
1
e
i
1
and z
2
= r
2
e
i
2
then,
z
1
z
2
= r
1
r
2
e
i(
1
+
2
)
,
since we multiply the moduli and add the arguments.
These results can be used to prove trigonometric identities. For example,
e
i
e
i
= e
i(+)
5.12 Dividing complex numbers in exponential form 79
(cos +i sin )(cos +i sin ) = cos( +) +i sin( +)
(cos cos sin sin ) +i (sin cos + cos sin ) = cos( +) +i sin( +)
Equating real and imaginary parts, we get
cos( +) = cos cos sin sin ,
sin( +) = sin cos + cos sin .
5.12 Dividing complex numbers in exponential form
z
1
z
2
=
r
1
e
i
1
r
2
e
i
2
=
r
1
r
2
e
i
1
e
i
2
=
r
1
r
2
e
i(
1

2
)
Thus we divide the moduli and subtract the arguments.
Taking z
1
= 1 and z
2
= z gives
1
z
=
1
re
i
=
1
r
e
i
,
so that

1
z

=
1
|z|
,
arg
_
1
z
_
= arg z.
80 5 COMPLEX NUMBERS
5.13 Calculating Powers
If we write a complex number in exponential form, z = re
i
, and take the n-th power we get
z
n
= r
n
e
in
.
Note: this result remains true for non-integer values of n, although some care is needed (see
details later in section on solving complex equations). For example,

z =

re
i

2
.
5.14 de Moivres Theorem
If we take the special case z = e
i
, then z
n
= e
in
, and
_
e
i
_
n
= e
in
,
so that
(cos +i sin )
n
= cos(n) +i sin(n)
This result is known as de Moivres theorem.
5.15 Applications of de Moivres Theorem
Example 1:
Express cos 3 and sin 3 in powers of sin and cos .
cos 3 +i sin 3 = (cos +i sin )
3
= cos
3
+ 3i cos
2
sin 3 cos sin
2
i sin
3

Equating real and imaginary parts, we nd


5.15 Applications of de Moivres Theorem 81
cos 3 = cos
3
3cos sin
2
,
sin 3 = 3 cos
2
sin sin
3
.
We can use these results to nd tan3:
tan3 =
sin 3
cos 3
=
3 cos
2
sin sin
3

3 cos sin
2
+ cos
3

.
Now divide top and bottom by cos
3

tan3 =
3 tan tan
3

1 3 tan
2

.
Similar calculations can be carried out for any other power.
82 5 COMPLEX NUMBERS
Example 2:
cos 6 +i sin 6 = (cos +i sin )
6
= cos
6
+ 6i cos
5
sin 15 cos
4
sin
2
20i cos
3
sin
3

+15 cos
2
sin
4
+ 6i cos sin
5
sin
6
.
Equating real and imaginary parts, one obtains
cos 6 = cos
6
15 cos
4
sin
2
+ 15 cos
2
sin
4
sin
6
,
sin 6 = 6 cos
5
sin 20 cos
3
sin
3
+ 6 cos sin
5
.
To go in the other direction and write sin
n
and cos
n
in terms of sines and cosines of
multiple angles, we write
z = e
i
, z
1
= e
i
, z
n
= e
in
, z
n
= e
in
,
so that
cos =
e
i
+e
i
2
=
1
2
_
z +
1
z
_
,
cos n =
e
in
+e
in
2
=
1
2
_
z
n
+
1
z
n
_
,
sin =
e
i
e
i
2i
=
1
2i
_
z
1
z
_
,
sin n =
e
in
e
in
2i
=
1
2i
_
z
n

1
z
n
_
.
5.16 Solving Equations 83
Example 1:
cos
3
=
1
2
3
_
z +
1
z
_
3
=
1
8
_
z
3
+ 3z
2
1
z
+ 3z
1
z
2
+
1
z
3
_
=
1
8
_
z
3
+
1
z
3
_
+
3
8
_
z +
1
z
_
=
1
8
(2 cos 3 + 6 cos )
cos
3
=
1
4
cos 3 +
3
4
cos .
Example 2:
cos
6
=
1
2
6
_
z +
1
z
_
6
=
1
64
_
z
6
+ 6z
4
+ 15z
2
+ 20 +
15
z
2
+
6
z
4
+
1
z
6
_
=
1
32
_
1
2
_
z
6
+
1
z
6
_
+
6
2
_
z
4
+
1
z
4
_
+
15
2
_
z
2
+
1
z
2
_
+ 10
_
=
1
32
{cos 6 + 6 cos 4 + 15 cos 2 + 10} .
5.16 Solving Equations
Example 1: Determine the nth roots of unity; that is, solve the equation
z
n
= 1.
We write the RHS as a complex number in polar form using the general value of the argument:
84 5 COMPLEX NUMBERS
z
n
= e
2ki
where k Z
z = e
2ki
n
z = cos
_
2k
n
_
+i sin
_
2k
n
_
.
We write the possible values of z as z
k
for k = 1, 2, . . . .
k = 0 :
k = 1 :
k = 2 :
.
.
.
k = n 1 :
k = n :
k = n + 1 :
z
0
= 1
z
1
= cos
_
2
n
_
+i sin
_
2
n
_
z
2
= cos
_
4
n
_
+i sin
_
4
n
_
.
.
.
z
n1
= cos
_
2
2
n
_
+i sin
_
2
2
n
_
z
n
= cos 2 +i sin 2 = 1 = z
0
z
n+1
= z
1
and so on ...
If n = 3,
Z
1
Z
2
Z
0
2/3
2/3
2/3
5.16 Solving Equations 85
If n = 4,
/4 2 /4 2
/4 2
/4 2
Z
Z
Z
Z
1
2
3
0
There are 3 distinct roots for z
3
= 1, 4 distinct roots for z
4
= 1 and in general,
z
n
= 1 has n distinct roots.
Note: A general complex polynomial of degree n has n complex roots (counting the roots
according to their multiplicity). This result is known as the Fundamental theorem of Algebra.
Example 2:
z
4
= 1 +i

3
= 2
_
1
2
+i

3
2
_
= 2
_
cos
_

3
_
+i sin
_

3
__
= 2e
i

3
z
4
= 2e
i(

3
+2k)
Hence: z = 2
1
4
e
i(

12
+
k
2
)
(divide argument by four)
86 5 COMPLEX NUMBERS
This has four distinct roots:
z
0
= 2
1
4
e
i

12
= 2
1
4
_
cos
_

12
_
+i sin
_

12
__
z
1
= 2
1
4
e
i
7
12
= 2
1
4
_
cos
_
7
12
_
+i sin
_
7
12
__
z
2
= 2
1
4
e
i
13
12
= 2
1
4
e
i
11
12
= 2
1
4
_
cos
_
11
12
_
i sin
_
11
12
__
z
3
= 2
1
4
e
i
19
12
= 2
1
4
e
i
5
12
= 2
1
4
_
cos
_
5
12
_
i sin
_
5
12
__
87
6 Dierential Equations
A dierential equation is a functional relationship between a function and its derivatives.
If the function is a function of one variable, then the dierential equations involving this
function are called Ordinary Dierential Equations (ODEs).
If the function is a function of two or more variables, then the dierential equations involving
this function are called Partial Dierential Equations (PDEs).
6.1 Types of Ordinary Dierential Equation
The order of a dierential equation is the order of the highest derivative in the equation eg.
dy
dx
= cos x has order 1
d
2
y
dx
2
+ 2x
_
dy
dx
_
3
+y = 0 has order 2
d
3
y
dx
3
+y
dy
dx
4xy = 0 has order 3
An equation is linear if y and its derivatives occur as linear terms. The following are
examples of linear ODEs:
d
2
y
dx
2
+y sin x = e
x
ln x
d
2
y
dx
2
+e
x
dy
dx
= x
5
cos x
An equation which is not linear is called non-linear. The following are examples of
non-linear equations
d
2
y
dx
2
+y
dy
dx
= x
2
88 6 DIFFERENTIAL EQUATIONS
dy
dx
+ sin y = 0
6.2 Simple Dierential Equations
A very simple ODE is given by
dy
dx
= f(x) eg:
dy
dx
= x
2
+ sin x
which may be integrated to give the solution
y =
_
f(x)dx = F(x) +c for some F(x) such that F

(x) = f(x)
y =
_
x
2
+ sin x dx =
x
3
3
cos x +c
Note that we do not get a unique solution. We get a family of solutions depending on c (a
1-parameter family of solutions).
We can obtain an unique solution by specifying a value taken by y, say y
0
, for some particular
value of x, say x
0
, so that y(x
0
) = y
0
. Using this we obtain
y
0
= F(x
0
) +c so that c = y
0
F(x
0
)
hence
y =
_
f(x) dx = F(x) F(x
0
) +y
0
This amounts to having solved the initial value problem governed by the two equations
dy
dx
= f(x) and y(x
0
) = y
0
dy
dx
= x
2
+ sin x and y(0) = 2
6.2 Simple Dierential Equations 89
requires
2 =
0
3
3
cos 0 +c c = 3
so that the solution is given by
y =
x
3
3
cos x + 3
A more general dierential equation is given by
dy
dx
= f(x, y)
This ODE is one which states that at the point (x, y), the graph of the solution y as a
function of x has slope f(x, y).
(x,y)
direction field
line with slope f(x,y)
is a
Thus, in the x, y-plane the tangent to a solution curve through the point (x, y) has slope
f(x, y). We can plot short line segments of slope f(x, y) called direction elds at every
point (x, y) in the x, y-plane. The solution curves are therefore curves tangent to the direction
eld. Again we can get a unique solution satisfying y(x
0
) = y
0
by selecting the unique curve
through the point (x
0
, y
0
) that follows the direction eld.
You can draw the direction eld for an ODE using a package such as MAPLE. However
it is very useful to be able to understand properties of the direction eld as so we will
spend some time exploring how to plot the direction eld and hence the solution to an
ODE. One systematic method is to use the idea of the isoclines of an ODE. (iso=same
cline=slope) Isoclines are curves on which the slope dy/dx is constant, ie. curves for which
f(x, y) is constant.
90 6 DIFFERENTIAL EQUATIONS
Example 1
dy
dx
= y x
The isoclines are curves where the slope is equal to C and are given by
dy
dx
= f(x, y) = y x = C with C constant
so that the isoclines are given by
y = x +C
For various xed values of C, we can now draw the lines y = x +c (the isoclines) and mark
on each isocline a short line which has slope C (this is the direction eld).
We now draw several isoclines by considering dierent values of C. Finally we connect
together these small lines (the direction eld) with curves which are tangent to the direction
eld and these are the solution curves of the ODE.
0 2 1 0 -1 -2
2
1
-1
-2
Example 2
dy
dx
= x
2
+y
2
Hence
6.2 Simple Dierential Equations 91
f(x, y) = x
2
+y
2
and the isoclines are given by
x
2
+y
2
= C
Again consider several values of C and draw the isoclines. Along each isocline draw short
lines with slope C to create the direction eld and nally connect these direction eld lines
together to generate the solution curves of the ODE.
0 1 0 -1
1
-1
In both of these examples, we see that the dierential equation gives a 1-parameter family
of curves (C was the one parameter). Conversely, if we are given a 1-parameter family of
curves, we can nd a rst order ODE with that family as its solution.
Example 1
The following equation describes a family of parabolas
y = 4ax
2
where a is a free (constant) parameter (1)
We now attempt to nd the ODE that this these parabolas are the solution curve of.
We start by dierentiating (1) gives
dy
dx
= 8ax (2)
92 6 DIFFERENTIAL EQUATIONS
However (2) is not the ordinary dierential equation that we want because it contains the
arbitrary constant a.
TO nd the ODE We must eliminate a between the two equations (1) and (2).
In this case this can easily be done by taking their ratio to give:
1
y
dy
dx
=
2
x
so that
dy
dx
=
2y
x
which is the required equation containing no arbitrary constants.
Example 2
Suppose that we have a family of circles:
(x a)
2
+ (y a)
2
= 2a
2
x
2
2xa +y
2
2ya = 0 (3)
Dierentiating (3) with respect to x, we have
2x 2a + 2y
dy
dx
2
dy
dx
a = 0
so that
2x + 2y
dy
dx
2a
_
1 +
dy
dx
_
= 0 (4)
Again this is not the required equation as it contains the constant a. We therefore try to
eliminate a from between (3) and (4).
We nd from (3)
2a =
x
2
+y
2
x +y
6.3 Separation of Variables 93
and substituting into (4) gives
2x + 2y
dy
dx

x
2
+y
2
x +y
_
1 +
dy
dx
_
= 0
On rearranging we get
dy
dx
=
x
2
+ 2xy y
2
x
2
2xy y
2
.
This is the ODE with solutions curves given by the circles.
Note that we can see from these examples that in general a 1-parameter family of curves
gives rise to a rst order ODE.
Note that you can easily check that this ODE does have the circles as solution curves
using the ideas that will be presented in the next section. Specically we want to know, if
we are given an ODE how do we nd the solution curves algebraically?
Finding algebraic solutions to ODEs is dicult and can only be done for very special
forms of ODE. We will now consider some of these special forms.
6.3 Separation of Variables
The rst special type of rst order ODE that we consider is one of the form
dy
dx
=
f(x)
g(y)
We can formally separate variable by writing
g(y)dy = f(x)dx
This has separated the equation into an expression involving x and one involving y, and each
side may be integrated to give:
_
g(y)dy =
_
f(x)dx + constant
94 6 DIFFERENTIAL EQUATIONS
Example 1
dy
dx
=
2y
x

dy
y
=
2dx
x

_
dy
y
=
_
2dx
x
+ constant
ln |y|= 2 ln |x| + constant
ln y= ln x
2
+ ln K
ln y= ln Kx
2
y = Kx
2
Example 2
Solve
dy
dx
=
1 +y
2
1 +x
2
with y(0) = 1

_
dy
1 +y
2
=
_
dx
1 +x
2
+c where c is constant
arctany = arctanx +c
y = tan(arctan x +c)
Using the condition y(0) = 1 we have
1 = tan(arctan 0 +c) = tanc
c = arctan1
y = tan(arctan x + arctan 1)
Then using
6.4 Homogeneous Equations 95
tan(A+B) =
tanA+ tan B
1 tanAtanB
with A = arctanx, B = arctan1
gives
y =
x + 1
1 x 1
y =
x + 1
x 1
Note that you can always check your answer by simply taking the nal solution and by
doing the necessary dierentiation put it back into the ODE and check that the two sides
are equal.
6.4 Homogeneous Equations
We now consider the second type of special rst order ODE. An ODE is said to be
homogeneous in x and y if it can be written in the form:
dy
dx
= f
_
y
x
_
We can solve this by introducing a new dependent variable v given by:
v =
y
x
so that y = vx
To put this into the ODE and create an ODE for v we need to dierentiate the product
y = vx with respect to x gives:
dy
dx
= x
dv
dx
+v
Hence the dierential equation becomes
x
dv
dx
+v = f(v)
dv
dx
=
f(v) v
x
_
dv
f(v) v
=
_
dx
x
+c
96 6 DIFFERENTIAL EQUATIONS
Example 1
dy
dx
+
x
2
+y
2
xy
= 0
dy
dx
=
x
2
+y
2
xy
dy
dx
=
1 + (
y
x
)
2
y
x
(dividing top and bottom by x
2
)
Now let v =
y
x
so that y = xv and
dy
dx
= x
dv
dx
+v
Substituting in the above ODE gives
x
dv
dx
+v =
1 +v
2
v
x
dv
dx
=
1 +v
2
v

v
2
v
=
1 + 2v
2
v
_
v
1 + 2v
2
dv =
_
dx
x
+c
1
4
ln(1 + 2v
2
) = ln |x| +c
ln(1 + 2v
2
) = 4 ln |x| + lnk
= ln
_
k
x
4
_
1 + 2v
2
=
k
x
4
1 +
2y
2
x
2
=
k
x
4
x
4
+ 2y
2
x
2
= k
y =
_
k x
4
2x
2
_1
2
6.5 First Order Linear Dierential Equations 97
Example 2
dy
dx
=
x +y
x y
=
1 +
y
x
1
y
x
Now let v =
y
x
so that y = xv and
dy
dx
= x
dv
dx
+v
Substituting in the above ODE then gives
x
dv
dx
=
1 +v
1 v

v(1 v)
1 v
=
1 +v
2
1 v
_
1 v
1 +v
2
dv =
_
dx
x
+c
_
dv
1 +v
2

_
vdv
1 +v
2
=
_
dx
x
+c
arctan v
1
2
ln(1 +v
2
) = ln x +c
2 arctanv = ln(1 +v
2
) + 2 ln x + 2 ln k
= ln
_
(1 +v
2
)k
2
x
2
_
2 arctan
_
y
x
_
= ln
__
1 +
y
2
x
2
_
k
2
x
2
_
y
x
= tan
_
1
2
ln
_
k
2
(x
2
+y
2
)
_
_
y = xtan
_
ln
_
k
_
x
2
+y
2
__
6.5 First Order Linear Dierential Equations
The third special type of rst order ODEs are the linear ODEs. A rst order linear dierential
equation is one that can be written in the form
A(x)
dy
dx
+B(x)y = C(x)
98 6 DIFFERENTIAL EQUATIONS
By restricting x if necessary, we may consider the case where A(x) = 0. Then we may
divide through by A(x) to obtain
dy
dx
+
B(x)
A(x)
y =
C(x)
A(x)
which has the form,
dy
dx
+p(x)y = q(x)
This is the standard form for a linear rst order ODE and the subsequent steps for solving
the problem assume that you have put the equation into this form (remember to do this!!)
We solve this equation by multiplying both sides by what is called an integrating factor
I(x)
I(x)
dy
dx
+I(x)p(x)y = I(x)q(x)
where I(x) must be chosen so that the LHS takes the form of a total derivative, that is
I(x)
dy
dx
+I(x)p(x)y =
d
dx
(I(x)y) (5)
The ODE then takes the form
d
dx
(I(x)y) = I(x)q(x)
which, in principle, we can integrate to give
I(x)y =
_
I(x)q(x) dx +c
so that
y =
1
I(x)
_
I(x)q(x) dx +c
The only problem is to choose the correct integrating factor I(x). Do do this we return
6.5 First Order Linear Dierential Equations 99
to (5) were we require
I(x)
dy
dx
+I(x)p(x)y =
d
dx
(I(x)y)
I(x)
dy
dx
+I(x)p(x)y = I(x)
dy
dx
+
dI
dx
(x)y
dI
dx
(x) = I(x)p(x) this is a separable ODE for I(x)
_
1
I(x)
dI
dx
(x) dx =
_
p(x) dx
ln(I(x)) =
_
p(x) dx
I(x) = exp
__
p(x) dx
_
= e
R
p(x) dx
This is the required formula for the integrating factor.
Note: including a constant of integration c in the exponent would have no eect as it would
simply multiply I(x) by a constant e
c
.
The general method for solving rst order linear ODEs
We now summarise the method for nding an integrating factor and then solving rst order
linear dierential equations.
1. Put the linear equation in standard form:
dy
dx
+p(x)y = q(x)
2. Calculate the integrating factor I(x)
I(x) = exp
__
p(x) dx
_
3. Multiply standard form by the integrating factor I(x) to get
I(x)
dy
dx
+I(x)p(x)y = I(x)q(x)
4. Check that this is the same as
100 6 DIFFERENTIAL EQUATIONS
d
dx
(I(x)y) = I(x)q(x)
5. Integrate to get
I(x)y =
_
I(x)q(x) dx +c
6. Divide by the integrating factor I(x) to get
y =
1
I(x)
_
I(x)q(x) dx +
c
I(x)
This is the general solution.
6.5 First Order Linear Dierential Equations 101
Example 1
x
dy
dx
+ 2y = 8x
2
1. Put into standard form
dy
dx
+
2
x
y = 8x
2. Calculate integrating factor
p(x) =
2
x
I(x) = exp
__
2
x
dx
_
= exp(2 lnx)
= exp(lnx
2
)
= x
2
3. Multiply standard form by the integrating factor
x
2
dy
dx
+ 2xy = 8x
3
4. Check that LHS is a derivative
d
dx
_
x
2
y
_
= x
2
dy
dx
+ 2xy = 8x
3
5. Integrate
x
2
y =
_
8x
3
dx +c = 2x
4
+c
6. Divide by the integrating factor
y = 2x
2
+
c
x
2
102 6 DIFFERENTIAL EQUATIONS
Example 2
x
dy
dx
+ (3 x)y + 2 = 0
1. Put into standard form
dy
dx
+
3 x
x
y =
2
x
2. Calculate integrating factor
I(x) = exp
__ _
3
x
1
_
dx
_
= exp(3 lnx x)
= exp(lnx
3
) exp(x)
= x
3
exp(x)
3. Multiply standard form by the integrating factor
x
3
e
x
dy
dx
+ (3x
2
x
3
)e
x
y = 2x
2
e
x
4. Check LHS is a derivative
d
dx
(x
3
e
x
y) = x
3
e
x
dy
dx
+ (3x
2
x
3
)e
x
y

d
dx
(x
3
e
x
y) = 2x
2
e
x
5. Integrate
x
3
e
x
y =
_
2x
2
e
x
dx +c
integrating by parts,
= 2x
2
e
x

_
4xe
x
dx +c
integrating by parts again,
6.6 Exact Equations 103
= 2x
2
e
x
+ 4xe
x

_
4e
x
dx +c
= 2x
2
e
x
+ 4xe
x
+ 4e
x
+c
6. Divide by the integrating factor
y =
2
x
+
4
x
2
+
4
x
3
+
c
x
3
e
x
6.6 Exact Equations
The nal type of special equation are the exact ODEs. These require a bit of work just
to determine if the ODE is actually of this exact type. We start with an outline of how we
will solve the ODE. Consider the dierential equation
P(x, y) +Q(x, y)
dy
dx
= 0 (6)
and suppose that a function F(x, y) can be found such that
F
x
= P and
F
y
= Q (7)
then the dierential equation (6) can be written as
F
x
+
F
y
dy
dx
= 0

d
dx
F(x, y) = 0
F(x, y) = constant (8)
If a function F satisfying (7) exists then we say the equation is exact and the solution is
given by equation (8).
Now we have to determine if the is a function F(x, y). To do this we look at equation
(7) and dierentiate P with respect to y and Q with respect to x we get
104 6 DIFFERENTIAL EQUATIONS
P
y
=

2
F
yx
=

2
F
xy
=
Q
x
Hence if the dierential equation is exact we must have
P
y
=
Q
x
(9)
Conversely one can show that if equation (9) holds then it is possible to nd an F(x, y) such
that equation (7) is satised.
Thus the dierential equation (6) is exact if
P
y
=
Q
x
This is the test that we will use to see if an ODE is exact.
Note that in many books on ODEs equation (6) is written formally as
P(x, y) dx +Q(x, y) dy = 0
and this equation is dened to be exact if (10) is true.
Example 1
Show that e
y
dx + (xe
y
+ 2y)dy = 0 is exact and nd the solution.
P = e
y
and Q = xe
y
+ 2y.
Hence
P
y
= e
y
Q
x
= e
y
So the equation is exact. We therefore try and nd an F such that
6.6 Exact Equations 105
F
x
= P = e
y
(10)
F
y
= Q = xe
y
+ 2y (11)
Integrating (10) with respect to x treating y as a constant gives
F(x, y) = xe
y
+g(y) where g(y) is an arbitrary function of integration (12)
To determine f(y) we dierentiate (12) partially with respect to y
F
y
= xe
y
+g

(y) (13)
Comparing (13) with (11) we see that
g

(y) = 2y
g(y) = y
2
+c
Substituting for g(y) in (12) we get
F(x, y) = xe
y
+y
2
+c
(14)
and the solution to the dierential equation is given by
xe
y
+y
2
= constant.
Example 2
Solve the equation
3x(xy 2) + (x
3
+ 3y
2
)
dy
dx
= 0
P = 3x(xy 2) and Q = x
3
+ 3y
2
Hence
106 6 DIFFERENTIAL EQUATIONS
P
y
= 3x
2
Q
x
= 3x
2
So the equation is exact. We therefore try and nd an F such that
F
x
= P = 3x(xy 2) = 3x
2
y 6x (15)
F
y
= Q = x
3
+ 3y
2
(16)
Integrating (15) with respect to x while holding y xed gives
F(x, y) = x
3
y 3x
2
+g(y) where g(y) is an arbitrary function of integration (17)
To determine g(y) we dierentiate (17) partially with respect to y
F
y
= x
3
+g

(y) (18)
Comparing (18) with (16) we see that
g

(y) = 3y
2
g(y) = y
3
+c
Substituting for g(y) in (17) we get
F(x, y) = x
3
y 3x
2
+y
3
+c
and the solution to the dierential equation is given by
x
3
y 3x
2
+y
3
= C = constant.
107
7 Linear ODEs of the Second Order
7.1 Introduction
Solving ODEs that are higher order that the rst order equations we have considered earlier
gets more dicult. As a result there are only very special types that can be solved. Here we
consider the most common type of second order ODE that appears from physical problems
of all types.
In this section we shall consider a set of dierential equations which occur frequently
in situations such as simple harmonic motion, oscillations of a damped spring and linear
forcing, Situations such as these can be modelled by
a
d
2
y
dx
2
+b
dy
dx
+cy = f(x),
where a, b, c are constants y is the unknown function, and f is a given forcing function.
The value of b often represents the damping.
The equation is said to be second order because the highest derivative is a two (nth order
equations have the nth derivative as the highest).
The equation is linear because the function y only appears linearly in each term. (we shall
see that if two functions y
1
, y
2
are a solution of the related homogeneous equation then so is
any linear combination y
1
+y
2
.)
The equation is called an ordinary dierential equation (ODE) since it contains no partial
derivatives, only total ones with respect to one variable, here x.
The equation is said to have constant coecients since a, b, c are constants.
For that reason such equations are generically called second order linear ordinary dif-
ferential equations with constant coecients.
Finding solutions to such problem is done in two steps. First we nd all possible functions
that solve the ODE with f(x) = and then we try to nd a particular solution that solves
the problem for our specic f(x). These two parts of the solution method are called the
complementary function and the particular integral. For this course we only treat the
rst step in this procedure. Hence we consider the problem of nding the complementary
function and we do this by looking at the ODE when f(x) = 0. Slightly confusingly such an
ODE is called a homogeoneous second order ODE (not to be confused with the homogeneous
rst order ODE which is a completely dierent object).
108 7 LINEAR ODES OF THE SECOND ORDER
7.2 Homogeneous case: f = 0
First we take a homogeneous equation (with f (x) = 0) and divide through by a (this is
allowed as a is non-zero by denitionotherwise the equation would not be second order).
This gives
d
2
y
dx
2
+
b
a
dy
dx
+
c
a
y = 0,
or, equivalently,
d
2
y
dx
2
+p
dy
dx
+qy = 0,
where p = b/a and q = c/a.
To solve this problem we are going to guess a form for the solution with some parameters
it in and use this in the ODE to determine what values the parameters must take to solve
the problem. We guess a solution of the form
y = e
kx
, where k is a constant to be found.
This gives
dy
dx
= ke
kx
and
d
2
y
dx
2
= k
2
e
kx
We now put this guess for the solution into the homogeneous equation and obtain
k
2
e
kx
+pke
kx
+qe
kx
= 0
(k
2
+pk +q)e
kx
= 0
The term exp (kx) can be divided through as its always non-zero for nite x. This leaves
what is called the auxiliary equation:
k
2
+pk +q = 0.
This is a quadratic equation in k and will have two roots k
1
, k
2
:
k
1
=
p +
_
p
2
4q
2
, k
2
=
p
_
p
2
4q
2
.
We thus have two possible solutions to the original equation, y = Aexp (k
1
x) and y =
Aexp (k
2
x) . It is a simple exercise of substitution to show that a linear combination of these
two solutions is also a solution:
y = Ae
k
1
x
+Be
k
2
x
,
where A and B are any two constants. This is, in fact, the most general solution possible.
In general, a second order linear equation will have a solution with two arbitrary constants.
They can only be determined by extra information, called boundary or initial conditions,
as we shall see below.
Note that if you try solving a third order ODE there will be three arbitrary constants in
the solution and for an n
th
order ODE there will be n arbitrary constants in the solution.
7.2 Homogeneous case: f = 0 109
From the formula for the solution of the auxiliary equation we can see that the nature of the
solution of the solution will depend on whether
p
2
> 4q, p
2
= 4q, or p
2
< 4q
We now have to consider each of these cases separately to nd out what type of behaviour
the solution has.
7.2.1 Case p
2
> 4q: real and distinct roots
When p
2
> 4q the auxiliary equation gives two unequal real solutions and hence the solution
of the ODE can be written as above:
y = Ae
k
1
x
+Be
k
2
x
.
110 7 LINEAR ODES OF THE SECOND ORDER
Example :
d
2
y
dx
2
+
dy
dx
6y = 0
Auxilliary equation:k
2
+k 6 = 0
(k + 3)(k 2) = 0
k = 3 or k = 2
Hence y = e
3x
and y = e
2x
are solutions, and the general solution reads
y = Ae
3x
+Be
2x
.
7.2.2 Case p
2
= 4q: equal real roots
When p
2
= 4q, the roots of the auxiliary equation are real and equal. Let their common
value be called k. It is given by
k =
p
2
.
In this particular case, it is not possible to form a general solution with two arbitrary
constants, since we could rewrite it in the form
y = Ae
kx
+Be
kx
= (A+B)e
kx
= Ce
kx
,
and there would be, eectively, only one arbitrary constant. Thus, we do not have the most
general form (which needs two independent, but arbitrary, constants).
We therefore have to go back to our guess and try an additional form for a solution in
this case. Let us try a second, independent solution of the form
y = xe
k
1
x
.
This gives
dy
dx
= (1 +kx)e
kx
and
d
2
y
dx
2
= (2k +k
2
x)e
kx
,
and, substituting in the ODE (and dividing through by the common factor e
kx
),
(2k +k
2
x) +p(1 +kx) +qx = 0
(k
2
+pk +q)x + (2k +p) = 0,
which holds since both k
2
+pk +q and 2k +p are zero if k is a assumed a single root of the
auxiliary equation.
Hence, two independent solutions are y = e
px/2
and y = xe
px/2
, and the general solution
is
y = Ae
px/2
+Bxe
px/2
= (A+Bx)e
px/2
.
7.2 Homogeneous case: f = 0 111
Example :
d
2
y
dx
2
+ 6
dy
dx
+ 9y = 0
Auxilliary equation: k
2
+ 6k + 9 = 0
(k + 3)
2
= 0
k = 3 (twice)
Hence k = 3 is a double root of the auxiliary equation. The two solutions are y = e
3x
and y = xe
3x
, and the general solution is
y = (A+Bx)e
3x
.
7.2.3 Case p
2
< 4q: complex conjugate roots
When p
2
< 4q the auxiliary equation has no real roots. However the complex roots appear
as a conjugate pair. The roots will be of the form
k
1
= m+i, k
2
= mi.
Hence the general solution will be
y = Ae
(m+i)x
+Be
(mi)x
= Ae
mx
e
ix
+Be
mx
e
ix
= e
mx
(Ae
ix
+Be
ix
).
Note that this looks like a complex solution (of our real equation), but this is not necessarily
the case. Recall the following relations:
e
ix
= cos(x) +i sin(x),
e
ix
= cos(x) i sin(x).
Thus we can write the above general solution as
y = e
mx
((A+B) cos(x) +i(A B) sin(x)).
112 7 LINEAR ODES OF THE SECOND ORDER
If we choose A and B to be complex numbers such that A + B = C, where C is real, and
also so that i(AB) = D is also real then we obtain the real solution
y = e
mx
(C cos(x) +Dsin(x)).
This, in fact, is the general real solution, since C and D are arbitrary real numbers. [Note
that for each choice of C and D there correspond dierent A =
1
2
(CiD) and B =
1
2
(C+iD).]
Example :
d
2
y
dx
2
+ 2
dy
dx
+ 2y = 0
Auxilliary equation: k
2
+ 2k + 2 = 0
k =
2

4 8
2
k = 1 i
Hence y = e
x
e
ix
are complex solutions of the equation. y = e
x
cos x and y = e
x
sin x
are real solutions, and the general real solution is
y = e
x
(C cos x +Dsin x) = e
x
E cos(x +)
7.3 Boundary and Initial Conditions
As we have seen above the general solution to a second order linear ODE contains two
arbitrary constants, A and B. To obtain a specic solution we must provide two independent
bits of information to establish precise values for A and B. These are called boundary
conditions, or initial conditions.
Boundary conditions specify the solution y at two dierent positions of the variable x.
Initial conditions specify the solution y and its derivative dy/dx at x=0.
In the homogeneous case the BCs/ICs can be applied immediately once the solution has
been found.
7.3 Boundary and Initial Conditions 113
Example :
Solve the equation
d
2
y
dx
2
+ 2
dy
dx
+y = 0,
given that y = 0 and
dy
dx
= 1 when x = 0.
1st step: look at the auxiliary equation
k
2
+ 2k + 1 = 0
(k + 1)
2
= 0
k = 1 (twice)
2nd step: Find two independent solutions
y = e
x
and y = xe
x
3rd step: Find the general solution
y = (A+Bx)e
x
4th step: Use the initial conditions to nd A and B
y = 0 when x = 0 gives 0 = (A+B 0)e
0
A = 0
Taking A = 0 gives y = Bxe
x
and
dy
dx
= Be
x
Bxe
x
= (B Bx)e
x
.
dy
dx
= 1 when x = 0 gives 1 = (B +B 0)e
0
B = 1
. Hence A = 0 and B = 1, and the solution which satises the initial conditions is given by
y = xe
x
.

Вам также может понравиться