Vous êtes sur la page 1sur 112

MA4006 - Engineering Mathematics V (Vector Calculus and Partial Dierential Equations)

Dr. Sarah Mitchell (sarah.mitchell@ul.ie) Oce: B3042 April 6, 2012

+D=FJAH 

Vector functions of a real variable


1.1 Denition of a Vector function
Denition 1.1.1 Suppose the components of a vector
f (t) = (f1 (t), f2 (t), f3 (t)),
(1.1)

are single-valued functions of a real variable. Then f is called a vector function of t.


f (t) is a continuous function of t if f1 (t), f2 (t) and f3 (t) are continuous functions.
a function is continuous if its value does not change suddenly at any point). (Roughly speaking,

Examples:
f (t) = (2, t, sin t), 0t< t 2 2 < t < . f (t) = (t3 , t, 3), f (t) = (2t2 , 2, 6t1 ),

1.2 Geometrical Representation of a Vector function


Consider a position vector

OP

where O is the origin and P is the point

f (t) = (f1 (t), f2 (t), f3 (t)).

As t varies over it's range of values, P describes a curve in 3 dimensions. The equation

OP = r = f (t),
where

(1.2) of the curve described by

r = (x, y, z)
Here

is called the

parametric equation

(t is the

parameter). which

is called the parameter and to completely specify the curve, the range over

varies must also be given as in the examples above (see Figure 1.1).

Example 1.2.1 Find the locus of P as varies (0 2) (with constant) if


OP = ( cos , 0, sin ).
1

z C r(t) y x P

Figure 1.1:

A curve in 3D described by a point P whose position is given by an equation of the type

r = f (t).

Example 1.2.2 Let a and b be the position vectors relative to the origin of the points A, B . Show
that the equation of the straight line through A, B can be expressed in the form:
r = a + (b a)t,
(1.3)

where t is a parameter in the range < t < . Solution.


The position vector of

relative to

is

AB = b a.
The point

with position vector

lies on the line through

and

(see Figure 1.2) if and only if

AP = (b a)t,
where

is some real number. Noting that

OP = OA + AP ,
we have

r = a + (b a)t.

This is the parametric equation of the straight line through

and

because the position vector of all points on the line can be represented in this form. Intuitively note that the vector RHS picks out the point

ba

is parallel to

AB

so in equation (1.3) the rst term on the

and the second term moves the point in a direction parallel to the line

AB .

The value of

determines which particular point on the line is picked out.

1.3 Dierentiation of Vectors


Denition 1.3.1 Suppose f (t) = (f1 (t), f2 (t), f3 (t)) and fi (t) are dierentiable with t in some given
interval. Then we dene
df = dt ( df1 df2 df3 , , dt dt dt
2

) ,
(1.4)

A a r O
Figure 1.2:

B b

Equation of the straight line through A, B .

to be the rst derivative of f (t).


There is a natural extension to higher derivatives

dn f dtn , e.g.

d2 f = dt2

d2 f1 d2 f2 d2 f3 , , dt2 dt2 dt2

) .

Example 1.3.1 Find the values for which a = (cos x, sin x, 0) satises the dierential equation
d2 a = 9a. dx2

1.4 Dierentiation rules


If

a(t), b(t)

and

(t)

(a scalar) are dierentiable w.r.t

t:

(i) (ii) (iii) (iv)

d(a + b) da db = + dt dt dt da d d(a) = + a dt dt dt d(a b) da db = b+ a dt dt dt d(a b) da db = b+a . dt dt dt

Note:

The order is important in (iv) but not in (iii). The operation of taking the dot product of

two vectors is commutative; the operation of taking the vector product is not. I.e.

ab = ba

but

a b = b a. Example 1.4.1 Show that the rst derivative of a unit vector a = a(t) is always perpendicular to a

provided the derivative is not zero.

Solution.
aa=1
which implies that

d a d a a+a =0 dt dt
d a dt .

2 a

d a = 0, dt

is perpendicular to

Example 1.4.2 Apply the above to the particular example where a = (cos t, sin t, 0).

1.5 The tangent to a curve


Suppose a continuous curve C (i.e. a curve without any break or jump, which can be drawn without removing the pen from the paper) is the locus of the point origin

whose position vector relative to the

is described by

OP = r = r(t) = (x(t), y(t), z(t)). r = f (t) C


but the common practice is to use at which

(1.5)

(Note that we could have written function). Let

to symbolise the

be a particular point on

dr dt exists and is not zero.

Then at this point by

dr dt lies along the tangent to the curve in the sense in which the curve is described

as

increases (see Figure 1.3).

z P r(t) dr dt

Figure 1.3:

Tangent to a curve:

dr dt

is tangent at the point P0 .

If the tangent at

is

dr dt at

t = t0 ,

then the

unit tangent is dened to be the vector:


(1.6)

= dr/dt . t |dr/dt|

Example 1.5.1 Consider the vector valued function r(t) = (t, t3 , 1). Find its derivative and hence
the unit tangent vector to the curve at the point (0, 0, 1).

1.6 Smoothness
The curve described by

r = r(t) = (x(t), y(t), z(t)), is said to be smooth if exists at all points and t

is continuous. Smoothness means the curve does not undergo any sudden changes in (See Figure 1.4).

direction.

(a)
Figure 1.4:

(b)

Classication of curves: (a) is smooth and (b) is piecewise smooth.

piecewise smooth curve r = r(t) is one which is continuous and consists of a nite number of

smooth curves linked end to end.

Example 1.6.1 Show that the unit tangent to the curve


r(t) = (t2 , 2t, 0), 1 t 1 1 < t 2, (1, 4 2t, 0),

is discontinuous at t = 1. Verify that it is piecewise smooth.

1.7
Let

Arclength
be a parametric equation of a

r(t) = (x(t), y(t), z(t))

ds dr = = dt dt
and so,

piecewise smooth curve.


)2 + )2 + ( dz dt )2 , )2 dt,

Dene

dx dt

)2 +

dy dt

(1.7)

s(t) =

is the from from

arclength of C
to to

t0

dr dt = dt

t0

dx dt

)2 +

dy dt

dz dt

(1.8)

A A

B B.

with

r(t0 ) = OA

from the xed point and

t0 to r(t1 ) = OB .

the variable point Then

t.

Suppose the curve extends

s(t0 ) = 0

and

s(t1 )

is the length of curve

The element of arclength situation (see Figure 1.5).

ds

satises

ds2 = dx2 + dy 2 + dz 2

and is a natural extension of the 2D

Example 1.7.1 Find an expression for the arclength of the curve expressed parametrically as r(t) =
(cos t, sin t, 4t),

where 0 t 2.
5

y ds dy dx

x
Figure 1.5:

Geometric interpretation of ds in 2D.

1.7.1 Intrinsic Equation of a Curve


We can change parameters in a parametric formulation quite easily. Consider with as

r = r(t), and t = t(u)


(with the same sense

dt du

>0

at all points, then we can describe

parametrically in terms of

t).

For curves in space it is natural to use the arclength as parameter. From the denition of arclength

ds dt

so

t = t(s)

is allowable and

r = r(s) = (x(s), y(s), z(s)),


is an alternative parametric description of the curve called the

(1.9)

intrinsic equation of the curve. dr the arclength is the parameter then at any point on r(s) the unit tangent is ds .
dr = (dx, dy, dz) so
dr ds

If

[This follows from the fact that

( dx )2
ds

( dy )2
ds

( dz )2
ds

( ds )2
ds

= 1.]

1.8 Curves and Surfaces


In 3D space, we can describe a curve parametrically by

r = r(t) = (x(t), y(t), z(t)),

i.e. only

one

parameter is necessary in the parametric description. A surface can be represented parametrically by

r = r(u, v) = (x(u, v), y(u, v), z(u, v)),

i.e.

two parameters are required to dene a surface.

Examples:
r(t) = (cos t, sin t, t)
cylinder is called a circular helix (i.e. a curve),

t .

It lies on the

x2 + y 2 = a2 .
is a cylinder

r(u, v) = (cos u, sin u, v)

v , 0 u 2 .

1.9 Curvature
An important physical quantity when dealing with curves is their curvature. Let a curve have an

intrinsic

equation

r = r(s).

The curvature of the curve at any point (i.e. at any value of

s)

is

dened to be:

(s) =
The quantity

d2 r . ds2

(1.10)

1 is called the radius of curvature and corresponds to the radius of the circle that

would "t" into the curve at any point. This may of course vary from point to point.

Example 1.9.1 Find the curvature and radius of curvature for


t 2 .

r(t) = (cos t, sin t, 4t),

where 0

1.10
Let

Velocity & Acceleration


be the position vector of a point

r(t)

in space, where

is time. (Just think of

as being a

parameter which in this case physically corresponds to the time). Then of

r(t)

represents the path

in space. From previous work we know that the vector function

v=
is tangent to

dr , dt P.
We recall also that

(1.11)

and therefore points in the instantaneous direction of

|v| =

dr ds = , dt dt P
from a xed point (s

(1.12)

where s is the arclength, which measures the distance of the curve. Hence

= 0)

on

along

velocity vector of the motion. The derivative of the velocity vector is called the acceleration vector and will be denoted a. Thus
ds dt is the speed of

P.

The vector

called the

a(t) =

dv d2 r = 2. dt dt

(1.13)

Example: Centripetal acceleration


The vector function

r(t) = R cos ti + R sin tj

(where

is a known constant and

is the time)

represents a circle of radius particle

R with centre at the origin in the xy -plane and describes the motion of a v(t) = R ).
dr dt

in the anti-clockwise direction. The velocity vector

= R sin ti + R cos tj

is tangent to

and its magnitude, the speed, is constant (=

The

angular speed

(speed

divided by the distance

from the centre) is equal to

The acceleration vector is

a=

dv = R 2 cos i R 2 sin j = 2 r. dt
7

We see that there is an acceleration of constant magnitude

|a|

towards the origin, the so-called

centripetal acceleration, which results from the fact that the velocity vector is changing direction at a constant rate. opposite vector The centripetal force is thus

ma

where

is the mass of

P.

(Note that the

ma a

is called the centrifugal force).

It is clear that

is the rate of change of

v.

In the example,

|v|

is constant, but

|a| = 0

which

illustrates that the magnitude of

is not in general the rate of change of

|v|.

The reason is that

is not, in general, tangent to the path

C.

In fact, by applying the chain rule of dierentiation to

(1.11) and denoting derivatives with respect to

by primes ( ), we have

v=
and by dierentiating this again

dr dr ds ds = = r , dt ds dt dt ( ) ( )2 d2 s ds ds r =r + r 2 . dt dt dt r
is perpendicular to

dv d a= = dt dt
Since

(1.14)

is the tangent vector and its derivative

a decomposition of the acceleration vector into its normal component component

r , the ( ) ds 2
dt

formula (1.14) is and its tangential

s r d 2 . dt
2

From this we see that if, and only if, the normal component is zero,

|a| equals the


(since

rate of change of

|v| =

ds dt , except for possibly the sign, because

|a| = |r |

d2 s dt2

d2 s dt2

r =

dr ds

is the unit tangent vector).

Example: Coriolis acceleration


A particle being

moves in a straight line from the centre of a disc towards the edge, the position vector

r(t) = tb,
where

(1.15)

is a unit vector, rotating together with the disc with constant angular speed

in the

anti-clockwise sense. (see Figure 1.6). Find the acceleration

of

P.

Solution.

Because of the rotation,

is of the form

b(t) = cos ti + sin tj.


Dierentiating (1.16) w.r.t.

(1.16)

we obtain the velocity

v=
Obviously

dr db =b+t . dt dt t db dt

(1.17)

is the velocity of

relative to the disc, and

is the additional velocity due to the

rotation. Dierentiating once more, we obtain the acceleration

a=

db d2 b dv =2 +t 2 . dt dt dt
8

(1.18)

In the last term of (1.18) we have acceleration

d2 b dt2

= 2 b

which follows from dierentiating (1.16). Hence this

d2 b dt2

is directed towards the centre of the disc and from the last example we see that

this is the centripetal acceleration due to the rotation. In fact, the distance of equal to

from the centre is

which therefore plays the role of

in the last example.

The most interesting and probably unexpected term in (1.18) is

2 db , dt

the so-called

Coriolis accel-

eration, which results from the interaction of the disc and the motion of P
direction of rotation. If

on the disc. It has the

db dt , that is, it is tangential to the edge of the disc and it points in the direction of the

is a person of mass

m walking on the disc according to (1.15),

then

will feel a force

2m db dt

in the opposite direction, that is, against the sense of rotation.

y b b x

Figure 1.6:

Motion for coriolis acceleration.

+D=FJAH

Scalar & Vector Fields


2.1 Regions
Denition 2.1.1 Let V be a set of points in space. A point P
V. V

is an interior point of V if

there exists a sphere (however small) with centre P s.t. every point of the sphere is contained in A point P V is a boundary point if every sphere centred on P contains interior points and points that are not in V . The set V forms a region R if each point of V is either an interior or boundary point and if every pair of points can be joined by a continuous curve consisting entirely of points in V . R is open if it contains no boundary points. R is closed if all points not in R form one or more open regions.

Examples:

In 2D replace the word sphere in the above denition with circle.

x2 + y 2 < 1 x2 + y 2 1

is an open region.

is a closed region;

(1, 0)

is an example of a boundary point;

(0, 0)

is an interior

point (boundary is the circle

x2 + y 2 = 1).

In 3D,

x2 + y 2 + z 2 < 1

is open.

x2 + y 2 + z 2 1

is a closed region;

(1, 0, 0)

is a boundary point,

(0, 0, 0)

is an interior point

(boundary is the sphere

x2 + y 2 + z 2 = 1).

Note:

1 < x2 + y 2 2 is neither an open region nor a closed region so a region may be neither

open nor closed.

10

2.2 Functions of Several Variables


We are familiar with functions of one variable, e.g. etc. Recall that, loosely speaking,

y = f (x),

and its continuity, dierentiability

y = f (x)

is continuous if it can be drawn without removing the

pen from the page. This is represented by a curve in the A function of two variables

xy -plane.

z = f (x, y)

represents a surface in 3D.

Consider a function of three variables

w = f (x, y, z) dened over some region of space R. f (x, y, z) is x, y, z


vary in an analogous way to functions of a

continuous if no sudden jumps occur in its value as

single variable. Most physical quantities can be represented by continuous functions, e.g. may represent the temperature at each point in a room. A function of more than two variables

T (x, y, z)

w = f (x1 , x2 , . . . , xn1 ),
is dened in

(2.1)

Rn ,

and is not possible to draw for

n > 3.

2.3 Partial Derivatives


Denition 2.3.1 The rst order partial derivative
dened as, with similar denitions for
f y f x

of f (x, y, z) at the point (x, y, z) w.r.t. x is

f f (x + h, y, z) f (x, y, z) = lim x h0 h

and

f z

. The partial derivatives are often written as fx , fy and fz .


y, z
are held constant, so in practise we treat

Note:
z

In the denition of

f x , the other variables

y,

as constants and dierentiate in the usual way w.r.t.

x.

Example 2.3.1 Find the partial derivatives of f (x, y, z) = x3 + x2 y + xyz .


Solution.
fx = 3x2 + 2xy + yz, fy = x2 + xz, fx
at

fz = xy. (1, 2, 3)
rst evaluate the partial and

To evaluate partial derivatives at a particular point, e.g.

derivative symbolically rst and then substitute in the values above example,

x = 1, y = 2

z = 3.

Thus in the

fx (1, 2, 3) = 3x2 + 2xy + yz

(x,y,z)=(1,2,3)

= 3 + 4 + 6 = 13.

Higher order derivatives are dened in the obvious way:

2f = fxx = 2 x x

f x

) .

11

For example, if

f = (x + 2y + 3z)4

then

fx = 4(x + 2y + 3z)3 ,
Similarly we have:

fxx = 12(x + 2y + 3z)2 , ( ) =

fxx = 24(x + 2y + 3z).

fxy
with a similar interpretation for

= x
etc.

f y

2f , xy

fxz , fyz

Theorem 2.3.1 If all the mixed second order derivatives exist and are continuous at a point, then
at that point:
fxy = fyx , fyz = fzy , fzx = fxz .
(2.2)

(proof omitted).

2.3.1 Continuously dierentiable functions:


The function

f (x, y, z) is said to be continuously dierentiable if its rst order partial derivatives


exist and are continuous at every point.

fx , fy

and

fz

Example 2.3.2 Demonstrate the above results for f (x, y, z) = sin (ax + by + cz).

2.3.2 The Chain Rule


Suppose

F = F (f, g, h)

is a continuously dierentiable function of three variables and

f, g

and

where and are

f = f (x, y, z), g = g(x, y, z) z.


Then

h = h(x, y, z)

are continuously dierentiable functions of

x, y

is a continuously dierentiable function of

x, y, z

and its derivatives w.r.t.

x, y, z

given by

F x F y F z

= = =

F f F f F f

f F g F h + + x g x h x f F g F h + + y g y h y f F g F h + + . z g z h z F (f, g, h)

(2.3)

Note: There is a diculty with the notation above as we have written

and also in eect

F (x, y, z).

It is strictly better to write

F (f, g, h)

and

G(x, y, z)

say, where

G(x, y, z) = F (f, g, h). G/x, G/y

This way we could write the chain rule replacing the LHS of (2.3) the chain rule with and

G/z

which removes the ambiguity as

G = G(x, y, z).

Example 2.3.3 Suppose that


F (f, g) = f + sin g, f = x cos y,
12

g = x sin y.

When we write F as a function of (x, y) we should write it as a new function G(x, y) with G(x, y) =
x cos y + sin (x sin y)

and G(x, y) = F (f, g). If we use this notation, no ambiguity arises when we
G = cos y + cos (x sin y) sin y. x

write partial derivatives. Directly from this denition we therefore have


(2.4)

Now, from the chain rule


G F f F g = + = cos y + cos g sin y = cos y + cos (x sin y) sin y, x f x g x

and this equals (2.4).

2.4 Denitions of Scalar & Vector Fields


Denition 2.4.1 Suppose a scalar (x, y, z) is dened on a point set U in 3D space, i.e. to each
point P (x, y, z) in U there corresponds a single scalar value of . Then is called a scalar function of position or a scalar eld. Likewise if a vector v(x, y, z) is dened on a point set U , then v is called a vector function of position or a vector eld. (U will usually be a region). Alternative notation for (x, y, z) and v(x, y, z) is (r) and v(r) where r is the position vector for the point
P (x, y, z).

Note that v has three components like any vector.

We emphasise the notation for the often write

position vector which we will give the special label r.


to the general point with coordinates

We will i.e.

r = (x, y, z)

and by this we strictly mean the vector with components

xi + yj + zk,

the vector joining the point however we will also use

(0, 0, 0)

(x, y, z).

On occasion

to refer to the point with coordinates

(x, y, z).

Example 2.4.1 In a owing liquid, the velocity eld might be given by u = (z, x + y, x + zy) and
the pressure by p = x + z . Thus u is a vector eld and p is a scalar eld. What is u at the point with position vector r = (0, 0, 1)? What direction is the ow at this point? What is the pressure at
r = (1, 1, 1)?

2.5 Gradient of a Scalar Field


Denition 2.5.1 If f (x, y, z) is dened and continuously dierentiable in some open region R then the gradient of f is dened as:
grad f = f = where
= ( ( f f f , , x y z ) . ) ,
(2.5)

, , x y z

Example 2.5.1 Find f when f (x, y) = x2 + xy + y2 .


13

2.6 Properties of the Gradient (of a scalar)


2.6.1 The directional derivative
We are used to nding (partial) derivatives w.r.t. the co-ordinate axes function of a single variable, e.g. only possible derivative is

x, y, z .

Consider a scalar

y = f (x).

Geometrically this is represented by a curve and the

dy dx , and it denotes the rate of change of

in the direction of increasing In this case we have

x.

Suppose we now have a scalar function of two variables, e.g.

z = f (x, y).

two partial derivatives in the directions

f f x and y . Geometrically these correspond to the rate of change of

f (x, y)

and

respectively.

Consider the example in Figure 2.1, showing a function of two variables, and x attention on some point on the surface represented by of change in the directions

z = f (x, y).

At this point the partial derivative reects the rate

and

of the co-ordinate axes. If a cyclist were located at the point

in question, then if they faced in the positive

direction, the slope of the land immediately ahead

f would be given by x while if they faced in the positive

direction the slope would be given by

f y .

When we move to functions of three independent variables, it is not so easy to build up a geometric picture, but the picture for functions of two variables is sucient to understand what follows. We would like to generalise our partial derivatives so that we can obtain expressions for the rate of change of the scalar function under consideration the cyclist to face in

in any direction.

In Figure 2.1 we wish to allow

any direction (not just parallel to the co-ordinate axes) and still be able to
We dene the directional derivative of

estimate the slope in that particular direction. Let

f (x, y, z) n

be a scalar eld.

in the direction of

any
f

vector

in the following way. Let

way that the vector takes the values

PP

be a xed point and

another point which varies in such a

is always parallel to a xed unit vector at

n.

Assume that the scalar eld

f (P ), f (P )

and

respectively. The derivative of

at

in the direction of

n,

which we denote

f n , is dened as

f f (P ) f (P ) := lim , P P n PP
wherever the limit exists. away from It is clear that, in general,

will vary at dierent rates as we move

in dierent directions; the directional derivative measures the rate of variation in the

direction of The most

n.

important formula involving the directional derivative is:


f = grad f n = f n, n
(2.6)

i.e. it is the component of grad f in the direction of The notation

n. f
w.r.t. n!

f n might be misleading: we are not dierentiating

14

0.8

0.6

z
0.4 0.2 0 4 3 2 2 1 1 0 0 3 4

Figure 2.1:

Graph of the surface z = f (x, y) = sin xey for 0 x , 0 y 4.

Example 2.6.1 Find the directional derivative of f (x, y, z) = 2x2 + 3y2 + z 2 at the point P (2, 1, 3)
in the direction of the vector n = i 2k.

Example 2.6.2 Find the directional derivative of f (x, y, z) = x2 y2 z 2 + x + y + z in the direction


of the vector 2i j + 2k at the point (1, 1, 1).

2.6.2 Direction of maximum increase


Now

f = f n = |f || | cos , n n
where

is the angle between the vectors

and

n.

Clearly the directional derivative has its largest

value when

=0

(i.e. when

cos = 1).

This is the

direction of maximum increase and now

f = |f |. n

Example 2.6.3 The ow of heat in a temperature eld takes place in the direction of maximum
decrease of temperature T = x/y. Find this direction at the point P (8, 1).

2.6.3 Level curves and surfaces


Consider a scalar eld

z = f (x, y),

this represents a surface in 3D. At points where

has a max-

ima/minima we will have mountains/valleys. We can also represent by drawing

f (x, y)

in a 2D representation

contours or level curves which are curves along which f

is a constant. For example, if

has a local maximum (mountain top) the contours or level curves might look like those in Figure

15

2.2. We draw contours by setting

f (x, y) = c, c

a parameter, and nding all the points

(x, y)

which

are at this particular height. By varying

we can draw all the contours and get and idea of what

the scalar eld looks like without having to draw a 3D picture. Another example is a weather map on which isobars are lines of equal pressure function

p,

which is a scalar

p = p(x, y) where (x, y) represent the location on the earth's surface. p(x, y)

We can picture what

the surface representing the pressure

would look like from a consideration of the contours: a

centre of high pressure would be geometrically similar to a mountain top.

f=3 f=1 f=1 f=3 f=2 "Mountain top"


Figure 2.2:

f=2

"Valley"

Contours for a mountain-top and a valley.

Example 2.6.4 Draw the contours f (x, y) = x2 + y2 .


In 3D with

w = f (x, y, z),

we cannot draw this in 4D. However, if we generalise the above, then the As

contours now become level surfaces dened by f (x, y, z) = c.


each of which is now a

varies we get dierent contours

surface in space.

Example 2.6.5 What are the level surfaces of f (x, y, z) = x2 + y2 + z 2 ?

2.6.4 Important connection between f and its level surface


Theorem 2.6.1 Suppose f (x, y, z) is a scalar eld. Consider a level surface given by f (x, y, z) = c
and choose a particular point P (x, y, z) on the level surface. If grad f does not vanish at this point, then the vector grad f is normal to the level surface f = c at P . Proof.
(call it Consider a curve in space passing through

and lying on the level surface As

f = c.

This curve

C)

may be written

parametrically as r(t) = (x(t), y(t), z(t)).


dc f dx f dy f dz + + = = 0. x dt y dt z dt dt
16

lies on the surface

f =c

we have

f (x(t), y(t), z(t)) = c.

Dierentiating this equation by the chain rule gives:

That is,

f
Now

dr = 0. dt r.
From the results

is a curve on the surface

f =c

and

dr dt is tangent to the curve dened by

in Chapter 1 we know that it is perpendicular to the vector

r(t).

But

r(t) is any curve on the surface f = c,

f =c
i.e.

and so grad f

= f

must be perpendicular to the tangent plane of the level surface

is orthogonal to all vectors

dr dt in the tangent plane. Thus

is perpendicular to its own

level surfaces.

This is a very useful result as we can apply it to given by and

any surface or curve.

Suppose we have a curve

y = f (x)

or a surface given by

z = g(x, y).

Then we rewrite each formula as

y f (x) = 0

z g(x, y) = 0
and

and the theorem tells us that the normal vector to the curve or surface is respectively.

(y f (x))

(z g(x, y))

Example 2.6.6 Consider a surface given by f (x, y) = ln(x2 + y2 ). Demonstrate the above result.
Solution.
We need to show that

is normal to the level curves of

f.

The level surfaces (curves in

this case) are given by

f = c,
where

c arbitrary

ln(x2 + y 2 ) = c

x2 + y 2 = ec = ,
for arbitrary

= ec

is arbitrary. So the level surfaces are dened by

x2 + y 2 = ,

Thus

the level curves are circles. Consider the case

=4 i

and examine the point

(2, 0) x

on the level curve

x2 + y 2 = 4 .

At

(2, 0),

the

normal to this curve is

(i.e. the unit vector in the

direction). In addition

( f =
so at the point

2x 2y , 2 + y 2 x2 + y 2 x f |(1,0)

) ,

(2, 0), f = (1, 0) = i

and so

is in the direction of the normal to the curve

at this point. This is represented geometrically in Figure 2.3.

Example 2.6.7 Find a unit normal vector for the curve y = 1 x2 at P

= (1, 0).

2.6.5 Taylor's Expansion


For a function of one real variable of a function near a point

y = f (x),

Taylor's expansion allows us to write down the value

x0 ,

solely in terms of its value of

x0

and derivatives of the function at

x0 ,

i.e. solely in terms of quantities evaluated at the point Thus if

x0 .

f (x)

is a well behaved function:

f (x) = f (x0 ) + h

df dx

+
x=x0
17

h2 d2 f 2 dx2

+ O(h3 ),
x=x0

(2.7)

x 2+ y 2= 4

direction of f at (2,0)

Figure 2.3:

2D example of the relationship between the level surfaces of f and f .


Such expansions are very useful if

where

h = x x0 .

h1

as we can usually truncate after two

terms. [Recall that if

h 1,

then

h2

and higher powers are even smaller so that for

h1

the rst

two (or three) terms on the RHS will be a good approximation for the LHS].

For a function of several variables

f (x, y, z),

the analogous result is:

f (x, y, z) = f (x0 , y0 , z0 ) + h
where

f x

+k
(x0 ,y0 ,z0 )

f y

+l
(x0 ,y0 ,z0 )

f z

+ O(h2 + k 2 + l2 ),
(x0 ,y0 ,z0 )

(2.8)

h = x x 0 , k = y y0

and

l = z z0 .
at some point removed from

So, we have an expression for evaluated solely at

(x0 , y0 , z0 )

in terms of quantities

(x0 , y0 , z0 ).

This approximation is most useful for

h, k, l 1.

Note if we dene the vector

(h, k, l) = r, then we can write the above expression in vector notation:

f (x, y, z) = f (x0 , y0 , z0 ) + r f |(x0 ,y0 ,z0 ) + O(|r|2 ).

Example 2.6.8 Use Taylor's expansion to nd a rst order approximation for f (1.5, 2.5) based on
quantities estimated only at the point (1, 3) if f (x, y) = x2 + y2 . What is the error in your estimate?

2.7 Divergence and Curl of a Vector Field


Suppose

is a continuously dierentiable vector eld

f = f (x, y, z) = (f1 (x, y, z), f2 (x, y, z), f3 (x, y, z)),


in some open region Then, in

R.

R,

the

divergence of the vector eld f (x, y, z) is dened to be the scalar quantity:


div f

f1 f2 f3 + + . x y z
18

(2.9)

In index notation this can be represented as The

fi xi .

curl of the vector eld f (x, y, z) is dened to be the vector with components:
(
curl f

f3 f2 f1 f3 f2 f1 , , y z z x x y i
x

) ,
(2.10)

which can be more easily expressed in the following form:

curl f

= det

j
y

k
z

(2.11)

f1
and so curl f is a vector eld.

f2

f3

Note:
1. In uids every ow of an incompressible uid must satisfy velocity at any point in the uid.

div v = 0

where

v(x, y, z)

is the

2. A vector eld for which

div v = 0

is said to be a

divergence-free vector eld.

3. If

v(x, y, z) is the velocity of a uid, then curl v is termed the vorticity and concerns whether

or not uid particles rotate.

4. If

curl v = 0

everywhere the ow is termed irrotational and uid particles do not rotate.

Example 2.7.1 Find the divergence of f if (i) f = (x2 + 2y + z)i + (3y)j + (x3 + y)k, (ii) f = r =
(x, y, z).

Example 2.7.2 Find curl f and curl curl f where f = (z + x, x + y, y + z). Note: The above example shows that for a constant vector eld F, we always have curl F = 0 (which
can easily be seen from (2.11) since the partial derivatives are zero if

f1 , f2 , f3

are constant).

2.7.1 Physical Interpretation of the Divergence


Imagine a compressible uid in a two dimensional ow with density eld

= (x, y)

and velocity vector

u(x, y) = (u(x, y), v(x, y)), i.e.

in this simple case the velocity vector only has two components.

Consider a small element in the ow domain of dimensions

and

and imagine an amount of

liquid entering and leaving the element in unit time (i.e. per second), see Figure 2.4.

19

v (x, y + y) (x + x, y + y)

element

(x, y)

(x +

x, y)

Figure 2.4:

Small element in the ow domain.


x

The mass of liquid passing through the left hand upright edge in the positive time (mass ux) is approximately

direction in unit

(x, y + y/2)u(x, y + y/2)y.


The mass of liquid passing through the right hand upright edge in the positive time is

direction in unit

(x + x, y + y/2)u(x + x, y + y/2)y.
Thus the net mass ow of liquid passing the element per unit time is

out (through both the left hand and right hand edges) of

[ ] (x + x, y + y/2)u(x + x, y + y/2) (x, y + y/2)u(x, y + y/2) y [ ] (x + x, y + y/2)u(x + x, y + y/2) (x, y + y/2)u(x, y + y/2) = xy. x
From elementary calculus if

(x, y)u(x, y) is a function of two variables x, y then: [ ] (x + x, y + y/2)u(x + x, y + y/2) (x, y + y/2)u(x, y + y/2) (u) = lim , x0 x x x 0
and

and so letting the size of the uid element tend to zero (i.e. letting at the result:

y 0)

we arrive

net mass ow rate of liquid out of element through vertical edges as By a similar argument:

x 0

is

(u) x xy .

net mass ow through the horizontal edges is

(v) y xy .

Hence the net ow of liquid out of the (innitesimally) small element of area

dx dy

is given by

(u) (v) dx dy + dx dy = div(u)dx dy = div(u)dV, x y

20

where

dV

is the "volume" of the element (in this 2D problem it is the area of the element). This is

the origin of the term

divergence:

it refers to the amount of some quantity

diverging out of each

point in the region under consideration. The above argument can be generalised to 3D problems where the ow occurs in three dimensions. The following equivalent expression results (with

now a vector with 3 components):

The net ow of liquid out of an element dx dy dz per unit time equals
div((x, y, z)u(x, y, z)) dx dy

dz. = div u.
But by

If the liquid is incompressible, then

(x, y, z)

is constant and so div(u)

conser-

vation of mass, the same mass of liquid must be owing into the element as out of it (as there is
no change in density in the liquid element) and so for an incompressible liquid div u div u

div u = 0 and hence

= 0. =0

If

represents the velocity vector eld for any

incompressible ow, then necessarily

everywhere in the ow.

2.7.2 Physical interpretation of curl


A similar sort of analysis can be performed for a owing liquid to show that if

is the velocity

vector, then curl u at any point is a measure of the tendency of the uid element at that point to rotate. In principle curl u could be measured by inserting a little paddle wheel into the uid at any point. The rotation of the wheel would be a measure of the curl.

(x, y + dy) 3 4 1 (x, y)


Figure 2.5:

(x + dx, y + dy)

(x + dx, y)
Small element in the ow domain.
u = (u, v).
Consider now a small

To see this imagine a liquid owing (in 2D) with velocity vector

square in the owing liquid as in Figure 2.5. The circulation of the velocity vector about the square

21

indicates the tendency of the liquid to move around the square and is dened by:

IGK=HA

u dr =

u dx +
IE@A  IE@A

v dy

IE@A !

u dx

v dy
IE@A "

= calculation

of integral about the square

1234.

Now write all the velocity components as Taylor series about 1 is (approximately) and along 4 is

(x, y)

while assuming velocity along along 3 is

u(x + dx/2, y),

along 2 is

u(x + dx, y + dy/2),

u(x + dx/2, y + dy)

u(x, y + dy/2).

Thus, using Taylor series to rst order:

along 1: along 2:

u(x + dx/2, y) = u(x + dx/2, y) u(x, y) +

dx u 2 x

along 3:

along 4:

v dy v + x 2 y dx u u u(x + dx/2, y + dy) = u(x + dx/2, y + dy) u(x, y) + + dy 2 x y dy v u(x, y + dy/2) = v(x, y + dy/2) v(x, y) + . 2 y u(x + dx, y + dy/2) = v(x + dx, y + dy/2) v(x, y) + dx u(x, y) = (u(x, y), v(x, y)).
In the direction of side 1 the component

Note that the velocity vector is of the velocity vector is just etc. Thus

u(x, y).

Similarly in the direction of side 2 the component is just

v(x, y)

) ( ) ( v dy v dx u dx + v + dx + dy u dr u + 2 x x 2 y IGK=HA ( ) ( ) dx u u dy v u+ + dy dx v + dy 2 x y 2 y ) ( u v dx dy. x y

But

v x

u y is the third component of curl u, see (2.10), and so the circulation per unit area (as
We can also interpret this as

dx dy

is the area of the square) is the third component of curl u.

meaning that the circulation about an innitesimal area equals the component of the curl normal to the area (as the square in Figure 2.5 was in the was the component of the curl in the

(x, y)

plane while the circulation per unit area

z -direction).

Vector elds for which the curl is zero elds.

everywhere are said to be curl-free or irrotational

vector

Example 2.7.3 A uid has velocity eld u = (x+z, y2 , 0). Check whether the ow is incompressible
and/or irrotational.

2.8 The Del Operator


An equation like

d2 y dx2 ( 2 d

dy + 2 dx + 3y = 0 is sometimes written as ) d +2 + 3 y = 0 or (D2 + 2D + 3)y = 0 dx2 dx


22

with

d . dx

is called an operator and it needs an operand to make sense, i.e it cannot stand alone. So, for

example

D(y) =
. Note that the

dy . dx D(uv) =

operator obeys some but not all the rules of ordinary algebra, e.g.

uD(v) = uvD.

In fact,

D(uv) = uD(v) + vD(u)

which is just the product rule for dierentiation.

2.8.1 The Del Operator in Cartesian Coordinates


The expression

i +j +k = x y z
is called the

, , x y z

) ,
(2.12)

del operator or del or nabla.

behaves like a vector and is termed a

Under rotation of axes (or translation) (compare

vector operator

above). Thus we formally dene:

= grad ,
and we think of eld

(2.13)

as operating on the scalar eld

(x, y, z).

Similarly we dene (for the vector

v(x, y, z)): v = div v,


(2.14)

and likewise

v = curl v.
As with the

(2.15)

operator,

the components of act only upon the function to their right.

23

+D=FJAH !

Line, Surface & Volume Integrals


Typically a

denite integral will look like

b
a

f (x) dx where f (x) is called the integrand and a, b are

the limits of integration which physically corresponds to getting the area under the curve between

and

(see Figure 3.1). This integral is dened as follows:

a
Integration is merely a

f (x) dx = lim

m i=1

f (xi )xi .

(3.1)

limiting summation and for more advanced types of integration, we dene

everything in an analogous fashion.

y y = f(x)

Figure 3.1:

b
a

f (x) dx =

area under curve y = f (x) between x = a and x = b.

In practice, one often uses the fact that integration and dierentiation are inverse operations to carry out integrations, e.g.

sin x dx = cos x

because

d dx (cos x)

= sin x.

It is important to

appreciate that this is a useful way of evaluating many elementary integrals but that integration is actually dened as the limiting summation in (3.1). If one knows the value of the function at all values of

f (x)

x [a, b],

then in principle one can evaluate the area under the curve in Figure 3.1

(i.e. estimate the value of the denite integral) whether or not one knows the antiderivative of the integrand.

24

As the denite integral is the most basic type of integral the usual strategy in evaluating more complicated integrals (to be introduced in this chapter) is by some means or another.

reduction to denite integrals by

3.1 Line Integral of a scalar eld


This is a generalisation of the denite integral. Consider a piecewise smooth curve in space

with

intrinsic parametric equation


r = r(s) = (x(s), y(s), z(s)),
where

0 s l, (x, y, z)

(3.2)

is the arclength along the curve. Suppose that some scalar function

is dened as being

at every point of

C.

We break

up into little strips (see Figure 3.2) and consider

approximately constant over each strip.

C s A P2 P1 P3

Figure 3.2:

Breaking the curve C into strips.

Now consider the sum:

(P1 )s + (P2 )s + . . . + (Pn )s =


and dene the limit:

n i=1

(Pi )s

lim

n i=1

(Pi )s =
C

(x, y, z) ds =
C
along the curve

(s) ds, C,

(3.3)

to be the line integral of the scalar function

(x, y, z)

called the path of integra-

tion. The last equality comes from the fact that because the curve along the curve each of

is represented by (3.2), then also. In (3.3) it is possible

x, y , z

is a function of

s and so = (s) along C s

to put limits on the integration corresponding to the values of curve

at the start and end points of the

C.

Thus the integral can also be written as:

s1

(s)ds,
s0
25

(3.4)

where

s0 , s1

are the values of the arclength corresponding to the two ends of the curve (typically

s0 = 0

if we choose to measure the distance from this point).

The normal way of evaluating a line integral is by obtaining a path of integration

parametric representation for the


Then

C : x = x(t), y = y(t), z = z(t), with t varying, i.e. t . ds (x, y, z)ds = (x(t), y(t), z(t)) dt dt C ( ) ( 2) ( 2) dx 2 dy dz = (x(t), y(t), z(t)) + + dt, dt dt dt C,
that is

(3.5)

using the expression in (1.7) to replace

ds dt . The method is best illustrated by an example.

Example 3.1.1 Evaluate


z=0

ds

where (x, y, z) = xy3 and C is the segment of the line y = 2x,

in the xy plane from (1, 2, 0) to (1, 2, 0).


line integrals are evaluated by obtaining a parametric representation for the path using the fact that

Summarising:
of integration terms of

r = r(t),

ds =

ds dt dt and then writing the integrand

and

ds dt in

reducing it to a denite integral.

Example 3.1.2 Evaluate


(1, 0, 0), (0, 1, 0)

ds

when = x2 + y2 and C is the triangle with vertices at (0, 0, 0),

(see Figure 3.3).

z O x A(1,0,0)
Figure 3.3:

B(0,1,0) y

Triangle with vertices at (0, 0, 0), (1, 0, 0), (0, 1, 0).

Remarks:
(i) The line integral along a curve

is independent of the direction along which the curve is

traversed as long as arclength is taken to be increasing when we move from the designated startpoint to the designated endpoint, i.e.

ds =
C

ds.
C

26

(ii) For a line integral about a

closed

curve (for example a circle) the value of the integral is

independent of the point at which one starts. Such integrals are often written as emphasize the fact that the integration curve is closed.

ds

to

(iii) Analogous to denite integrals we have

k ds = k

ds where k is a constant.

In addition

(as occurred in the previous example) it is possible to split up the range of integration and add the constituent parts together:

ds =
C
where

ds +
C1

ds,
C2

C = C1 + C2 .

Finally, analogous to denite integrals we have:

(f + g) ds =
C

f ds +
C

g ds.
C

Exercise: Evaluate the line integral of = (a2 y2 /b2 +b2 x2 /a2 )1/2 around the ellipse x2 /a2 +y2 /b2 =
1, z = 0,
where

a, b

are known constants. for

[Hint:

The parametric equations of the ellipse are:

x = a cos , y = b sin , z = 0,

0 2 ].

3.2 Line Integrals of a Vector Field


Let

be a vector dened at all points on a piecewise smooth curve

C.

Let

denote the unit tangent t

along

C.

We dene:

I=
C

f ds, t

(3.6)

to be the scalar line integral of If

along

C.

(It is a scalar because of the dot product).

r = r(s)

is the position vector of any point on

then

dr t= , ds
and we can write the integral as:

(3.7)

dr I= f ds = ds C
(where

f dr,
C
(3.8)

r = (x, y, z) C

is the usual position vector and

dr = (dx, dy, dz)). f


about the curve and

If the curve is written:

is closed the integral is called the

circulation of the vector


=
C

Circulation In uid mechanics if

f dr.
C

(3.9)

is the velocity eld vector the circulation about a closed curve i.e.

u dr

indicates the tendency of uid elements to move around the curve

C.

Note that the direction in which the integration is carried out in a line integral important. If we reverse the direction of integration

of a vector eld is

is also reversed and the integral changes sign. t

27

So, for example if we are talking about the scalar line integral of a vector eld about a circle, we must dene the direction in which the integration is to be carried out (clockwise or anticlockwise). The technique for evaluating scalar line integrals of a vector eld is similar to that used for line integrals of a scalar eld. A parametric denition of the curve (note that this parameter

must be found in the form

r = r(t)

is a

dummy parameter:

we could have just as easily written

r = r()).

Then the integrand is written completely in terms of the parameter

t.

Finally, we use the fact that in terms of

dr =

dr dt dt

= r (t)dt

(compare with the equivalent step for writing

ds

dt

in the case of

the line integral of a scalar eld).

Example 3.2.1 Evaluate


x2 + y 2 = a2 , z = 0,

f dr

for the vector eld f = (z, x, y) along the curve C = the circle

described in a clockwise sense for an observer looking along the positive z -axis.

3.2.1 Work
In mechanics, if a force amount of

moves its point of application along a curve

in doing work then the

work done is given by the line integral:


Work done

=
C

f dr.

Example 3.2.2 Find the work done in moving a particle in a force eld given by
F(x, y, z) = 3xyi 5zj + 10xk,

along the curve with parametric denition r(t) = (t2 + 1, 2t2 , t3 ), for 1 t 2.

3.2.2 Conservative Fields


From introductory calculus we had the to evaluate denite integrals, i.e.

Fundamental Theorem of Calculus which told us how

F (x) dx = F (b) F (a).

It turns out that there is a version of this for line integrals over certain kinds of vector elds:

Theorem 3.2.1 Suppose that C is a smooth curve given by r(t), for a t b. Also suppose that
f

is a function whose gradient vector, f , is continuous on C . Then

( ) ( ) f dr = f r(b) f r(a) .

(3.10)

[We omit the proof ].

28

Example 3.2.3 Evaluate


Solution.

f dr

where f (x, y, z) = cos x + sin y xyz and C is any path

that starts at the point (1, 1 , 2) and ends at (2, 1, 1). 2


First notice that we did not specify the path for getting from the initial point to the end

point. The reason for this is simple: Theorem 3.2.1 tells us that all we need are the initial and end points on the curve in order to evaluate this kind of line integral. Thus

( ) 1 f dr = f (2, 1, 1) f 1, , 2 2 C

= cos 2 + sin (2)(1)(1) cos + sin (1) 2

( ) ] 1 (2) = 4. 2

The important idea from this example is that, for these kinds of line integrals, we did not need to know the path to get the answer. In other words, we could use any path we want and we will always get the same results.

Denition 3.2.1
F = .

(i) F is a conservative vector eld if there is a scalar function such that

C1

The function is called a potential function for the vector eld. is independent of path if
F dr =
C2

(ii)

F dr

F dr

where C1 and C2 are any two

paths with the same initial and end points.


Then we have the following two facts: (i)

f dr is independent of path.

[This is easy enough to prove since all we need to do is look

at Theorem 3.2.1. It tells us that in order to evaluate this integral all we need are the initial and end points of the curve. This in turn tells us that the line integral must be independent of path].

(ii) If

is a conservative vector eld then

F dr

is independent of path.

[This fact is also

easy enough to prove. If integral becomes

is conservative then it has a potential function,

and so the line

dr.

Then, using fact (i) we know that this line integral must be

independent of path]. Fact (ii) tells us that we can easily evaluate this line integral provided we can nd a potential function for

F:

F dr =
C

( ) ( ) dr = r(b) r(a) .

(3.11)

There are two questions we wish to ask: 1. Given a vector eld

is there any way of determining if it is a conservative vector eld?

2. If we know that

F is a conservative vector eld how do we go about nding a potential function

for the vector eld?

29

The rst question is easy to answer because it turns out that to determine if a eld is conservative it is sucient to check if the eld is irrotational, that is,

conservative

curl

F = F = 0. ,
that is,

This follows since a conservative eld the vector

has an associated scalar potential

= F.

Then from the denition in (2.11) we have curl

= = 0. k

This can be seen from

evaluating the determinant:

i =
x x

j
y y

z z

= 0.

Now that we know how to identify if a vector eld is conservative we need to address how to nd a potential function for the vector eld. This is actually a fairly simple process. First, we assume that the vector eld is conservative and so we know that a potential function

exists such that

F = .

If

F = (P, Q, R)

we can then say that

( =
Or, equating components

, , x y z

) = (P, Q, R).

= P, x

= Q, y

= R. z

We then integrate each of these with respect to the appropriate variable. It is usually best to see how to nd a potential function in practice from an example or two.

Example 3.2.4 Show that the vector eld

v = gk

(where g is the constant acceleration due to

gravity) is conservative. Determine an an associated scalar potential for the vector eld v.

Example 3.2.5 (Old exam question) Show that F = (2xy + z 3 )i + x2 j + 3xz 2 k is a conservative
vector eld and determine an an associated scalar potential for this vector eld. Hence nd where C is the curve described by r(t) = (t2 + 1, 2t2 , t3 ), for 1 t 2. Solution.
Now

Fdr

i F=
x

j
y

k
z

2xy + z 3 x2 3xz 2 =i
y z

x2 3xz 2

2xy + z 3 3xz 2

+k

2xy + z 3 x2

= i(0) j(3z 2 3z 2 ) + k(2x 2x) = 0.


30

So

is conservative and there exists

such that

F = = x2 , y

or

(i)

= 2xy + z 3 , x x
gives

(ii)

(iii)

= 3xz 2 . z

Integrating (i) w.r.t.

= x2 y + z 3 x + f (y, z).
Now dierentiating this w.r.t.

gives

f = x2 + . y y
From comparing with (ii) we deduce that Hence

f y

= 0

and integrating w.r.t.

then gives

f = f (z).

becomes

= x2 y + z 3 x + f (z).
Now dierentiating this w.r.t.

gives

f = 3z 2 x + . z z
From comparing with (iii) we deduce that

f z

=0

and so

f =c=

const. Hence

= x2 y + z 3 x + c.
Finally, to nd

F dr

we use Theorem 3.2.1, no integration is required! Now, Hence

r(a) = r(1) =

(2, 2, 1)

and

r(b) = r(2) = (5, 8, 8).

F dr =
C

dr = (r(b)) (r(a))
C

[ ] [ ] = (5)2 (8) + (8)3 (5) + c (2)2 (2) + (1)3 (2) + c = 2570. c


conveniently cancelled out in this calculation.

Note that the unknown constant

3.2.3 Vector Line Integrals


Another common type of line integral of a vector eld called a

vector line integral takes the form

f ds

and is dened as follows:

f ds = i
C
where

f1 ds + j
C

f2 ds + k
C

f3 ds,
C

f = (f1 , f2 , f3 ).

This integral results in a

vector and to carry integration involves computing

three scalar line integrals (which we saw how to deal with in 3.1).

31

3.3 Repeated Integrals


An integral of the form:

b
a

q(x)

f (x, y) dy dx,
p(x)
where of

a, b are known constants, p(x), q(x) are known functions of x, and f (x, y) is a known function
is called a

(x, y)

repeated integral.

It is evaluated by rst calculating the

inner integral:

q(x)

f (x, y) dy,
p(x)
while holding

x constant in the integration, i.e.

carrying out this integration as if

x were a constant.

When this integral has been evaluated and the limit values lled in, what remains is a function of

only

= I(x)

as wherever

appears it has been replaced by

b
a

q(x)

b { f (x, y) dy dx =
a

p(x), q(x). Now we have: } b q(x) f (x, y) dy dx = I(x)dx,


a

p(x)

p(x)

and evaluation of the repeated integral has reduced to evaluation of a denite integral as known function of

I(x)

is a

x.

General Rule of Thumb:


The limits on the inner integration can be functions of the outer variable (x above) but the limits on the outermost integral must be constants. In the special case when both sets of limits are constants the order of integration may be reversed, i.e.

b
a
provided

f (x, y) dy dx =
c

d b

f (x, y) dx dy,
a

a, b, c, d

are

constants.
I=
0 x/2 1 x

Example 3.3.1 Evaluate

xy dy dx.

Example 3.3.2 Evaluate


I=

/4 y 0

sin y dx dy. y

3.4 Double and area integrals


Let

f (x, y) be a scalar function of two variables dened over a closed region R


We subdivide

in

xy

space as shown

in Figure 3.4.

by drawing parallel lines to the

and

axes and number those

rectangles which are within in the

from 1 to

n.

In each such rectangle we choose a point, say

(xk , yk )

k th

rectangle, and dene:

32

x
Figure 3.4:

Integral over a 2D area R.

Jn =
where

n k=1

f (xk , yk )Ak , n
tend to innity:

Ak

is the area of the

k th

rectangle. Now let

lim Jn = lim

n k=1

f (xk , yk )Ak =
R

f dA =
R

f dx dy, R.
Thus

where the limits of the integration in terms of we write the area integral as a

and

are consistent with the region

repeated integral which we can

Rf

evaluate as in 3.3. The main

diculty in evaluating area integrals is in choosing the limits of integration to correspond to the region of integration

R.

Note, the notation

dA

instead of

Rf

dA

can also be used.

Example 3.4.1 Evaluate Example 3.4.2 Evaluate


x/2

R xy dA

where R is the square formed by the points (0, 0), (1, 0), (1, 1), (0, 1).

R xy dA

where R is bounded by the coordinate planes and the lines y =

and y = 1/2.
The region of integration is clearly that in Figure 3.5.

Solution.

Let us choose to integrate rst w.r.t. and during the rst integration inequalities:

and then w.r.t.

so the

variable is the inner variable

is held constant. In this case the region and the area integral is

is described by the

0 x 2y ; 0 y 1/2 I=
R

xy dA =

y=1/2 x=2y

xy dx dy
y=0 x=0 y=1/2 [ 2

= =
0 y=0 1/2

x y 2

]x=2y dy
x=0 [ 4 ]1/2 y

2y 3 dy =

1 . 32

33

y (0, 1/2)

y = x/2 (1, 1/2)

x (1, 0)

Figure 3.5:

Region of integration for Example 3.4.2.


x
rst we are integrating across horizontal

Note again that in performing the integration w.r.t. strips and the limits on

vary (as functions of

from strip to strip, see Figure 3.5).

Alternatively, we can reverse the order of integration noting that in this case the region by the inequalities:

R is described

0 x 1; x/2 y 1/2. In this case the x=1 y=1/2 I= xy dA = xy dy dx


R

integral becomes

= =

x=0

x=1 [

y=x/2

x=0

1(

xy 2 2

]y=1/2 dx
y=x/2

0
as above.

x x3 8 8

x2 x4 dx = 16 32

]1 =
0

1 , 32

Example 3.4.3 Let R be the region that lies under the graph of y = x2 for 0 x 1. Evaluate
R x dA

Example 3.4.4 Let G be the plane region in the rst quadrant bounded by y = x2 , y = 4 and the
y -axis.

Find

Gx

2 y dx dy

2 4 x2

Solution.

The region of integration is clearly that in Figure 3.6. Thus

x y dx dy =
G 2

x2 y dy dx 0 ) 2 [ 2 2 ]4 2( x y 1 6 256 2 = dx = 8x x dx = . 2 x2 2 21 0 0
4

Alternatively, we could have

x y dx dy =
G 2

=
0 0

x2 y dx dy
0 4[ 3 ] y x y

1 dy = 3
34

5/2

[ ] 1 2 7/2 4 256 dy = y = . 3 7 21 0

y 4

y=4

G y = x2 x 2

Figure 3.6:

Region of integration for Example 3.4.4

3.4.1 Geometrical interpretation of double integrals


If

f = f (x, y)

the equation

z = f (x, y)

represents a surface in the

xyz

space.

Then

Rf

dx dy

calculates the

volume contained between the surface z = f (x, y) and the region R in the xy-plane

(see Figure 3.7).

z = f(x,y)

R x

Figure 3.7:

Volume between surface z = f (x, y) and region R in the xy-plane.


f (x, y) = 1 so the 1 dA = 1 dx dy.
R
area integral becomes

Note the important special case where we set

R
This give the area of a region

R,

i.e.

Area of

R=
R

1 dx dy.

3.4.2 Change of Variables


With ordinary denite integrals, we are familar with changes of variable. Consider

I=
0
To evaluate this integral we let correspondingly. Thus the limit

(1 x2 )1/2 dx. dx = cos d


and we must also adjust the limits and the limit

x = sin x=1

so

corresponds to

= /2

x=0

corresponds to

35

= 0.

Thus

I=
0

/2

(1 sin2 )1/2 cos d =


0

/2

cos2 d =
0

/2

1 (1 + cos 2) d = . 2 4

Thus in general if

I=

b
a

f (x) dx and we wish to carry out a transformation of independent variable I=


x = x(),

we write:

f (x())

dx d, d

where

x() = a

and

x() = b.

(Compare with the example above).

For double integrals it is often convenient to change co-ordinate systems (i.e. transform variables). Suppose that we have the integral:

I=
R
and we wish to transform to new variables

f (x, y) dx dy, u
and

such that

x = x(u, v)

and

y = y(u, v),

then it

can be shown that (though we will not do so here)

f (x, y)dxdy =
R
where

f (x(u, v), y(u, v))|J(u, v)| du dv,


G
(3.12)

is the region in the

(u, v)

plane corresponding to

in the

xy -plane x

(just as we had to

change the limits in the denite integral above from being in terms of

to being in terms of

and

is the

Jacobian determinant dened as


J(u, v) = (x, y) = (u, v)
x u y u x v y v

x y x y . u v v u

(3.13)

This is a generalisation (for the case of two independent variables) of the transformation of the denite integral.

dx d which arises during the

To summarise, if we wish to transform a double integral with independent variables independent variables

(x, y)

to new

(u, v)

where

x = x(u, v)

and

y = y(u, v),

i.e.

if we wish to transform

R f (x, y) dx dy then we must:

(i) Change the limits of the integral correspondingly;

(ii) Write each of

and

in

f (x, y)

explicitly as a function of

(u, v);

(iii) Transform

dx dy =

(x,y) (u,v)

du dv .

(Note that a rough mnemonic for carrying out this last cancels out the

step is to "imagine" that the

(u, v)

du dv

in a similar way to the fact that

dx =

dx d

d).

We also note that the Jacobian can be used to get the dierential element of area in any co-ordinate system, i.e.

dA = dx dy =

(x, y) du dv. (u, v)

36

The most common transformation in 2D is from cartesian

(x, y)

co-ordinates to plane polars

(r, )

(which is typically useful if the 2D areas which we are dealing with are circular or partly circular). We set

x = r cos ,
and so the Jacobian in (3.13) becomes

y = r sin ,

J=

x r y r

x y

cos r sin sin r cos

= r cos2 + r sin2 = r.

Then from (3.12) we have

f (x, y) dA =
R

f (r cos , r sin )r dr d.
G
(3.14)

Example 3.4.5 Evaluate


Solution.

I =

Ry

2 dx dy

by transforming to polar co-ordinates where R is the

quarter circle 0 y (1 x2 )1/2 , 0 x 1.


It is useful to get an idea of what the region of integration looks like in both systems,

i.e. in terms of

(x, y)

and

(r, ).

Recall that plane polar co-ordinates are dened as

x = r cos ,

y = r sin .
domains:

As we are dealing with a quarter circle in the rst quadrant we have the following

y (0, 1) (0, /2)

(1, 0)
Figure 3.8:

(1, 0)

Conversion from rectangular to polar co-ordinates.

Recall that we need to:

(i) Find new limits for

(r, ); (r, )
in the expression

(ii) Write

and

in terms of

f (x, y) = y 2

(iii) Transform

dx dy =

(x,y) (r,)

dr d. J
for plane polar co-ordinates using (3.13) with and

We rst derive an explicit expression for

u = r,

v=

and recalling that

x = r cos , y = r sin

J = r.

Considering

in the

(x, y)

quadrant

37

(see Figure 3.8) we nd by inspection that it will be covered in the

(r, )

space if

0r1

and

0 /2.

Thus using (3.14)

I=
R

y 2 dx dy = = =
0 0 0

/2 1

r2 sin2 |J| dr d
0 /2 1

r3 sin2 dr d
0 /2

1 1 sin2 d = 4 2

/2

(1 cos 2) d =

. 16

Note that in transforming to polar co-ordinates, the limits of the integration were simpler than in the original case with cartesians (essentially because polar co-ordinates are better suited for circular shaped domains).

Example 3.4.6 Find the area of a quarter circle of radius a using polar co-ordinates. Exercise:
Perform the integration directly (using

and

as independent variables).

3.5 Triple and volume integrals


We can dene triple and volume integrals analogously to double integrals. dened in some Suppose

f (x, y, z)

is

volume of space V .

Then we break

up into small parallelepipeds, each of volume

V ,

and we form the sum:

Jn =
Then as

n k=1

f (xk , yk , zk )Vk .

we dene

lim

n k=1

f (xk , yk , zk )Vk =
V

f dV =
V
Like area integrals, volume integrals are easy Also, the notation

f (x, y, z) dx dy dz,

to be the volume integral of

f (x, y, z) over the region.

because the dierential element of volume used instead of

dV = dx dy dz .

f dV

is often

f dV .

3.5.1 Geometric interpretation


By analogy with double integrals, "plane" described by However, setting

f dx dy dz

is the "volume" of the 4D object above the 3D

(i.e. one higher dimension than that shown in Figure 3.7). gives an integral

f (x, y, z) 1

1 dV

which equals the volume of the region then the total

V.

If a liquid occupies the volume

with density

= (x, y, z)

mass in V

is

mass

=
V

dV =
V

(x, y, z) dx dy dz.

38

If the density

is the same at every point in the body, i.e.

constant, this integral reduces to

the familiar result:

mass

=
V

dx dy dz = V

mass

= density volume.

3.5.2 Evaluation of Triple Integrals


This is usually done by evaluation of

repeated integrals.

In this instance we need to generalise

for the case of double integrals. We now have to deal with three integrals so we have an inner, a middle and an outer integration. The innermost limits may be functions of two variables (the outer two variables), the middle limits may be functions of a single variable (the remaining outer variable) and the outermost limits will be constants, e.g. a typical triple integral looks like:

z=f

y=d(z) x=b(y,z)

f (x, y, z) dx dy dz.
z=e y=c(z) x=a(y,z)

Example 3.5.1 Evaluate


|y| b, |z| c

V (y

+ z 2 ) dV

if V is the three dimensional volume dened by |x| a,

where a, b, c are known constants.

3.5.3 Changes of variables in triple integrals


Analogous to the 2D situation, if we are evaluating the volume integral to transform from independent variables

f (x, y, z) dV

and we wish and

(x, y, z)

to

(u, v, w)

with

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

z = z(u, v, w),

then

f (x, y, z) dx dy dz =
V
where

f (u, v, w) |J| du dv dw

is the Jacobian determinant dened by

J=

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

x u y u z u

x v y v z v

x w y w z w

and

is the region in the

(u, v, w)

space corresponding to

in the

xyz -space.

Again we transform:

(i) Limits of integration;

(ii) Each

(x, y, z)

in

f (x, y, z)

is written in terms of

(u, v, w)

(giving essentially a new function

g(u, v, w));
(iii) The dierential volume element

dV = dx dy dz = |J| du dv dw.

We now give some very useful co-ordinate transformations in 3D.

39

Cylindrical co-ordinates
To transform from cartesian co-ordinates

(x, y, z)

to cylindrical co-ordinates

(r, , z)

we set

x = r cos ,
as shown in Figure 3.9(a). Then

y = r sin ,

z = z,

(3.15)

(x, y, z) J= = (r, , z)

x r y r z r

x y z

x z y z z z

cos r sin 0 = sin 0 r cos 0 0 1 = r(cos2 + sin2 ) = r.

So, in cylindrical polar co-ordinates we have

dV = r dr d dz.

z (r, , z) P(r, , )

z y r x (a) Cylindrical
Figure 3.9:

y x (b) Spherical

(a) Cylindrical co-ordinates, (b) Spherical co-ordinates.

Spherical co-ordinates
Let

have rectangular cartesian co-ordinates

(x, y, z),

let

denote the distance from the origin to

the point

P,

let

be the angle between

OP

and the positive

z -axis

(and so

0 )

and

be see

the angle between the Figure 3.9(b). [

xz -plane

and the plane containing

and the

z -axis

(and so

0 2 ),

Note:

is dened dierently here to the

in cylindrical co-ordinates].

To transform from cartesian co-ordinates

(x, y, z)

to spherical co-ordinates

(r, , )

we therefore set

x = r sin cos ,

y = r sin sin ,

z = r cos .

(3.16)

Exercise:

Show that for a transformation from cartesian to spherical coordinates

J = r2 sin .

(3.17)

40

Example 3.5.2 Calculate the volume of a sphere using spherical coordinates. Example 3.5.3 Evaluate

16z dV

where V is the upper half of the sphere x2 + y2 + z 2 = 1.

3.6 Surfaces
Volume and area integrals were "easy" in the sense that the dierential elements of area and volume were

dA = dx dy

and

dV = dx dy dz

respectively and we could easily reduce these to a repeated

integral. Consider an integral dened on the surface of a sphere, where

f (x, y, z)

is dened at every

point in space and in particular on the sphere. In the usual way we can dene an integral in terms of a limiting summation:

n
where we break the surface each element.

lim S

n k=1

f (xk , yk , zk )Sk =
S

f (x, y, z)dS,
and

into little elements

Sk

(xk , yk , zk )

is located in the middle of

The general surface integral is of the form

f dS

where

dS

corresponds to a dierential element

of surface on the sphere, but how do we integrate this? In fact, surface integrals are analogous to line integrals, and the strategy then was to get a that to simplify the expression. Let a variable point

parametric description of the curve, and use


where

have a position vector

r(u, v) = (x(u, v), y(u, v), z(u, v))


and

(u, v)

are

parameters in some continuous region of the

uv -plane

(x, y, z)

are single valued functions of

u, v .

If

is held constant and

is allowed to vary we have essentially one parameter and we get

a family of

curves called the v


v

co-ordinate curves. Similarly we have the family of

co-ordinate

curves by holding

constant and varying

u.

The network of all such curves describes the surface

S.

Example 3.6.1 The position vector


r = r(, z) = (cos , sin , z),

with 0 2, 0 z 1 denes the surface of the cylinder in (x, y, z) space. If we hold z constant then x2 + y2 = cos2 + sin2 = 1 describes a circle in the plane z = const. Now letting
z

vary from 0 to 1 picks out all the circles between z = 0 and z = 1, i.e. in totality we pick out a

cylindrical surface in space (see Figure 3.10). In this example u = and v = z and so and z are the parameters in the parametric description of the surface. Note that parametric denitions of cylinders and spheres can be obtained from the denitions of these co-ordinate systems. For example, in cylindricals we have x = r cos , y = r sin ,
41

z 1 P

Figure 3.10:

Surface of a cylinder.

z = z.

To obtain the equation of a surface we require only two parameters running independently.

In the example above r does not run freely but is xed at the value r = 1 (a known constant) and , z are the parameters with restrictions on their values. Hence we obtain the parametric representation
x = cos , y = sin , z = z .

3.6.1 Open and Closed Surfaces


A surface not cross

S S.

is

open if every points not lying on S can be joined by a continuous curve which does
S
is closed if it divides a space into two regions,

A surface

S1

and

S2

say, such that

every continuous curve joining a point in

S1

to a point in

S2

crosses

at least once. For example,

the cap of a sphere is open but a complete spherical shell is closed. The cap of a sphere can be closed o with a circular plane (see Figure 3.11).

S2

S1 S = S1 + S 2
Figure 3.11:

An open surface (spherical cap); the same cap closed o.

3.6.2 Unit Normal Vector


Consider a surface

dened parametrically by

r = r(u, v).

At any point on

S,

the vectors

r u and
This

r v (denoted for convenience by


is because, for example, the

ru

and

rv )

are

tangential to the u and v co-ordinate curves.


v

co-ordinate curves are dened by keeping

constant and allowing

42

to vary. So 1,

r = r(u)

which has just one parameter so it describes a curve in space. From Chapter

r u describes the tangent to the curve at any point, see Figure 3.12.

ru
P

n rv

Figure 3.12:

The unit normal to a surface S .

The

unit normal vector to the surface S is therefore given by


n= ru rv , |ru rv |
(3.18)

since from the denition of the vector (or cross) product this is a vector which is perpendicular to both

ru

and

rv .

Recall that

ru rv = rv ru

and so interchanging

ru

and

rv

gives a unit vector

but in the opposite direction. It is usual to label one side of a surface as "outer" and to have the normal vector pointing in this direction, and to refer to it as the outward normal. For a closed

surface (e.g. a spherical shell) the outer direction is that pointing "outwards" (i.e. from the interior to the exterior).

Example 3.6.2 Consider the cylindrical surface given parametrically by


and nd the unit normal at any point to the surface.

r(, z) = (cos , sin , z)

3.6.3 Surface area


Let and

P0 (u, v) be a point on the surface S described by r = r(u, v). P3 (u, v + dv)


be neighbouring points on either the

Let

P1 (u+du, v), P2 (u+du, v+dv),

or

co-ordinate curves, as in Figure 3.13.

P0 P1 P2 P3

is approximately a parallelogram so the area of the surface element is approximately

dS P0 P1 P0 P3 .
Now, since

ru

and

rv

lie parallel to

P0 P1

and

P0 P3

respectively (see Figure (3.12)) we can say

r du, P0 P1 u
Thus in the limit as

r P0 P3 dv. v

du, dv 0

the above approximations become exact and we are dealing with a

dierential element of surface. Thus

dS =

r r r r du dv = ru rv du dv. du dv = u v u v
43

(3.19)

(u+du,v+dv) P2 dS P1 (u+du,v) P0 (u,v) P3 (u,v+dv) u curve


Figure 3.13:

v curve

A surface element dS .

With the above derivation as motivation we dene surface area as follows:

Denition 3.6.1 Given a surface S dened parametrically by r = r(u, v) the surface area of S is
dS =
S S

ru rv du dv,

(3.20)

where the ranges of u and v are such that the whole of S is covered.

Example 3.6.3 Calculate the surface area of the cylindrical surface dened by r(, z) = (a cos , a sin , z),
if 0 2, 0 z b, where a and b are known constants.

3.7 Surface Integrals


Let

be a surface with

r = r(u, v).

Let

denote the region in the

(u, v)

space corresponding to

points on then

S.

If a scalar eld

(x, y, z)

and a vector eld and so on

f (z, y, z)

are dened at all points on and

S,

r(x, y, z) = (x(u, v), y(u, v), z(u, v))

we have

= (u, v)

f = f (u, v).

We dene the surface integrals of

and f over S as follows dS = (u, v) |ru rv | du dv S R f dS = f n dS = f (u, v) (ru rv ) du dv.


S S R

(3.21)

(3.22)

Remarks:

By writing

(u, v)

and

f (u, v)

we really mean

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

and

f (x(u, v), y(u, v), z(u, v)). dS


is interpreted as an element of surface area, and the vector

dS

is dened to be

n dS

where

dS

is the (scalar) element of surface area. Thus (3.22) can be derived from (3.21) from

substituting

n = (ru rv )/|ru rv |

from equation (3.18).

44

(3.21) is the surface integral of a

scalar eld and (3.22) is the surface integral of a vector eld.

Both (3.21) and (3.22) result in

scalar functions. ux of f .


If

f dS

is sometimes called the

We dene

three other possible surface integrals.


S S

f = f1 i + f2 j + f3 k then ( ) ( ) ( ) f dS = f1 dS i + f2 dS j + f3 dS k.
S S

(3.23)

Also

dS =
S

n dS,
S

f dS =
S

f n dS.
S
(3.24)

All three of these integrals result in

vector functions.
if

Example 3.7.1 Evaluate

dS

(i) = x2 + y2 and S is the surface x2 + y2 + z 2 = a2 , (ii) = x2 + y2 and S is the surface of the cube |x| a, |y| a, |z| a, where a is a known constant. Solution (i).
The parametric equations for the sphere are

r = r(u, v),
where

x = a sin u cos v, (u, v)


are parameters:

y = a sin u sin v, 0 u , 0 v 2 .

z = a cos u,
Of course

is constant and

(u, v)

are just

(, )

of the spherical co-ordinate system

(r, , )

which is ideal for mapping out the surface of a

sphere. In sphericals the surface of a sphere of radius

is given by simply xing

r = a,

the radius

of the sphere and using transformation equations from Chapter 2 to write two remaining parameters

(x, y, z)

in terms of the

(, )

(as

is constant it does not act as a parameter). This is similar to

parameterising the surface of a cylinder (discussed at the beginning of Section 3.6): there we used cylindrical co-ordinates but kept Note that we are

xed to obtain only two independent parameters,

, z .

not

changing co-ordinate system, i.e.

we are still using cartesian co-ordinates

(x, y, z) but we are using our experience with spherical co-ordinates to obtain a parametric equation
for the sphere in terms of cartesian co-ordinates. On

S , = x2 + y 2 = a2 sin2 u,

while the partial derivatives of

w.r.t.

u, v

are

ru = (a cos u cos v, a cos u sin v, a sin u),


Thus (check)

rv = (a sin u sin v, a sin u cos v, 0).

ru rv = (a2 sin2 u cos v, a2 sin2 u sin v, a2 cos u sin u),


45

and so

|ru rv | = a2 sin u.
Hence using (3.21) we have

dS =
S

(u, v)|ru rv | du dv =
0

a4 sin3 u du dv
0 0 2 [ 4

=a

1 cos u + cos3 u 3

]2
0

8 dv = a4 . 2

Note: in evaluating the above integral we used the fact that

sin3 u du = cos u +

1 cos3 u. 3

Solution (ii).

To evaluate the second integral we do so by considering the six faces of the cube (i.e.

x = a, y = a, z = a).
On the two faces of surface

z = a

we know that each face is parallel to the

xy -plane

and hence the element

dS = dx dy .

Dene:

C1 = integral
On the two faces of surface over face

z = a = 2

(x2 + y 2 ) dx dy =
a a

16a4 . 3

x = a

we know that each face is parallel to the

yz -plane

and hence the element

dS = dy dz .

Dene:

C2 = integral
On the two faces of surface over face

x = a = 2

(a2 + y 2 ) dy dz =
a a

32a4 . 3

y = a

we know that each face is parallel to the

xz -plane

and hence the element

dS = dx dz .

Dene:

C3 = integral
Hence over face

y = a = 2

(x2 + a2 ) dx dz =
a a

32a4 . 3

dS = C1 + C2 + C3 =
S

80a4 . 3

Example 3.7.2 Let r be the position vector of a point P . Evaluate S r dS where S is the surface of the paraboloid z = 2 x2 y2 above the xy plane (i.e. z = 0), see Figure 3.14.
Solution. S
is given parametrically by

r(u, v) = (x(u, v), y(u, v), z(u, v)) = (u, v, 2 u2 v 2 ) v


so that

by

inspection. We also need to restrict

and

z = 0.

Now

ru = (1, 0, 2u),
and so

rv = (0, 1, 2v),

ru rv = (2u, 2v, 1).


46

z 2 S z=2-u
2

- v2

u (= x)

v (= y) Area in uv plane corresponding to S

Figure 3.14:

Paraboloid z = 2 x2 y2 above the xy plane.

On

S , r = (u, v, 2 u2 v 2 )

and so

r (ru rv ) = (u, v, 2 u2 v 2 ) (2u, 2v, 1) = 2 + u2 + v 2 .


Thus

r dS =
S

r (ru rv ) du dv =
R

(2 + u2 + v 2 ) du dv.
R
in (3.25)

We need to nd limits for the region

(u, v) which correspond to picking out the surface S

(x, y, z) space (i.e.


and we know that

R).

The surface is dened parametrically by:

r = (u, v, 2 u2 v 2 )

z 0,
In the

i.e.

2 u2 v 2 0.
plane (which is the same as the

(u, v)

(x, y)

plane), the intersection of the surface

S S

with with

this plane is given by the

2 u2 v 2 = 0

which implies

(u, v)

plane is a circle with radius

u2 + v 2 = 2,

i.e. the intersection of

and this is the area over which we wish to carry out

the integration. Now choosing restricted:

2 u 2.

to be the

outer variable during the integration means u must be


Thus the integral reduces to

The inner variable is more dicult as it is a function of the outer

variable and clearly we require

2 u2 v 2 u2 .
2

2u2

(2 2u2

+ u2 + v 2 ) du dv = 6.

Alternatively, we could use the fact that

R is the circle u2 +v 2 = 2 and convert to polar co-ordinates: v = r sin ,

u = r cos ,
where

0r

2, 0 2 . r dS =
2

Then (3.25) becomes (using the transformation in (3.12))

(2 + r )r dr d =
2 0

r4 r2 + 4

] 2 d =
0

3 d = 6.

47

3.7.1 Special case for surface integrals of scalar elds


Suppose the surface

is given by

z = g(x, y).

Then

u=x

and

v=y

and so we can write

r(u, v) = r(x, y) = (x, y, g(x, y)),


and (3.21) becomes

dS =
S

(x, y, g(x, y)) |rx ry | dx dy.


R
(3.26)

Now

rx = (1, 0, gx ),
[where

ry = (0, 1, gy ),

gx

g x etc.] and so

i rx ry =

k = gx i gy j + k.

1 0 gx 0 1 gy

Hence (3.26) reduces to

dS =
S

(x, y, g(x, y))


R

1 + (gx )2 + (gy )2 dx dy.


or (3.27)

Note that we can derive similar formulas if

x = g(y, z)

y = g(x, z).

Example 3.7.3 Evaluate

S (xy + z) dS

where S is part of the plane x + y + z = 2 that lies in the

rst octant. (see Figure 3.15).


z 2 z=2-x-y S R 2 2 x R y 2 x y 2 y=2-x

Figure 3.15:

Plane x + y + z = 2 lying in the rst octant.

3.8 Integral Theorems


3.8.1 Introduction
The theorems in this section relate certain line integrals to double integrals, certain surface integrals to volume integrals, and certain line integrals to volume integrals. (see Figure 3.16).

48

Definite Integral

Line Integral

Greens Thm
(in plane, 2D) Double Integral

Stokes Thm
Surface Integral

Divergence Thm
Volume Integral
Figure 3.16:

Summary of the relationship between Integral Theorems.

We will look at three theorems, the Divergence Theorem (Guass' Theorem), Green's Theorem in two dimensions and Stokes' Theorem.

3.8.2 The Divergence Theorem (Gauss' Theorem)


Theorem 3.8.1 Consider a closed region
f dS =
S V

bounded by a piecewise smooth closed surface S . If


f dV.
(3.28)

the vector f is dened and continuously dierentiable throughout V then

"The ux of a vector equals the volume of it's divergence".


We say that Flux

=
S

f dS, S ".

which can be thought of as the rate of "ow through

Intuitive justication of Gauss's Theorem


Consider the case of a compressible liquid, as discussed in 2.7, where

is the velocity vector and

is the density. If we replace

with

(also a vector, and it denotes the mass of uid) then (3.28)

becomes

(u) dS =
S

(u) dV.
V

Now the LHS is the mass ux of liquid across the surface the surface

S,

i.e. the mass of liquid passing through represents

in unit time. Recall (in 2.7) that we showed

(u) dx dy dz = (u) dV

the net outow of liquid for any volume element the total outow of liquid out of the volume

dx dy dz .

Thus the integral on the RHS represents

V.

49

Hence the divergence theorem can be said to be a statement of conservation of mass (in this instance but it could be any conserved quantity in a particular physical application).

Note:

For an incompressible uid

constant and

u = 0.

Therefore

(u) dV = 0
(If the volume is

and so the ux of liquid across

any closed surface in the liquid must also be zero.

already full of liquid, you cannot add any more as it is incompressible so whatever ows in one side must simultaneously be owing out the other side).

Uses of the divergence theorem


The divergence theorem equates a particular volume integral to a particular surface integral. We recall that volume integrals are usually easier to evaluate than surface integrals so if we wish to evaluate a surface integral of the type on the LHS of the divergence theorem statement (3.28), we can avoid doing so and instead evaluate an (equivalent) volume integral. Apart from this the divergence theorem (and all the integral theorems) are very useful for deriving theoretical results.

Example 3.8.1 Use the divergence theorem to evaluate


the spherical surface x2 + y2 + z 2 = a2 . Solution.
We wish to evaluate

f dS

where f = (x3 , y 3 , z 3 ) and S is

to the volume integral the surface integral.

I = S f dS. I = V f dV so

According to the divergence theorem this is equivalent we evaluate the volume integral instead of evaluating

f = (x3 , y 3 , z 3 )
and so

f = 3x2 + 3y 2 + 3z 2 ,

I=3
V

(x2 + y 2 + z 2 ) dx dy dz.

As we are dealing with the volume inside a spherical surface it is simplest to change to spherical coordinates at this point and use the change of co-ordinate rule (and Jacobian, as in (3.17)) to evaluate this integral. dened by So we transform from

(x, y, z)

to

(r, , )

and note that the sphere in sphericals is

0 r a, 0 , 0 2 .

Recall also the relationship between cartesians and

sphericals (i.e. (3.16) which we repeat here for convenience)

x = r sin cos ,
Thus the integrand

y = r sin sin ,

z = r cos .

x2 + y 2 + z 2 = r2 sin2 cos2 + r2 sin2 sin2 + r2 cos2 = r2 ,


and so

I=3
V
50

(x2 + y 2 + z 2 ) dx dy dz = 3
V

r2 |J| dr d d.

Now

J = r2 sin 2 I=3
0 0

and so we have

a 2 2

r (r sin ) dr d d = 3
0

a5 sin d d 0 0 5 ]= 6a5 2 3a5 2 [ 12a5 = cos =0 d = d = . 5 0 5 0 5

Exercise: Verify the divergence theorem when f = r = (x, y, z) and S is the sphere x2 +y2 +z 2 = a2 .

3.8.3 Green's Theorem in the Plane


This relates a double integral over a plane region to a line integral over the boundary.

Theorem 3.8.2 Let

be a closed bounded region in the xy-plane whose boundary C consists of

nitely many smooth curves. Let f1 (x, y) and f2 (x, y) be functions which are continuous and have continuous partial derivatives f1 /y and f2 /x everywhere in R. Then:
(
R

f2 f1 x y

dx dy =
C

(f1 dx + f2 dy).

(3.29)

C R R

C1

C2

(a)
Figure 3.17:

(b)

Types of regions to which Green's theorem in the plane can be applied. The region in

(b) has a "hole".

Remarks:
1. The integral is taken along the

entire

boundary

or

such that

is on the left as one

advances in the direction of integration (see Figure 3.17(a)).

Note that the theorem also

applies to more complicated regions like that shown in Figure 3.17(b). This is a region with a hole and it is necessary to bear in mind that the boundary of this region consists of curves along which the line integral must be evaluated.

two

2. The above formula can be written in vector notation as:

(curl f ) k dx dy =
R
where

f dr
C

f = (f1 , f2 , 0) = f1 i + f2 j.
51

Example 3.8.2 This is a well known example using Green's theorem in the plane to write the area
of a plane region as a line integral over the boundary. Solution.
We know that the area of the plane region

is given by

R 1 dx dy . Thus using Green's

Theorem (3.29) we want to choose

f1

and

f2

such that

f2 f1 = 1. x y
(i) Let

f1 (x, y) = 0

and

f2 (x, y) = x.

Then (3.29) says that

dx dy =
R
Note that the RHS can be written as

x dy.
C

(3.30)

f dr

where

f = (0, x).
says that

(ii) Alternatively, let

f1 (x, y) = y

and

f2 (x, y) = 0. Then (3.29) dx dy = y dx.


R C C

(3.31)

Note that the RHS can be written as

f dr

where

f = (y, 0).

(ii) Finally, we can add (3.30) and (3.31) and divide by two to give

dx dy =
R
Note that the RHS can be written as

1 2

(x dy y dx).
C
where

(3.32)

1 2

f dr

f = (y, x).

Example 3.8.3 Use Green's theorem in the plane to nd the area of the circle x2 + y2 = a2 where
a

is a known constant. where C is the triangle with vertices

Example 3.8.4 Use Green's theorem to nd


(0, 0), (1, 0), (1, 2).

xy dx+x2 y 3 dy

Solution.

We use (3.29). Let

f1 = xy and f2 = x2 y 3 . Then f1 = x and f2 = 2xy 3 and y x ) ( ( ) f2 f1 xy dx + x2 y 3 dy = dx dy = 2xy 3 x dx dy. x y C R R

so

(3.33)

The region

is given in Figure 3.18 and so, as discussed in 3.4, if we integrate rst w.r.t.

and

second w.r.t.

0 y 2x, 0 x 1. Thus (3.33) becomes ]y=2x 1 1 2x 1[ 2 1 4 2 3 3 xy xy dx = (8x5 2x2 ) dx = . xy dx + x y dy = (2xy x) dy dx = 4 3 0 C 0 0 0 y=0 x


then the region

is described by

Note that it was much easier to evaluate the double integral than to integrate the line integral

xy dx + x2 y 3 dy

(which would have involved splitting

into three separate line segments).

52

y 2 y=2x R 1
Figure 3.18:

Triangle with vertices (0, 0), (1, 0), (1, 2).

3.8.4 Stokes' Theorem


This theorem provides a transformation between surface integrals and line integrals.

Theorem 3.8.3 Let

be a piecewise smooth oriented surface in space bounded by a piecewise

smooth curve C . Let f (x, y, z) have continuous partial derivatives everywhere. Then
f dr =
C S

( f ) dS,

(3.34)

with dS = n dS and n being the unit normal to the surface oriented using the right rule (i.e. with

the ngers along the curve and the thumb giving the positive direction of the normal, see Figure 3.19).

Figure 3.19:

Surface (open, i.e. not including the shaded region) and bounding curve for Stokes'

theorem.
Note that the theorem says: "the circulation of a vector (i.e. the line integral) equals the ux of its curl".

Example 3.8.5 Verify Stokes' theorem for the vector eld f = (x2 y, z, 0) and the hemisphere x2 +
y 2 + z 2 = a2 , z 0

(see Figure 3.20).


53

z S

x C
Figure 3.20:

Hemisphere x2 + y2 + z 2 = a2 , z 0.

Solution.
(i)

We obviously need to evaluate both sides of (3.34) and show they are equal.

Evaluate the line integral: C

is the curve

x 2 + y 2 = a2

and is given parametrically by

r(t) = (a cos t, a sin t, 0),


Thus

0 t 2.

r (t) = (a sin t, a cos t, 0),


while along

C , f = (x2 y, z, 0) = (a3 cos2 t sin t, 0, 0) and the line integral is therefore 2 f dr = f r (t)dt = (a3 cos2 t sin t, 0, 0) (a sin t, a cos t, 0) dt C C 0 [ ] 2 sin 4t 2 a4 4 2 2 4 t = a cos t sin t dt = a = . 8 32 0 4 0
The hemispherical surface in Figure 3.20 is given parametrically

(ii)

Evaluate the surface integral:


by

r(, ) = a(sin cos , sin sin , cos ),

0 /2,

0 2.

(Recall that this can be obtained from the denition of spherical co-ordinates bearing in mind that a spherical surface is dened by

r = a).

Thus

r = a(cos cos , cos sin , sin ),


and so

r = a( sin sin , sin sin , 0),

r r = a2 (sin2 cos , sin2 sin , cos sin ).


To evaluate the surface integral we use (3.22). Now

i f =
x

j
y

k
z

= (1, 0, x2 ) = (1, 0, a2 sin2 cos2 ).

x2 y

0
54

Hence (3.22) becomes

( f ) dS =
S

( f )(, ) (r r ) d d
R

= a

2 2

/2 [

] sin2 cos + a2 sin3 cos cos2 d d

]/2 [ ]/2 2 1 1 2 4 4 = a cos sin 2 d a cos sin d 2 4 4 0 0 0 0 a2 2 a4 2 = cos d cos2 d 4 0 4 0 [ ]2 a4 a4 1 sin 2 = . =0 4 2 4 4 0


2

Note:
1. In the above example we used the following indenite integrals:

t 1 cos t sin t dt = sin 4t, 8 32 1 cos t sin3 t dt = sin4 t, 4


2 2

t 1 sin 2t 2 4 t 1 cos2 t dt = + sin 2t. 2 4 sin2 t dt =

2. It is possible to take a shortcut in carrying out part (ii). On referring to Figure 3.20, note that the theorem could also be applied to the surface in the disc

xy -plane

consisting of the solid

x2 + y 2 a2 .

In Stokes' theorem, it does not matter which open surface we use as long

as it is open and bounded by the curve

C.

Thus if we use the disc in the

xy -plane

(label it

D)

then for this disc

dS = k dx dy

as it is a planar area and the

outer normal is clearly in

the direction

(i.e. the positive

z -axis). Thus we obtain 2 ( f ) dS = (1, 0, x ) (0, 0, 1) dx dy = x2 dx dy.


D D
and is easily evaluated by transforming to polar

This is just an area integral in the co-ordinates (x

xy -plane

= r cos , y = r sin ). x dx dy =
2 2

Thus (recalling that

(x,y) (r,)

= r) cos2 d = a4 . 4

a4 r cos r dr d = 4
2 2

Example 3.8.6 Use Stokes' theorem to evaluate


Solution.

Fdr where F = (z 2 , y 2 , x) and C

is the triangle

with vertices (1, 0, 0), (0, 1, 0), (0, 0, 1), see Figure 3.21.
To evaluate the line integral we would have to split

into three line segments, as can be

seen from Figure 3.21. Using Stokes' Theorem (3.34) turns out to be much easier. Now

i F=
x

j
y

k
z

= (0, 2z 1, 0).

z2

y2

x
55

y 1 R

y=1-x

1 x 1 C

1 y

Figure 3.21:

Triangle with vertices (1, 0, 0), (0, 1, 0), (0, 0, 1).

The surface

is the plane

x+y+z = 1 and so z = g(x, y) = 1xy . f = F.


We can easily determine

Hence

r(x, y) = (x, y, 1xy)

and so we use (3.22) with

i rx ry =

k = (1, 1, 1),

1 0 1 0 1 1

and

f (r(x, y)) = ( F)(r(x, y)) = (0, 2(1 x y) 1, 0) = (0, 1 2x 2y, 0).


The region

is given in Figure 3.21 and so, as discussed in 3.4, if we integrate rst w.r.t.

and

second w.r.t.

then the region

is described by

0 y 1 x, 0 x 1.

Hence using (3.34)

(and (3.22)) we have

F dr =
C

1 1x 1 1x 0 1[ 1 0

(0, 1 2x 2y, 0) (1, 1, 1) dy dx (1 2x 2y) dy dx ]y=1x


y=0

y 2xy y 2

dx

1 (x2 x) dx = . 6

56

+D=FJAH "

Partial Dierential Equations


Partial dierential equations arise in connection with various physical and geometrical problems when the functions involved depend on two or more independent variables. These variables may be the time and one or more co-ordinates in space. We will consider some of the most important partial dierential equations occurring in engineering applications. Only the simplest physical systems can be modelled by

ordinary dierential equations,

whereas most problems in uid mechanics,

elasticity, heat transfer, chemical reactions, electromagnetic theory and other areas of study lead to

partial dierential equations.


We shall derive these equations from physical principles and consider methods for solving initial and boundary value problems, that is, methods for obtaining solutions of those equations corresponding to the physical situations.

4.1 Basic Concepts


An equation involving one or more partial derivatives of an (unknown) function of two or more independent variable is called a is called the

partial dierential equation.

The order of the highest derivative

order of the equation.

The unknown function is often termed the

dependent variable.
If each term

Just as in the case of an ordinary dierential equation, we say that a partial dierential equation is

linear if it is of the rst degree in the dependent variable and its partial derivatives.
said to be

of such an equation contains either the dependent variable or one of its derivatives, the equation is

homogeneous, otherwise it is said to be inhomogeneous.

Some Important linear partial dierential equations of the second order are:

1.

2u 2u = c2 2 2 t x u 2u = c2 2 t x

(one dimensional wave equation)

2.

(one dimensional heat equation)

57

3.

2u 2u + 2 =0 x2 y

(two dimensional Laplace equation)

4.

2u 2u + 2 = f (x, y) x2 y 2u 2u 2u + 2 + 2 =0 x2 y z

(two dimensional Poisson equation)

5.

(three dimensional Laplace equation)

6. Here (with

h2 2 + v(x) = ih 2m t
are known constants,

(Schrdinger equation)

c, h, m

is the time and

x, y, z

are Cartesian coordinates. Equation 4. In all these equations

f = 0) is nonhomogeneous, while the other equations are homogeneous. x, y, z, t


etc.

is the dependent variable while whereas in 3.

are the independent variables. For example in 1. and 2.

u = u(x, t),
A

u = u(x, y)

solution

to a partial dierential equation in some region

of the space of the independent

variables is a function of the independent variables which has all the partial derivatives appearing in the equation and satises the equation everywhere in

R.

Thus if the independent variables are

x, y, z, t

the solution would be of the form

u = u(x, y, z, t).

In general, the totality of solutions of a partial dierential equation is very large. For example, the functions

u = x2 y 2 ,

u = ex cos y,

u = ln(x2 + y 2 ),

are all solutions of the Laplace equation 3., even though they look entirely dierent. We shall see later that the unique solution of a partial dierential equation corresponding to a given physical problem will be obtained by the use of additional information arising from the physical situation. For example, in some cases the values of the required solution of the problem on the boundary of some domain will be given (

boundary conditions); in other cases when the time t is one of the variables, the values of the solution at t = 0 will be prescribed (initial conditions).
ordinary dierential equation
is linear and homogeneous, then from known For a homogeneous linear

We recall that if an

solutions further solutions can be obtained by superposition.

partial

dierential equation the situation is quite similar.

In fact, the following theorem holds:

Theorem 4.1.1 If u1 and u2 are any solutions of a linear homogeneous partial dierential equation
in some region, then u = c1 u1 + c2 u2 where c1 and c2 are any constants, is also a solution of that equation in that region.

Remark
L[u] = 0

In many situations we will be seeking to superpose an

innite
+
2u ). y 2

number of solutions.

Suppose that

u1 , u2 , u3 , ...

are all solutions of an equation

L[u] = 0 (L
2u x2

is an operator and so Then

is a PDE, for example in the Laplace equation,

L[u] =

n=1

an u n ,

58

is also a solution provided

L[u1 ] = 0, L[u2 ] = 0, L[u3 ] = 0,

etc.,

and
L.

The innite series is convergent and dierentiable term by term as many times as is needed in the denition of the linear operator

4.1.1 Inhomogeneous Problems


Many problems involve an inhomogeneous equation containing a term corresponding to applied "forces" or "sources". For example, if a force is inhomogeneous:

f (x, t)

is applied to a vibrating string, the equation

2u 2u 1 = c2 2 + f (x, t). 2 t x T
A problem may be inhomogeneous because of the boundary conditions as well as the equation itself. The criterion for a linear homogeneous boundary value problem is that if

is a solution

of the equation

and

its boundary conditions, then so is any multiple of

u.

An example of an is prescribed to

inhomogeneous boundary condition is a vibrating string for which the end move in a certain way,

x=0

u(0, t) = g(t) = 0.

The general solution of an inhomogeneous problem is

made up of any particular solution of the problem plus the general solution of the corresponding homogeneous problem, for which both the equation and boundary conditions are homogeneous. This composition of solution is very similar to the case of ordinary dierential equations. When

developing solution techniques for PDEs, we will mainly concentrate on homogeneous problems.

4.1.2 Pseudo or degenerate PDEs


It is important to appreciate that a PDE involving derivatives with respect to one variable only may be solved like an ordinary dierential equation treating the other independent variable as parameters. For example, if

u = u(x, y)
du dx

the equation

u x

=0 u

can be solved using ODE techniques. = constant but allow this "constant" where

Essentially consider the ODE to be a function of

=0

which has a solution

y. x.

Thus the solution of

u x

=0

is

u = a(y)

a(y)

is any function of

but

does not depend on

Checking back shows that

u = a(y)

does satisfy the equation

u x

= 0.

Example 4.1.1 Solve the following PDEs:


(i)
2u = 0, y 2

(ii)

u = x, x

(iii)

u + u = 0, x

(iv)

2u + u = 0, y 2

where u = u(x, y).

Note: A very common notation for partial derivatives is to use subscripts.

Thus

u x

ux ;

2u x2

uxx

etc. In fact ODEs can also be written in this way. The disadvantage of the subscript notation is

59

that it does not explicitly distinguish between partial and ordinary derivatives. If

u = u(x, y)

then

ux

u x but if

u = u(x)

then

ux

du dx .

4.2 Classication of second order linear PDEs


We consider the case of linear second order PDEs with two independent variables. This simplies matters and much of the reasoning can be generalised to equations with more independent variables. We consider a function

u(x, y)

to be evaluated in some region of the

xy -plane

(in which

u(x, y)

satises some PDE). The partial dierential equation will need to be supplemented by boundary conditions of some sort; we assume these involve values of

u and/or its derivatives on the curve which

encloses the region within which we are trying to solve the equation. There are three common types of boundary condition.

1.

Dirichlet conditions: u is specied at each point on the boundary. Neumann conditions:


n u,
where

2.

u n , the normal derivative, i.e. the directional derivative in the direction u n

of the normal to the bounding curve is given at every point on the boundary. (Recall

is the unit normal vector at each point on the boundary).

3.

Cauchy conditions: u and

u n are given at every point on the boundary.

Other possibilities include Robin conditions where a linear combination of

and

u n is given on the

boundary. Also possible is that one type of condition, e.g. Dirichlet, is given on one part of the boundary and a dierent type on the remainder. However, we restrict attention to the three basic types. By analogy with second order ODEs, we would expect that Cauchy conditions along a line would be the most natural.

4.2.1 Characteristics of PDEs


We now classify linear second order PDEs into three types:

Parabolic, Hyperbolic and Elliptic.

They lead to families of characteristic curves for each type which can help to solve the PDEs. We start by considering the dierential equation

2u 2u 2u A(x, y) 2 + 2B(x, y) + C(x, y) 2 = f x xy y


Let us suppose the boundary curve is given

( ) u u x, y, , . x y

(4.1)

parametrically by the equations

r(s) = (x(s), y(s)),

60

where

is arclength along the boundary. We shall suppose that we are given

u(x, y)

and

N (x, y) =

u n along the curve and we thus know both of these as functions of


is the arclength the components of the unit tangent vector components of the unit normal

s,

i.e.

to the curve are

dy ds , ds

t ) dx

to the curve (because

u(s) and N (s). As s ( dx dy ) are ds , ds and so the


= 0). Then

t n

u u dy u dx = N (s) = n u = + . n x ds y ds
We can also write

(4.2)

which can be solved with (4.2) (using

du u dx u dy = + , ds x ds y ds ( dx )2 ( dy )2 the fact that + ds = 1) ds

(4.3)

and this gives:

u dy du dx = N (s) + x ds ds ds u dx du dy = N (s) + . y ds ds ds
The trouble comes with second derivatives. There are

(4.4) (4.5)

three of these to be found


2u . y 2

2u , x2

2u , xy

We thus need three equations to determine these three unknown functions. Two equations are found by dierentiating the (now known) rst derivatives along the boundary using the chain rule

( ) d u = ds x ( ) d u = ds y

2 u dx 2 u dy + x2 ds xy ds 2 u dy 2 u dx + . y 2 ds xy ds

(4.6)

(4.7)

A third equation is provided by the original dierential equation (4.1). The three equations (4.1), (4.6) and (4.7) are written in matrix form in the following manner:

0 A

dx ds

dy ds dx ds

dy ds

uxx

2B

uxy C uyy Ax = b,

d ds (ux ) d ds (uy )

f (x, y, ux , uy ) A
and

[This is the familiar matrix equation Recall that

where

are known and we wish to nd

x.

Ax = b

has a unique solution if and only if

has an inverse, i.e. if and only if

A1

exists, i.e if and only if det A

= 0]. u

Thus these three inhomogeneous equations can be solved for the second partial derivatives of

unless the determinant of the coecients vanishes, i.e.


det 0 A
dx ds dy ds dx ds

unless

0
dy ds

= 0,

2B
61

or on expanding the determinant along the

bottom row
( dx ds dx dx )2 = 0, )2 = 0.
(4.9) Equation (4.8) (4.8)

( A(x, y)
or alternatively

dy ds dy dx

)2

dx dy 2B(x, y) + C(x, y) ds ds dx dy 2B(x, y) + C(x, y) dx dx

( A(x, y)

)2

Recall that the boundary curve was given parametrically by

r = r(s) = (x(s), y(s)).

(or 4.9) denes two directions at every point in space, namely the direction given by the vector

dx dy ds , ds

As (4.8) is quadratic, in general it contains two solutions for These are called the

dy dx ds and ds , i.e.

we can

associate two directions with every point in space. at each point. Curves in the

characteristic directions

xy -plane

whose tangents at each point lie along the characteristic

directions are called

characteristics of the PDE. To map out the characteristics for a particular


dy dx and then to solve the two resulting dierential equations

equation, it is simplest to solve (4.9) for to give

as a function of

x.
dy dx given by:

Returning to the equation (4.9) for the characteristics we see that this has solution for

dy B = dx
where

B 2 AC , A

(4.10)

A, B, C

can be functions of

and

y.

The classication is as follows:

If the characteristics are to be real curves, we clearly must have condition are called

B 2 > AC .

PDEs obeying this the wave equation

hyperbolic and have two sets of characteristics, e.g.

utt = c2 uxx .
If

B 2 AC = 0

the equation is said to be

parabolic and has one set of characteristic curves,

e.g. the heat equation

ut = c2 uxx .

If

B 2 AC < 0

the equation is

elliptic and has no (real) characteristics,

e.g. the Laplace

equation

uxx + uyy = 0.

Boundary Conditions
Let us discuss the choice of boundary conditions which is appropriate for each of the three types of equation, beginning with the hyperbolic equation. We have seen above that, generally speaking, Cauchy conditions along a curve which is not characteristic are sucient to specify the solution near that curve. A useful picture for visualising the role of the characteristics and boundary conditions is obtained by thinking of the characteristics as curves along which partial information about the solution propagates. The meaning of this statement and the way in which it works are most easily understood with the aid of an elementary example.

62

Example 4.2.1 Consider the simplest hyperbolic equation, having A = c2 , B = 0, C = 1, where


c

is a known constant. This is the one dimensional wave equation


utt = c2 uxx ,
(4.11)

for which the equation of the characteristics (4.8) (identify x with x and t with y) is
( c
2

dt ds

)2

dx ds

)2 = 0,

or

dx dt

)2 = c2 =

dx = c. dt

Thus the characteristics are obtained by integrating these last two equations yielding solutions
x ct =

(constant),

x + ct =

(constant),

(4.12)

where and are arbitrary constants. As these vary over a range of values, (4.12) maps out a family of characteristics in xt-space (which are straight lines in this instance), see Figure 4.1.
ct

xi = const eta = const

Figure 4.1:

Characteristics for the one-dimensional wave equation.

The characteristics form a "natural" set of coordinates for a hyperbolic equation. For example, if we transform (4.11) to the new coordinates and dened in (4.12) using the chain rule for partial dierentiation, we obtain the equation in so called normal or canonical form:
2u = 0.
(4.13)

This can be integrated directly yielding the solution


u = g() + h() = g(x ct) + h(x + ct),
(4.14)

where g and h are (suciently well behaved) functions.


63

Now, if we know u(x, 0) = a(x) and its normal derivative at t = 0: N (x) = k u = (0, 1)
( u , 1 u ) = x c t
1 u c t (x, 0)

= b(x),

where a(x) and b(x) are known functions, along the line segment AB

of Figure 4.1, we can nd the individual functions g() and h() as follows:
u(x, 0) = a(x) = g(x) + h(x)

and
1 u (x, 0) = b(x) = g (x) + h (x), c t

which on integrating w.r.t. x gives


b(x) dx = g(x) + h(x) + K,

where K is an arbitrary integration constant. We now have two equations for the two unknown functions g(x) and h(x) which we solve to nd
1 1 1 b(x) dx + K g(x) = a(x) 2 2 2 1 1 1 h(x) = a(x) + b(x) dx K. 2 2 2

These are then substituted back into (4.14). The arbitrary constant associated with the integral is of no importance since it cancels in this sum.
The results obtained for the simple case above hold generally for hyperbolic equations. We summarise in the table below the types of boundary conditions appropriate for dierent equations. This table is not exhaustive but gives a general idea of what type the boundary conditions look like for a particular problem. A very useful way of checking if a problem is well posed (i.e. that the boundary conditions are sucient to determine the solution) is to consider a physical process represented by the problem and intuitively decide whether the physical problem is well posed i.e. capable of solution.

Equation
Hyperbolic Elliptic Parabolic

Condition
Cauchy Dirichlet or Neumann Dirichlet or Neumann

Boundary
Open Closed Open

Recall that Cauchy conditions physically correspond to a given displacement and velocity at time

t = 0,
in the in the

i.e. specifying

and

u t . Dirichlet conditions correspond to a given displacement on a curve

(x, t) plane, i.e. (x, t)

specifying

u.

Neumann conditions correspond to stating a velocity on a curve

plane, i.e. specifying

u t .

64

4.2.2 Qualitative behaviour of elliptic, parabolic and hyperbolic equations


Elliptic equations (e.g.
have died away.

2 u = 0)

These are generally associated with equilibrium phenomena when transient (time dependent) eects Elliptic problems are thus not time dependent and are usually boundary value

problems. For these types of problems either Dirichlet, Neumann or mixed conditions on a closed boundary are necessary to get a well-posed problem. Elliptic problems sometimes result from the long time solution of parabolic problems. Consider

a thin rectangular plate with a given initial temperature distribution whose edges are each held at some particular temperature. If we wait "long enough", it is possible that the temperature in the plate will settle down to a time-independent (steady) value described by the Laplace equation with boundary conditions. Initially the problem would have been described by the heat equation

u t

= c2 2 u

but

if the problem has a steady state solution, then

and we reduce to Laplace's

equation, the initial condition having been forgotten. Resorting to intuitive physical arguments is a useful way of reasoning whether or not a problem has a steady state solution. To gain an intuitive understanding consider an elliptic equation in a nite rectangular region. Identify the elliptic equation as a steady state heat ow in a 2D rectangular plate where the temperature. We emphasize that a steady state must have been reached: upon where you look on the plate but each

u(x, y)

is

varies depending

u(x, y)

is constant in time. Boundary conditions in

must be translated into conditions in terms of the temperature at the edges. If

u=0

along some

edge, then this edge of the plate is imagined as having its temperature held at 0, e.g. by placing a strip of ice along it.

Parabolic equations (e.g.

u t

= c2 u ) x2
2

Parabolic equations describe evolution type processes i.e. processes which involve time. Typically a parabolic equation represents a diusive or "spreading out" phenomenon where, for example a concentrated patch of dye in water "smears out" until it is distributed evenly everywhere. Another typical example is heat ow in a rod where one point on the rod has a "hot-spot" initially but as the diusion process evolves, the hot spot smoothes out until nally the temperature is everywhere the same (if the boundary conditions will allow this). Parabolic problems are initial-boundary value problems in that they require both initial and boundary conditions. Generally speaking we require Dirichlet or Neumann conditions on an open boundary. To gain an intuitive understanding consider a parabolic equation in a one dimensional strip of nite length

l.

Identify this with time dependent heat ow in a thin (metal) rod of nite length. The

initial condition rod at time

u(x, 0) = f (x),

describes the temperature as a function of distance

(x)

along the

t = 0.

Boundary conditions describe the temperatures in the rod at the ends (which are

65

held xed in time). For example, if

u(0, t) = 0,

then one end of the rod can be thought of as being

emersed in iced water or ice (zero degrees). The mathematical problem requires a solution for all

u(x, t)

in

[0, l]

for all

t 0.

Physically this corresponds to nding the temperature at every point

(x)

in the rod for all times in the future

(t).
2

Hyperbolic equations (e.g.

2u t2

= c2 u ) x2

These again describe evolution type phenomenon and again both initial and boundary conditions are required in general. Hyperbolic equations usually represent wave-like phenomena whereby some initial condition or signal (or "wave") is seen to propagate through space either maintaining its original form or changing shape and/or velocity as it does so but remaining generally recognizable as the original signal or "wave". To gain an intuitive understanding consider a hyperbolic equation in a long strip of length l. Identify this with waves passing down a taut, thin, long string of length

l.

The initial conditions describe

an (initial) disturbance, e.g. plucking the string at some point. This "wave" will then pass along the string. What other conditions are necessary to ensure a complete description of the evolution of the disturbance of the string? Obviously if the ends of the string are xed then conditions like

u(0, t) = 0

and

u(l, t) = 0

are required. In addition to the already mentioned displacement, we also

require the initial velocity in the string. It is possible to have dierent situations with the same initial displacement but dierent initial velocity.

4.2.3 An overview of solution method for linear second order PDEs


1.

Separation of variables.

Usually require a constant coecient equation. The basic idea is

to use the homogeneous (zero) boundary conditions to nd the eigenfunctions. Then writing the solution as a linear combination of the eigenfunctions, use the inhomogeneous boundary (or initial) condition to solve for the superposition constants. If there is more than one

inhomogeneous condition, superposition of problems exploiting the linearity of the equation may be necessary.

2.

Integral transforms.

Again usually only applicable to constant coecient equations. The

basic philosophy is to transform "out" one independent variable reducing to a simpler problem (often an ODE). The particular transform used often depends on the boundary conditions and the ranges of the independent variables. For example, if time may be used.

[0, )

a Laplace transform

3.

Green's functions.

A very general method for solving PDEs (and ODEs) yielding solutions

in the form of an integral expression.

66

4.

Complex variable techniques.

Laplace's (and Poisson's) equations are fundamental to

many physical processes. For example

2 T = 0

describes the steady state heat distribution

in an object. In complex variable theory, a basic property of

any analytic function f (z) =


f (z)
satisfy Laplace's equation

u(x, y) + iv(x, y)
i.e.

is that both the real and imaginary parts of

2 u = 0

and

2 v = 0.

Because of this property it is possible to reduce many problems

involving Laplace's equation to exercised in complex variable theory.

5.

Numerical techniques

If all else fails, we can resort to numerical techniques, e.g.

nite

dierences, nite element method, nite volume method, boundary elements.

4.3 Solutions to some elementary linear ODEs


We take

y = y(x)

to be the dependent variable and

to be the independent variable.

4.3.1 First-order equation: variables separable


This has the basic form:

h(x)k(y)
where

dy = f (x)g(y), dx g(y), k(y)


are given functions of

(4.15)

f (x), h(x)

are given functions of

x,

and

y.

If the equation

has this form, the variables can be separated by dividing through by

h(x)g(y)

to obtain

k(y) dy f (x) = . g(y) dx h(x)


On multiplying across by

dx

we have separated the variables and the equation can be solved by

straightforward integration:

k(y) f (x) dy = dx g(y) h(x)

k(y) dy = g(y)

f (x) dx, h(x)

as in principle both of these integrations can be performed.

Example 4.3.1 Find the general solution of


dG = kG, dt
(4.16)

where k is a known constant.

4.3.2 First-order linear (in y) equation


This is more general than the last situation and has the form:

dy + P (x)y = Q(x), dx
67

(4.17)

where

P (x)

and

Q(x)

are known functions. This equation can be solved by multiplying both sides

by an integrating factor which is of the form the same form as (4.17), i.e. the coecient of obtain

exp( P (x)dx). = 1).

(The equation must be in

exactly

dy dx

On multiplying by the integrating factor we

[ ( )] ( ) d y exp P (x)dx = Q(x) exp P (x)dx , dx

(4.18)

which can be integrated directly.

Example 4.3.2 Find the general solution of


dy y + = 2x. dx x

4.3.3 Second order linear equations


The equation

d2 y = n2 y, dx2
where

(4.19)

is a given real constant, has general solution

y = A cos nx + B sin nx,


where

(4.20)

and

are arbitrary constants to be determined from the boundary conditions.

The equation

d2 y = n2 y, dx2
where

(4.21) or equivalently

is a given real constant, has general solution

y = A cosh nx + B sinh nx,

y = Cenx + Dnx ,
where

(4.22)

A, B, C, D

are arbitrary constants to be determined from the boundary conditions.

4.3.4 Basic Fourier theory


We summarise here the basic results of Fourier series theory.

Fourier series theorem


If

f (x)

and

df dx are piecewise continuous on the interval


so that it is periodic with period

l x l f

and

f (x)

is dened outside the

interval

[l, l]

2l,

then

has a Fourier series

) ( nx nx A0 + An cos + Bn sin , f (x) = 2 l l


n=1
with

(4.23)

1 An = l

nx f (x) cos dx, l l


68

1 Bn = l

f (x) sin
l

nx dx. l

(4.24)

Even and odd functions


If

f (x)

is an

even function, i.e.

f (x) = f (x)

and satises the conditions of the Fourier theorem

then it can be expressed as a Fourier

cosine series:
with

A0 nx f (x) = + An cos , 2 l
n=1
If

2 An = l

f (x) cos

nx dx. l

(4.25)

f (x)

is an

odd function, i.e.


n=1

f (x) = f (x)

and satises the conditions of the Fourier theorem

then it can be expressed as a Fourier

sine series:
with

f (x) =

Bn sin

nx , l

Bn =

2 l

f (x) sin

nx dx. l

(4.26)

Orthogonality of sine and cosine


Full range:
0 m = n l mx nx sin dx = sin l m = n = 0 l l l 0 m=n=0 0 m = n l nx mx cos cos dx = l m = n = 0 l l l 2l m = n = 0 l nx mx cos sin dx = 0 all m, n. l l l

Half range:
m = n mx nx l sin sin dx = m = n = 0 2 l l 0 0 m=n=0 0 m = n l mx nx l cos dx = cos m = n = 0 2 l l 0 2l m = n = 0.
l
In solving PDEs using separation of variables, we will often have cause to express a function dened on some range

f (x)

[0, l],

e.g. on a conducting bar of length

l,

in a Fourier series. As we are

only concerned with the behaviour of Typically we might dene

inside

[0, l]

we can dene it however we like outside

[0, l].

to be odd (or even) and periodic with period

2l

and then express it in

the form of a fourier half range sine (or cosine) series using the above results.

69

4.4 Vibrating String (1D Wave equation)


In this section we consider the transverse vibrations of an elastic string. We begin by deriving a PDE governing the vibrations and then show how solutions to some typical problems can be obtained.

4.4.1 Derivation of the PDE for the vibrating string


As a rst important partial dierential equation, let us derive the equation governing small transverse vibrations of an elastic string, which is stretched to length

and then xed at the end points.

Suppose that the string is distorted and then at a certain instant, say, allowed to vibrate. deection

t = 0,

it is released and

The problem is to determine the vibrations of the string, that is, to nd its

u(x, t)

at any point

and at time

t > 0,

see Figure 4.2.

u alpha P T1 Q

beta T2

x
Figure 4.2:

x+

Vibrating string (1D).

When deriving a dierential equation corresponding to a given physical problem, we usually have to make simplifying assumptions in order that the resulting equation does not become too complicated. In our present case we make the following assumptions:

1. The mass of the string per unit length is constant ("homogeneous string"). perfectly elastic and does not oer any resistance to bending.

The string is

2. The tension caused by stretching the string before xing it at the end points is so large that the action of the gravitational force on the string can be neglected.

3. The motion of the string is a small transverse vibration in the vertical plane, that is, each particle of the string moves strictly vertically, and the deection and the slope at any point of the string are small in absolute value. (

Note:

a lot of simplication in applied mathematics

is obtained by exploiting the smallness of some quantity).

70

These assumptions are such that we may expect that the solution

u(x, t) of the dierential equation

to be obtained will reasonably well describe small vibrations of the physical "nonidealised" string of small homogeneous mass under large tension. To obtain the dierential equation we consider the forces acting on a small portion of the string (Figure 4.2). Since the string does not oer resistance to bending, the tension is tangential to the curve of the string at each point. Let

T1

and

T2

be the tensions at the end points

and

of

that portion. Since there is no motion in the horizontal direction, the horizontal components of the tension must be constant. Using the notation shown in Figure 4.2, we thus obtain

T1 cos = T2 cos = T = constant.


In the vertical direction we have two forces, namely the vertical components of

(4.27)

T1 sin

and

T2 sin

T1

and

T2 :

here the minus sign appears because the component at

is directed downwards.

By Newton's second law the resultant of those two forces is equal to the mass times the acceleration

of the portion is the mass of

utt ,

evaluated at some point between

and

x + x:

here

the undeected string per unit length, and Hence

x is the length of the portion of the undeected string.

T2 sin T1 sin = x utt .


If this equation is divided by

and the expressions in (4.27) are substituted we nd

T2 sin T1 sin x utt = tan tan = . T2 cos T1 cos T


Now

(4.28)

tan

and

tan

are the slopes of the curve of the string at

and

x + x,

that is

tan =

u , x x

tan =

u x

,
x+x

where the subscripts here mean evaluated at the point in question. Here we have to write deduce that

partial derivatives because u


( 1 u x x u x x+x

depends also on

t.

Dividing (4.28) by

x,

we

) =
x

2u . T t2

If we let

approach zero, we obtain the linear homogeneous partial dierential equation

2u 2u = c2 2 , t2 x
where

or

utt = c2 uxx ,

c2 =

T . This is the so-called

one-dimensional wave equation, which governs our problem.


c2
for the physical constant

It is parabolic as we showed in 4.2. The notation to indicate that this constant is positive.

T has been chosen

71

4.4.2 Separation of Variables (for the vibrating string)


Formulation of the problem
We have seen that the vibrations of an elastic string are governed by the one-dimensional wave equation (hyperbolic)

utt = c2 uxx ,
where

(4.29)

u(x, t)
and

is the deection of the string. Consider the case where the string is xed at the ends so we have the two

x=0

x = l,

boundary conditions
u(l, t) = 0, for all t.
(4.30)

u(0, t) = 0,

The form of the motion of the string will depend on the initial deection (deection at on the initial velocity (velocity at velocity by

t = 0)

and

t = 0).

Denoting the initial deection by

f (x)

and the initial

g(x),

we thus obtain the two

initial conditions
u(x, 0) = f (x),
(4.31)

and

u = g(x) when t = 0. t
Our problem is now to nd the solution of (4.29) satisfying the conditions (4.30)-(4.32).

(4.32)

Solution of the formulated problem


We shall proceed step by step as follows:

First Step:

By applying the so-called

product method,

or

method of separating variables,

we shall

obtain two ordinary dierential equations.

Second Step: Third Step:


equation

We shall determine solutions of those equations that satisfy the boundary conditions. Those solutions will be composed so that the result will be a solution of the wave which also satises the given initial conditions.

utt = c2 uxx

First Step:
The product method yields solutions of the equation

utt = c2 uxx

of the form

u(x, t) = F (x)G(t),
which are a product of two functions, each depending only on one of the variables dierentiating this equation we obtain
utt = F G and uxx = F G,

and

t.

By

72

where dots denote derivatives with respect to inserting this into (4.29) we have

t and primes denote derivatives with respect to x.

By

F G = c2 F G.
We now divide across by dividing across by

FG

Note:

this is the usual trick applied at this point) and follow this by

c2

thus nding (for all

and

t):

G F = . c2 G F

The expression on the left involves functions depending only on involves functions depending only on

while the expression on the right

x.

Hence both expressions must be equal to a constant, say

k.

[if the expression on the left is not constant, then changing

will presumably change the value of

this expression but certainly not that on the right, since the latter does not depend on if the expression on the right is not constant, changing

t.

Similarly,

will presumably change the value of this

expression but certainly not that on the left]. Therefore,


G F = = k. c2 G F

This immediately yields the two

ordinary linear dierential equations


F kF = 0,

(4.33)

and

G c2 kG = 0.
In these equations,

(4.34)

is still arbitrary. Note that they are ODEs because

F = F (x)

and

G = G(t).

Before actually determining the value of

k,

we will rst narrow down the search by nding its sign.

Second Step:
We will now determine solutions conditions in (4.30), that is

and

G of (4.33) and (4.34) so that u = F G satises the boundary

u(0, t) = F (0)G(t) = 0,
Clearly, if

u(l, t) = F (l)G(t) = 0 G = 0

for all t.

G = 0,

then

u = 0,

which is on no interest. Thus

and therefore

F (0) = 0;
For

F (l) = 0.

(4.35)

k=0

the general solution of (4.33) is Hence,

F = ax + b,

and from the conditions in (4.35) we obtain

a = b = 0.

F = 0,

which is of no interest because then

u = 0.

For positive

k,

i.e.

k = 2 ,

the general solution of (4.33) is (see (4.22))

F = Aex + Bex ,
73

and from (4.35) we obtain negative, say

F = 0,

as before. Hence we are left with the possibility of choosing

k = p2 .

Then (4.33) takes the form

F + p2 F = 0,
and the general solution is (see (4.20))

F (x) = C cos px + D sin px.


From this and (4.35) we have

F (0) = C = 0
We must take

and
Hence

F (l) = D sin pl = 0. sin pl = 0,


that is,

D = 0

since otherwise

F = 0.

pl = n

i.e. p = n/l

where n is any integer (0, 1, 2, ...) F (x) = Fn (x) nx l


where

(4.36)

We thus obtain innitely many solutions

Fn (x) = Dn sin
which satisfy (4.35) and the constants

n = 1, 2, 3, ...,

(4.37)

Dn

are as yet undetermined. [For negative values of

we

obtain essentially the same solutions, except for a minus sign, because Then

sin(x) = sin(x)]. k
the

is now restricted to

k = p2 = (n/l)2 ,

resulting from (4.36). For these values of

equation (4.34) takes the form

G + 2 G = 0 where n = cn/l. n
The general solution is

Gn (t) = Bn cos n t + Bn sin n t.


Hence the function

un (x, t) = Fn (x)Gn (t)

are given by

un (x, t) = (Bn cos n t + Bn sin n t) Dn sin

nx , l

n = 1, 2, 3.... Bn Dn = Bn
(or

Noting the fact that the constants are arbitrary up to this point, we can redene any other letter) and

Bn Dn = Bn

and rewrite the general solution as

un (x, t) = (Bn cos n t + Bn sin n t) sin

nx , l

n = 1, 2, 3....

Third Step:
Clearly, a single solution,

un (x, t) will,

not in general satisfy the initial conditions (4.31) and (4.32).

Now, since the one-dimensional wave equation is linear and homogeneous, it follows from Theorem

74

4.1.1 that the sum of nitely many solutions

un

is a solution of the original equation (4.29). To

obtain a solution that satises (4.31) and (4.32), we consider the innite series

u(x, t) =

n=1

un (x, t) =

(Bn cos n t + Bn sin n t) sin

n=1

nx . l

(4.38)

From this and (4.31) it follows that

u(x, 0) =

n=1

Bn sin

nx = f (x). l

(4.39)

Hence, in order that the innite series equation (4.38) satises the initial condition (4.31), the coecients

Bn

must be chosen so that

u(x, 0)

becomes a half-range expansion of

f (x),

namely, the

Fourier sine series of

f (x);

that is

2 Bn = l

f (x) sin

nx dx, l t

n = 1, 2, 3....

(4.40)

Similarly, by dierentiating (4.38) with respect to

and using (4.32) we nd

u t

t=0

= =

(Bn n sin n t + Bn n cos n t) sin

n=1 n=1 Bn n sin

nx ) l t=0

nx = g(x). l
Bn
must be chosen so that, for

Hence, in order that (4.38) satises the (4.32), the coecient

t = 0,

u/t

becomes the Fourier sine series of

g(x);

thus

Bn n =
or, since

2 l

g(x) sin
0

nx dx, l nx dx, l

n = 1, 2, 3...

n =

cn l Bn

2 = cn

g(x) sin

n = 1, 2, 3....

(4.41)

Thus it follows that

u(x, t) =

(Bn cos n t + Bn sin n t) sin

n=1

nx , l utt = c2 uxx
that satises the

with coecients Bn and Bn given by (4.40) and (4.41), is a solution of


boundary and initial conditions.

Example 4.4.1 Find the solution of the wave equation (4.29) corresponding to the triangular initial
deection
f (x) =
2kx l , 2k(lx) , l

when 0 < x < when


l 2

l 2

< x < l,

and initial velocity zero. Since g(x) = 0, we have Bn = 0 in (4.41) and we use basic Fourier theory

to solve for the Bn 's giving


Bn = 8k n sin , 22 n 2
75

n = 1, 2, 3, ....

time t = 0.1
1
1

time t = 1

0.8

2 terms

0.8

c=k=l=1

0.6

0.6

0.4

1 term
0.4 0.2

0.2

2 terms 1 term

0.2

0.2

0.4

0.4

0.6

c=k=l=1
0.8 1

0.6

0.8

3 terms
0 0.1 0.2 0.3 0.4 0.5 x 0.6 0.7 0.8 0.9 1

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Figure 4.3:

Solution at t = 0.1 (left) and t = 1 (right). The dashed line shows the initial (triangular)

condition. Thus (4.38) takes the form


u(x, t) =
8k cnt nx n cos sin sin 22 n 2 l l n=1 ) ( 8k ct 1 3ct x 3x = 2 sin cos 2 sin cos + ... . l l 3 l l

The results for two times are shown in Figure 4.3. The left plot has t = 0.1 and shows both one and two terms in the sum (for more terms we do not observe a dierence in the solution). The right plot has t = 1 with up to three terms in the sum.

4.4.3 D'Alembert's solution of the wave equation for an innite string


The solutions in this section were rst found by D'Alambert. Strictly speaking, they do not t in with our present investigation of the method of separation of variables but it is an alternative way of solving the wave equation on an

innite string subject to Cauchy conditions. (We already did this using separation of variables for the case of a nite string in the last section).
utt = c2 uxx , c =
T , we introduce new independent

To investigate the wave equation (4.29), i.e.

variables (in fact these can be derived using the characteristic theory we introduced when classifying second order PDEs in 4.2) given by

= x + ct,
Then

= x ct.

(4.42)

becomes a function of

and and

and the derivatives in (4.42) can be expressed in terms Denoting partial derivatives by

of derivatives with respect to

by using the chain rule.

76

subscripts, we see from (4.42) that

x = 1

and

x = 1

and therefore transforming from

u(x, t)

to

w(, ),

we nd

ux = w x + w x = w + w .
By applying the chain rule to the right hand side we nd

uxx (w + w )x = (w + w ) x + (w + w ) x .
Since

x = 1

and

x = 1,

this becomes

uxx = w + 2w w + w .
It is customary to rewrite this using the same dependent variable on both sides of the equation i.e.

uxx = u + 2u u + u .
The

utt

derivative in the wave equation is transformed by the same procedure, and the result is

) ( utt = c2 u 2u u + u .
By inserting these two results into

utt = c2 uxx u =

we obtain

2u = 0. ,
nding

(4.43)

We may integrate this equation with respect to

u = h(),
where

h()

is an arbitrary function of

Integrating this with respect to

we have

u=
where

h() d + (), ,
say

()

is an arbitrary function of

Since the integral is a function of

(),

the solution

is of the form

u = () + ().
Because of (4.42) we may write

u(x, t) = (x + ct) + (x ct).


This is known as The functions

(4.44)

d'Alembert's solution of the wave equation.


and

are arbitrary up to this point, i.e.

any suciently smooth functions of

their respective arguments will satisfy (4.43) and hence the PDE. The arbitrary functions can be determined from the initial conditions just as we could use the boundary conditions of an ODE

77

problem to solve for the integration constants. velocity

Let us illustrate this in the case of zero initial

ut (x, 0) = 0

and given deection

u(x, 0) = f (x).

By dierentiating (4.44) we have

u = c (x + ct) c (x ct), t
where primes denote derivatives with respect to the

(4.45)

entire arguments x + ct and x ct, respectively.

From (4.44), (4.45), and the initial conditions we have two equations in two unknowns:

u(x, 0) = (x) + (x) = f (x) ut (x, 0) = c (x) c (x) = 0.


From (4.47) we have

(4.46) (4.47)

= .

Hence

= + k,

for

a constant and from this and (4.46) we nd

2 + k = f
Then

or

1 = (f k). 2

= 1 (f + k) 2

and with these functions the solution (4.44) becomes

u(x, t) =

] 1[ f (x + ct) + f (x ct) . 2

(4.48)

This maybe interpreted as follows: the initial condition splits into two wavelets of half the amplitude of the original and these propagate in opposite directions at speed

c.

Our result shows that the

initial conditions and the boundary conditions determine the solution uniquely.

Exercise:

Reconsider the problem above with general initial condition

ut (x, 0) = g(x).

4.5 One-Dimensional Heat Flow


The heat ow in a body of homogeneous material is governed by the heat equation

ut = c2 2 u,
where

c2 = K

K ,
is the specic

u(x, y, z, t)

is the temperature in the body,

is the thermal conductivity,

heat capacity,

is the density of material of the body,

is the Laplacian of

with respect to

Cartesian coordinates

x, y, z ,

i.e.

2 u = uxx + uyy + uzz .

As an important application, let us

consider the temperature in a long thin bar or wire of constant cross-section and homogeneous material which is oriented along the that heat ows in the becomes the so-called

x-axis

(see Figure 4.4) and is perfectly insulated laterally, so

x-direction only.

Then

u depends only on x and time t, and the heat equation

one-dimensional heat equation


ut = c2 uxx .
78 (4.49)

While the wave equation involves the

second

partial derivative

utt ,

the heat equation involves the

rst derivative ut ,

and we shall see that the solutions of (4.49) are entirely dierent from those of

the wave equation, although the procedure for solving (4.49) is quite similar to that in the case of the wave equation. We shall derive (4.49) and solve it for some important types of boundary and initial conditions.

Q = - K u x(x,t)

Q = K u x(x +

x, t)

x
Figure 4.4:

x+ x
Section of bar of material.

x axis

4.5.1 Derivation of the heat equation


We have already derived the wave equation for vibrations in a string or membrane. We now derive the heat equation for ow in a bar of conducting material. We assume that the

lateral sides of the bar are perfectly insulated (with some lagging material) so
We will also assume that the temperature

that there is no passage of heat through them.


rod depends only on position

in the

and

t,

and not on the lateral coordinates

and

z,

i.e.

that the

temperature in any cross-section of the rod is constant. (See Figure 4.4). This assumption is usually satisfactory when the lateral dimensions of the rod are small when compared to its length. The dierential equation governing the temperature in the bar is an expression of a fundamental physical

balance:

the rate at which heat ows into any portion of the bar is equal to rate at which

heat is absorbed in that portion of the bar. The terms in the equation are called the ux (ow) term and the absorption term respectively. We begin with Fourier law which states that the amount of heat owing through unit cross-section area in the bar

per unit time, called the ux Q, is given by:


Q(x, t) = K u (x, t), x
(4.50)

where

is the (constant) heat diusion coecient and depends on the material in the rod, and

u(x, t)

is the temperature in the rod as a function of the distance along its length and time. Quali-

tatively the law states that if there are large dierences in the temperature

along the rod i.e. if

79

u x is large, then heat ow occurs. This is in accordance with physical experience which testies
to the fact that heat ow tends to equalise temperatures. Also, heat ows from hot areas to cold areas (this is the origin of the negative sign in (4.50). If the temperature in the rod is everywhere the same, then

u x

=0

everywhere and no heat ows.

We now concentrate on an innitesimal portion of the rod, located between the points

x and x + x

as in Figure 4.4. In order to derive a dierential equation describing the ow of heat in the bar, we will calculate the amount of heat owing into the small element of length the increase in heat in the element arising from absorption. At the left hand edge of the element, the

and equate this with

rate of heat ow per unit area,

i.e. the amount of heat Similarly, the amount

owing through a unit area in unit time to the right is given by the ux

Q(x, t).

of heat owing into the dierential element in unit time at the right hand edge is

Q(x + x, t)

(Note the sign change). The net increase in heat in the dierential element (per unit cross-sectional area)

in a time t is thus:
Increase in heat in element in time

( ) t = Q(x, t) Q(x + x, t) t.

(4.51)

Now the amount of heat energy per unit cross-section in the dierential element at any time given by

is

xu

where

is specic heat capacity,

is the density of the material and

u u

is the is the

average temperature in the element at time

t.

In fact let us take

u = u(x + x/2, t),

i.e.

temperature at the centre of the element at time

t.

The

rate of increase in heat in the element (i.e.


xut
and so the net increase in

the increase in heat in the element in unit time) is thus given by heat energy in the element in time

is:

Increase in heat in element in time

t = xtut (x + x/2, t).

(4.52)

Obviously we can now equate (4.51) and (4.52) as the amount of heat owing into the element must equal the increase in its heat energy (this is just a conservation of heat energy) and so

) Q(x, t) Q(x + x, t) t = xtut (x + x/2, t). x


and take the limit as

(4.53)

The

t's

cancel and we now divide by both sides of

x 0

to get:

Q(x, t) Q(x + x, t) = lim ut (x + x/2, t). x0 x0 x lim


Recalling the denition of a partial derivative, (4.54) is just:

(4.54)

Qx (x, t) = ut (x, t).


But from (4.50) we have an expression for

(4.55)

in terms of

so (4.50) and (4.54) become:

Kuxx (x, t) = ut (x, t),


80

(4.56)

or in more familiar form of (4.49) where

c2 =

K is called the thermal diusivity. It is a parameter 2

depending only on the material of the bar. Its units are (length) /time. Typical values for dierent materials: silver

1.71 104

m s

2 1 , brick

3.8 107

m s

2 1 , water

1.44 107

m s

2 1 .

4.5.2 Physical boundary conditions


Firstly, what type of PDE is the heat equation and what type of boundary conditions do we expect from the general theory earlier in the Chapter? Several relatively simple conditions may be imposed at the end of the bar. temperature at the end may be maintained at some constant value For example, the

T.

This might be accomplished

by placing the end of the bar in thermal contact with some reservoir of sucient size so that any heat that may ow between the bar and the reservoir does not noticeably alter the temperature of the reservoir. At this end the mathematical (Dirichlet) boundary condition is

u = T.

(4.57)

Another simple boundary condition occurs if the end is insulated (i.e. the end is surrounded by a lagging material) so that no heat passes through it. Recalling the expression (4.50) (the Fourier law) for the amount of heat (per unit time) crossing any cross-section of the bar, the condition for insulation is clearly that this quantity vanishes. Thus mathematically

ux = 0,
is a (Neumann) boundary condition at an insulated end.

(4.58)

A more general type of boundary condition occurs if the rate of ow of heat through an end of the bar is proportional to the temperature there. Let us consider the end heat ow from left to right is give by bar (from right to left) at

x = 0,

where the rate of

Kux (0, t);

see (4.50). Hence the rate of heat ow out of the

x=0

is

KAux (0, t).

If this quantity is proportional to the temperature

u(0, t),

then we obtain the (Robin) boundary condition

ux (0, t) h1 u(0, t) = 0,
where

t > 0, h1 = 0

(4.59)

h1

is a known non-negative constant of proportionality. Note that

corresponds to an

insulated end, while reduces to

h1

corresponds to an end held at zero temperature. (The equation then

u(0, t) = 0). = 1),


then in a similar way we

If the heat ow is taking place at the right hand end of the bar (x obtain the boundary condition

ux (1, t) h2 u(1, t) = 0,
where again

t > 0,

(4.60)

h2

is a known non-negative constant of proportionality.

81

Finally to determine completely the ow of heat in the bar it is necessary to state the temperature distribution at one xed instant, usually taken as the initial time the form

t = 0.

This initial condition is of

u(x, 0) = f (x),

0 x 1.

(4.61)

The mathematical problem is then to determine the solution of the dierential equation (4.49) subject to the boundary conditions (4.59) and (4.60) at each end, and to the initial condition (4.61) at

t = 0.

4.5.3 Solutions to heat ow problems with homogeneous boundary conditions


Problem Formulation
We consider the case of a bar of heat conducting material of length equation describing the conduction of heat through the bar is:

l.

The partial dierential

c2 uxx = ut .
Let us start with the case when the ends Then the (homogeneous)

(4.62)

x=0

and

x=l

of the bar are kept at temperature zero.

boundary conditions are


u(0, t) = 0, u(l, t) = 0, for all t.
(4.63)

Let

f (x)

be the initial temperature in the bar. Then the

initial condition

is

u(x, 0) = f (x),
where

(4.64)

f (x)

is a given function.

Solution to the formulated problem First Step:


Using the method of separating variables, we rst determine solutions of the equation that satisfy the boundary conditions. We start from

u(x, t) = F (x)G(t).
Dierentiating and substituting this into (4.60) gives

(4.65)

F G = c2 F G,
where, as before, dots denote derivatives with respect to to

t and dashes denote derivatives with respect


for convenience)

x.

Dividing by

c2 F G (the usual trick is to divide by F G but we also divide by c2


F G = . c2 G F

we have

(4.66)

82

The expression on the left depends only on

t,

while the right side depends only on

x.

As in 4.4,

we conclude that both expressions must be equal to a constant, say the only solution obtain
G/c2 G = F /F = p2 ,

k.

You can show that for For negative

k0
we

u = FG

that satises the boundary conditions is

u = 0.

k = p2

and from this the two ordinary dierential equations

F + p2 F = 0,
and

(4.67)

G + c2 p2 G = 0.

(4.68)

Second Step:
The general solution of (4.67) is

F (x) = A cos px + B sin px.


From the boundary conditions (4.63) it follows that

(4.69)

u(0, t) = F (0)G(t);
Since that

u(l, t) = F (l)G(t) = 0.
and

G0

implies

u 0,

we require that therefore

F (0) = 0

F (l) = 0.

We can conclude from (4.69)

F (0) = A

and so

A = 0,

F (l) = B sin pl.


We must have

B = 0,

since otherwise

F 0. i.e

Hence the condition

F (l) = 0

leads to

sin pl = 0
We thus obtain the innity of solutions

p = n/l,

n = 1, 2, 3....

Fn (x) = Bn sin
where

nx , l

n = 1, 2, 3...,

Bn

is a completely arbitrary constant.

For the values

p = n/l

the ODE (4.68) takes the form

G + 2 G = 0 n
The general solution is

where n = cn/l.

Gn (t) = Cn e t ,
2

n = 1, 2, 3...,

83

where

Cn

is an arbitrary constant. Hence the functions

un (x, t) = Fn (x)Gn (t) = Dn sin

nx 2 t e n l

n = 1, 2, 3...,

(4.70)

are solutions of the heat equation (4.62) satisfying (4.63). In (4.70) we have written as

Bn Cn = Dn ,

Bn

and

Cn

are arbitrary (as is

Dn ).

Third Step:
To nd a solution which also satises the initial condition (4.64), we consider the series

u(x, t) =

n=1

un (x, t) =

n=1

Dn sin

nx 2 t e n, l

(n = cn/l).

(4.71)

From this and the initial condition (4.64) it follows that

u(x, 0) =

n=1

Dn sin

nx = f (x) l Dn
must be chosen such that

Hence for the general solution (4.71) to satisfy (4.64), the coecients

u(x, 0)

becomes a half-range expansion of

f (x),

namely, the Fourier sine series of

f (x):

that is

Dn =

2 l

f (x) sin

nx dx, l

n = 1, 2, 3....

(4.72)

Therefore the series (4.71) with coecients (4.72) is the solution of the heat equation (4.62).

Example 4.5.1 If the initial temperature in a bar of length l is given by


f (x) = x

when 0 < x < l/2 when l/2 < x < l,


] nx (l x) sin dx . l l/2
l

lx

(see Figure 4.5, dotted line), with l = and c = 1, then we obtain from (4.72)
2 Dn = l [
l/2 0

nx x sin dx + l

(4.73)

Integration (both integrals in (4.73) require integration by parts) yields Dn = 0 when n is even and
Dn = 4l n2 2 , , n = 1, 5, 9, ... n = 3, 7, 11, ....

Dn =

4l n2 2

Hence the solution is


4l u(x, t) = 2

[ ( )2 ] [ ( ) ] } x c 1 3x 3c 2 sin exp t sin exp t + ... . l l 9 l l

In Figure 4.5 we graph this at dierent times (e.g. t = 0, 1, 2, 3) to get an instantaneous "picture" of the temperature in the bar at each of these times. Note the smoothing eect of the diusion operator.
84

1.6

1.4

1.2

t=0

0.8

0.6

t=1 t=2

0.4

0.2

t=3
0 0 0.5 1 1.5 2 2.5 3 3.5

x
Figure 4.5:

Solution at various times.

4.6 Laplace's Equation


One of the most important partial dierential equations appearing in physics is Laplace's equation

2 u = 0,
where, with respect to cartesian co-ordinates

(4.74)

x, y, z

in space,

2 = uxx + uyy + uzz .

The theory of

solutions of Laplace's equation is called potential theory. Solutions of (4.74) which have continuous second order partial derivatives are called The two dimensional case, when

harmonic functions.
x
and

depends on

only, can be treated using the methods

of complex analysis exploiting the fact that the real and imaginary parts of valued function

any

analytic complex

f (z) = u(x, y) + iv(x, y)

both satisfy Laplace's equation in two dimensions. Many

problems involving the two dimensional Laplace's equation reduce to exercises in complex variable theory.

4.6.1 Basic applications


We mention briey some applications of Laplace's equation. In electrostatics the electrical force of attraction between charged particles is called Coulomb's law, which is of the same mathematical form as Newton's law of gravitation. It can be shown that the eld created by a distribution of electrical charges can be described mathematically by a potential function which satises Laplace's equation at any point not occupied by charges. A similar result holds for the gravitational potential, i.e. the

85

gravitational force between two particles is given by the gradient of a scalar function (potential) which satises Laplace's equation. For incompressible ow the velocity potential

can be shown to satisfy

2 = 0.

Finally, in a steady state heat ow problem, the temperature as

also satises the Laplace equation

/t 0

and the heat ow equation reduces to Laplace's equation.

4.6.2 Laplace's equation in a rectangle


We consider the following physical problem. A thin rectangular plate has its edges xed at temperatures zero on three sides and

f (y)

on the remaining side, as shown in Figure 4.6. Its lateral sides

are then insulated and it is allowed to stand for a "long" time (but the edges are maintained at the aforementioned boundary temperatures). We wish to nd the temperature distribution in the plate.

(0,b)

v=0

(a,b)

v=0

v=0

v = f(y)

(0,0)

v=0

(a,0)

Figure 4.6:

A thin metal rectangular plate for Laplace's equation.

Problem Formulation
The mathematical problem can be formulated as follows (PDE and boundary conditions):

vxx + vyy = 0 (2 v = 0).

(4.75)

As the equation is elliptic, we expect just one boundary condition along the boundary (in this case the conditions are Dirichlet), i.e. along each side of the rectangle. Thus we require

v(x, 0) = 0, v(0, y) = 0,
where

v(x, b) = 0, v(a, y) = f (y),

0xa 0 y b,

(4.76) (4.77)

f (y)

is a known function.

86

Solution to formulated problem


We now proceed by separation of variables: before doing so we comment on one apparent dierence between the present problem and the simple hyperbolic and parabolic problems we looked at earlier in the Chapter. In these cases, we had both initial and boundary conditions and the method only worked if the boundary conditions were all homogeneous (in order to determine the eigenfunctions). The non-zero

initial conditions were then used to solve for the superposition constants.
initial conditions as the problem is time independent.
f (y) = 0

In the

present case, we have no

If all our boundary

conditions were homogeneous (i.e.

in (4.77)), then the problem would have the trivial

solution everywhere. In fact, the method which we are about to develop will work when we have precisely

one non-zero boundary condition

and

three zero conditions.

The zero or homogeneous

conditions are used to solve for the superposition constants and does the same task as the initial conditions for the hyperbolic and parabolic equations. We now seek a solution in the form:

v(x, y) = F (x)G(y),
which gives

G(y)F (x) + F (x)G(y) = 0,


and so

F (x) = k 2 F (x) G(y) = k 2 G(y),


where we have assumed the separation constant is negative. leads to a trivial solution. condition occurs on a

(4.78) (4.79)

As before choosing a dierent sign

In the present case, the sign depends on whether the inhomogeneous or

x = constant

y = constant

boundary. The former case applies here (see

(4.77)), while if the inhomogeneous condition were on separation constant of opposite sign. Equation (4.78) leads to the following solution:

y = b,

say, then we would have to choose a

F (x) = A cosh kx + B sinh kx,


and application of the rst condition in (4.77) indicates

(4.80)

A=0

and we are left with

F (x) = B sinh kx.


Equation (4.79) has solution:

(4.81)

G = C cos ky + D sin ky.

87

The rst condition in (4.76) indicates that

C=0

and so

G = D sin ky.
Then the second condition in (4.76) yields the following eigenvalue equation:

sin kb = 0
Thus superposing over all values of

= n,

kb = n,

n = 1, 2, . . . , .

(4.82)

we have:

v(x, y) =

n=1

En sinh

nx ny sin , b b = Bn Dn ).

(4.83)

where, as usual, we have absorbed the constants (En boundary condition to solve for

We now use the inhomogeneous

En .

Thus, on

x = a,

the second condition in (4.77) gives

f (y) =

n=1

En sinh

na ny sin , b b

(4.84)

and so by the orthogonality of the sines we have

na 2 En sinh = b b
and so

f (y) sin

ny dy, b

2 En = b

b
0

f (y) sin ny dy b . sinh na b

(4.85)

Then the solution to the problem is complete.

Example 4.6.1 Solve Laplace's equation on the rectangle 0 x 3 and 0 y 2 with


f (y) = y

when 0 < y < 1 when 1 < y < 2.

2y

We need to nd the En using (4.85). Now, since a = 3 and b = 2 we have

0 b

ny f (y) sin dy = b

ny y sin dy + 2 0 8 n = 2 2 sin , n 2

(2 y) sin

ny dy 2

using integration by parts. Thus

8 sin n 2 . En = 2 2 n sinh 3n 2

The solution is given in (4.7a) and corresponding contour plots in (4.7b).

88

Example for Laplace Equation

Contour plots
2 1.8

1.6

0.8

1.4

0.6

1.2

y
0.4 0.2 0 2 1.5 2.5 1 1.5 0.5 0.5 1 0 0 2 3

0.8

0.6

0.4

0.2

0.5

1.5

2.5

Figure 4.7:

Solution of Laplace's equation for the example (left) and corresponding contour plots

(right).

4.7 Using Integral transforms to solve PDEs


The general form of an integral transform is

f (s) =
a
where

f (x)K(s, x) dx, x

(4.86)

K(s, x)

is a

known

function of

and

and is called the kernel of the transformation. For

example, the kernel of a Laplace transform would be

esx .

The eect of applying an integral transform to a PDE is to exclude temporarily a chosen independent variable and to leave for solution a PDE in one less independent variable. You will already have seen how to solve ODEs using Laplace transforms: the ODE reduces to an

algebraic equation which is of

course much easier to solve than the original ODE. Solution of this equation yields an expression for the

transform of the dependent variable and the only remaining diculty is in inverting to nd the
n
independent variables

dependent variable itself. Generally speaking, transforming a PDE with reduces to a PDE with reduces to an ODE).

(n 1) independent variables (and so a PDE with two independent variables

4.7.1 General procedure for using transforms


We must follow these steps:

1. Select the appropriate transform (depending on the equation and especially the boundary conditions).

2. Multiply the equation

and the boundary conditions by the kernel and integrate between the

appropriate limits with respect to the variable selected for exclusion.

89

3. In performing the integration in step 2.

make use of the appropriate boundary (or initial)

conditions in evaluating terms at the limits of integration.

4. Solve the resulting equations, so obtaining the

transform of the wanted function (solution).

5. Invert to nd the solution itself.

4.7.2 Denitions and summary of properties of common transforms


In the following denitions, we consider transforms of some function can just as easily be extended to a function and the transform would be be

f (x)

or

f (t).

The denitions

f (x, t) where either the "t" variable would be unaected

f (s, t), or the "x" variable would be unaected and the transform would

f (x, s).

4.7.3 Fourier transform


This is essentially a restatement of the Fourier integral theorem. Given some function fying certain smoothness requirements), its Fourier transform

f (x)

(satis-

f ()

is dened to be

f () =
where

f (x)eix dx,

(4.87)

i2 = 1.

The kernel is thus

eix .

Note that the use of

as the variable in the kernel is

purely a matter of convention. In the introduction to transforms at the beginning of 4.7, used as the general transform variable. The inverse transform is now dened by:

was

1 f (x) = 2
Note how in (4.87) the

f ()eix d.

(4.88)

x dependence has been integrated out and it returns in (4.88).


is sometimes used.

The notation

F(f ) = f and F1 (f ) = f

Properties of the Fourier transform


These are stated here without proof (except for (ii)):

(i)

Linearity of the transform and its inverse.


formable functions:

For

any scalars and

f, g

any trans-

F(f + g) = F(f ) + F(g),


with a similar result for the inverse transform

F1 .
as

(ii)

Transform of the nJD derivative.


( F dn f dxn

If

f (n1) (x), f (n2) (x),...,f (x) 0

x ,

then

) = (i)n F(f ) = (i)n f ().

90

Proof:
F

df dx

df ix e dx dx [ ] ix = f (x)e + i = = iF(f ) = i f (),

f (x)eix dx

where we have used integration by parts. Second and higher derivatives are transformed in a similar manner. Note that this his how the transform removes derivatives w.r.t.

equation. For example

d2 f dx2

from the

= (i)2 f ().

(iii)

Fourier convolution.

If we dene the Fourier convolution of two functions to be

f g

f (x ) g() d,
Recall that

then

g F(f g) = f ()()

or

f g = F1 (f g ).

and

F1

are inverses of one

another so that

FF1 = F1 F

is the identity transformation.

(iv) For reference purposes, we list some other less important properties:

[ ] F (ix)n f (x) = f (n) () [ ] x shift : F1 eia f () = f (x a) [ ] shift : F1 f ( a) = eiax f (x) If h(x) = f () d and h 0

as

x0

then

F[h(x)] = f ()/i.

4.7.4 Laplace transform


The Laplace transform is dened by

f (s) =
0
where

f (t)est dt,

(4.89)

is chosen so that the integral converges and in general can be a complex number.

The

inverse transformation is

1 f (t) = 2i
Sometimes the notation Re(s)

+i

f (s)est ds.
is used. Note that

(4.90)

L(f ) = f

and

L1 (f ) = f

and

are real (with

> )

in the denition of the inverse transform so the transform variable

s = + i

is

complex. The path of integration in (4.90) is the straight line from

to

+ i

in the complex

plane so inverting Laplace transforms (and indeed Fourier transforms) can be very dicult. We will generally contend ourselves with using tables of Laplace transforms to nd inverse transforms or only considering special simplied situations but it should be remembered that inverting the Laplace transform of an arbitrary function is usually non-trivial and must often be undertaken numerically.

91

Properties of the Laplace transform


These are stated here without proof (except for (ii)):

(i)

Linearity of the transform and its inverse.


formable functions:

For

any scalars and

f, g

any trans-

L(f + g) = L(f ) + L(g),


with a similar result for the inverse transform

L1 .
as

(ii)

Transform of the nJD derivative.

f (n1) (t), f (n2) (t),...,f (t) 0 ( n ) ( n1 ) d f d f dn1 f L = sL n1 (t = 0). dtn dtn1 dt


If

t +,

then

For example, for

n=1

and

n = 2 we have: ( ) df L = sf (s) f (0) dt ( 2 ) d f L = s2 f (s) sf (0) f (0). dt2 ( )

Proof:
L df dt df st e dt dt 0 [ ] st = f (t)e +s 0 = = f (0) + sf (s),
where we have used integration by parts. Second and higher derivatives are transformed in a similar manner. Note that this is how the transform removes derivatives w.r.t. equation.

f (t)est dt

from the

(iii)

Laplace convolution.

If we dene the Laplace convolution of two functions to be

f g
0
then

f ( ) g(t ) d,
Recall that

g L(f g) = f (s)(s)

or

f g = L1 (f g ).

and

L1

are inverses of one

another so that

LL1 = L1 L

is the identity transformation.

92

(iv) For reference purposes, we list some other less important properties:

[ ] L (t)n f (t) = f (n) (s), t


shift

e.g.

[ ] L1 eas f (s) = H(t a)f (t a) [ ] s shift : L1 f (s + a) = eat f (t) [ ] t f (s) = f ( ) d L1 s 0 [ ] f (t) L = f (s) ds t s : f (t)
is periodic with period over

[ ] df L tf (t) = ds

If

0 t < ,

then

f (s) =

1 1 eas

f (t)est dt.
if

Note that

is the Heaviside step function dened as

H(t) = 0

if

t < 0, H(t) = 1

t > 0.

4.7.5 General comments on when to use dierent transforms


Fourier and Laplace transforms can only be used on equations with of

linear equations and are usually only useful on

constant coecients.

If

u = u(x, t) is governed by an equation which are functions

x but not t, then transforming w.r.t. t will reduce it to an ODE problem whose coecients are also x.
If the original PDE has coecients which are functions of

a function of the

and we transform out

t variable,

then the transformed problem will still be a PDE but may (in certain circumstances)

be simpler than the original PDE. If the independent variable ranges over ranges over

(0, ),

the Laplace transform should be considered. If it

(, )

the Fourier transform should be more suitable.

4.7.6 Examples using dierent transforms


The general theory of the previous sections involved functions of a single variable

f (x)

or

f (t)

and

transforms of these functions. The extension to functions of two or more variables is straightforward. For example, suppose that

u = u(x, t)

and we wish to solve a PDE involving

by using integral

transforms. We initially need to establish which transform we are using and

which variable we

are transforming out as there are two possible independent variables to choose from. Suppose that we decide to use a Laplace transform with respect to the t variable. Then derivatives w.r.t. the x variables are unaected by the transform because the x and t variables are independent.
Specically, using (4.89):

] { } u st u u st = e dt = ue dt = (x, s), L x x x x 0 0 [
so the

/x

can be thought of as moving "outside" the transform process because the limits of the

integral are independent of

x.

Similar results hold for higher derivatives w.r.t.

of course.

93

The advective equation

cux + ut = 0

where

is a constant can model wave-like phenomena and is

related to the wave equation but it is of course lower order. Consider the following mathematical problem:

Example 4.7.1 Solve cux + ut = 0 subject to the initial conditions u(x, 0) = ex , for 0 x < ,
and the boundary condition u(0, t) = ect . Solution.
We will use the Laplace transform in the time variable, i.e. (4.89) becomes

u(x, s) =
0
and so transforming the equation gives

u(x, t)est dt,

u (x, s) + s(x, s) u(x, 0) = 0, u x t)


yields

(4.91)

while transforming the boundary condition (which involves

[ ] u(0, s) = L ect =
The initial condition is

e(sc)t dt =

1 . sc

(4.92)

u(x, 0) = ex

and so (4.91) reduces to

u s 1 (x, s) + u(x, s) = ex . x c c

This is just a rst order linear ODE: the integrating factor is and rearranging the LHS gives:

(4.93)

(s/c) dx

= esx/c .

Multiplying by this

[ sx/c ] 1 x+sx/c ue = e , x c

(4.94)

and upon integrating we obtain

uesx/c =

ex+sx/c + A(s) sc

or

u=

ex + A(s)esx/c . sc s
written as

(4.95)

Note that the integration "constant" is in fact an arbitrary function of Referring to (4.92) we note that when

A(s)

here.

x = 0

we require

u(0, s) = 1/(s c)

and so we must set we

A=0

in (4.95). Taking the inverse transform of both sides (recalling that

L1 [1/(s c)] = ect )

nd that

u(x, t) = ex+ct = e(xct) .

(4.96)

Checking back we see that this does satisfy our governing equation and initial condition. A little reection will indicate that this can be interpreted as a "wave" moving to the right hand side at speed

c.

In fact if we had taken the initial condition to be

u(x, 0) = f (x),

the solution to this

problem would have been wave speed

u(x, t) = f (x ct)

and the initial condition propagates to the right at

c.
94

The advective equation is obviously related to the wave equation

c2 uxx = utt

and may be regarded

as half the wave equation in some sense. Recall that D'Alembert's solution to the wave equation consisted of two waves, one moving to the right and one to the left. The advective equation generates a single wave moving to the right, while obviously its sister equation single wave propagating to the left.

cux ut = 0 generates another

Example 4.7.2 Solve the wave equation c2 uxx = utt for a semi-innite string by Laplace transforms
given that:
u(x, 0) = 0

(string is initially undisturbed) (initial velocity of the string is given) (string is xed at x = 0) (string is held at innity).
t.
We now

ut (x, 0) = xex/a u(0, t) = 0, u(x, t) 0 t0

as x for t 0

Solution.
to

In this instance we take a Laplace transform with respect to the time variable

need to transform the equation and its derivatives. Note that as we are transforming with respect

the derivatives with respect to

are unaected. For example

] } u u { L[ux ] = L = L[u] = (x, s), x x x


and similarly

L[uxx ] =
Furthermore, from 4.7.4 we nd that

2u (x, s). x2

L[ut ] = s(x, s) u(x, 0), u


Note again how the

L[utt ] = s2 u(x, s) su(x, 0) ut (x, 0).


The transformed wave

variable is unchanged during the transformation.

equation now becomes

c2

2u (x, s) = s2 u(x, s) su(x, 0) ut (x, 0). x2

This equation contains no derivatives w.r.t. s. This is the essence of the idea of using transforms. The above equation is really only an ODE (sometimes called a pseudo PDE). To solve
it we use ODE methods while allowing all constants of integration to be functions of the parameter

s.

If we can now nd a solution to this ODE, we will have found we then apply an inverse transform.

u(x, s)

and to nd our solution

u(x, t)

By seeking a particular integral of the form

u(x, s) = xex/a + ex/a ,

95

we obtain the following solution to the dierential equation:

u(x, s) = A(s)e
where

sx/c

+ B(s)e

sx/c

[ ] ex/a 2c2 /a2 2 2 x+ 2 2 , c /a s2 c /a s2

A(s) and B(s) are arbitrary and are determined from the (transformed) boundary conditions. u(0, s) = 0
and

The last two conditions when transformed are we nd that Now

u(x, s) 0

as

x .

From these

A(s) = 0

and

B(s) = 2c2 /(a[c2 /a2 s2 ]).

u(x, s)

is fully determined. Finding inverse Laplace transforms is often extremely dicult but

in the present instance, we can resort to the results from tables and the Using the results

shift result in 4.7.4.

, L[sinh t] = 2 s 2
we obtain

s L[cosh t] = 2 , s 2

[ ] t cosh t sinh t 1 L = 2 , 3 2 (s 2 )2

u(x, t) =

] a[ (ct x) cosh{(ct x)/a}H(ct x) ctet/a cosh{ct/a} c ] a[ + (x + a)ex/a sinh{ct/a} a sinh{(ct x)/a}H(ct x) , c

where

is the Heaviside step function.

Example 4.7.3 Consider a semi-innite thin plate of material dened by < x < , 0 y <
.

Assume the boundary of the plate y = 0 is held at a temperature u(x, 0) = f (x), and that all

other edges have their temperatures held at 0. Formulate a boundary value problem describing the steady state heat ow problem in the plate and solve it using Fourier transforms. Solution.
The governing equation is

uxx + uyy = 0,
with boundary conditions

(4.97)

u(x, 0) = f (x), u(x, ) = u(, y) = u(, y) = 0.


Using the denitions of 4.7.3, we transform out the

(4.98) (4.99)

variable arriving at

2u (, y) 2 u(, y) = 0, y 2
where we have assumed that

(4.100)

ux 0

as

x .

Once again (4.100) is an ODE and has solution

u(, y) = A()ey + B()ey ,


where we again must allow the arbitrary constants to be functions of

(4.101)

96

Transforming the rst condition in (4.99) we nd

u(, ) = 0

and so in (4.101) we must set

B() = 0.

Accordingly we have

u(, y) = A()ey ,
where

(4.102)

A()

is yet to be determined. Transforming (4.98) gives

u(, 0) = F[f (x)] = f (),


and from (4.102) we have

(4.103)

A() = F[f (x)].

As

f (x)

is known, this determines By denition this is

A()

in principle,

provided we can determine the Fourier transform of

f (x).

F[f (x)] =

f (x)eix dx,

and so we can write (4.102) as

(4.104)

u(, y) = e
To nd the solution

f (x)eix dx.

(4.105)

u(x, y)

we now use the inverse transform (4.88) and obtain

1 u(x, y) = 2

y ix

f (x)e

ix

} dx d.

(4.106)

In principal this integral can be evaluated (if necessary numerically) although for particular functions

f (x)

it may be possible to obtain an analytical solution.

97

+D=FJAH #

Numerical Methods for PDEs - Finite Dierence Methods


The problem we have dealt with up to this point have been fairly easy in that the equations were linear and the domains were regular (e.g. squares, rectangles, circles etc). For more complicated problems, where the governing equation is non-linear and not susceptible to an analytic approach or the domain is irregular, it becomes necessary to use approximation or numerical techniques. We examine numerical techniques applied to

easy (linear) PDE problems here in order to illustrate the

basic ideas though the problems which we look at could be solved analytically. The same basic considerations hold when dealing with is

algebraic equations.

If an algebraic equation

linear, then it can be solved analytically.

For example, the solution to the algebraic equation

4x = 3x + 5,
is simple to nd mainly because the equation is linear in the unknown linear in the unknown

x.

If the equation is non-

x,

we cannot in general solve it except for certain well known special cases

(e.g. quadratic equations like function of

2x2 + 3x = 1).

However, an equation with a more general nonlinear

cannot usually be solved in closed form. For example, consider

sin x + ex + x2 = 1.
This is highly nonlinear and cannot be solved analytically. There are however a number of ways of solving the equation

numerically.

The basic idea behind solving such equations numerically is graph the function

to write the function in the form the graph nd where

f (x) = 0,

f (x)

as a function of

x,

and from

f (x) = 0,

i.e. where the graph crosses the

x-axis.

Note that such a technique

would also work for the linear equation above but it is of course not necessary in such situations. Also note that

linear

equations generally have

unique

solutions while nonlinear problems may

have more than one solution (such as

x2 = 1).

When dealing with numerical solutions of nonlinear

98

PDEs, the same basic considerations hold. In principle there are several dierent types of numerical techniques available for the solution of PDEs, e.g.

Finite dierence methods;

Finite element methods;

Boundary element methods.

We will restrict attention to nite dierence methods. Note that all the methods follow the same basic principle. Instead of trying to solve the dierential equation at every point in a domain, we try to solve it approximately at a discrete number of points, and the nal solution will consist of a table of values of the unknown at a number of

nodal

points in the domain.

For example,

suppose we wish to solve the heat equation for heat ow in a bar of length

l.

Our numerical nal

solution, unlike an analytical solution, will not give us the solution at every point on the bar but merely at a discrete number of points along its length (e.g. at

x = 0, l/100, 2l/100, 3l/100, ..., l)

and we will not have solutions at every point in time but at a discrete number of time intervals (e.g.

t = 0, 0.1, 0.2, 0.3, ...

etc.). If we require a solution at a particular point which does not coincide

with one of these points, we nd it by interpolation. The numerical solution of PDEs is similar in philosophy to numerical solution of ODEs. The basic idea of the method is to construct approximations to derivatives in terms of the required function at discrete points. One common approximation for a derivative is the

central dierence:
(5.1)

df f (a + h) f (a h) (x = a) . = dx 2h
Of course this is only an approximation but we expect the approximation to become better as For the second derivative we have the central dierence approximation:

h 0.

d2 f f (a + h) 2f (a) + f (a h) (x = a) . = 2 dx h2
Note that

(5.2)

backward and forward dierence approximations are also possible.


df /dx
is:

For example, the

backward dierence approximation for

df f (a) f (a h) (x = a) , = dx h
and the forward dierence approximation is

(5.3)

df f (a + h) f (a) (x = a) , = dx h

(5.4)

While it might be expected that each of these approximations would give equivalent results when applied to the same problem, this is not the case and certain problems are more easily solved using central dierences than backward (or forward) dierences and vice versa. In general central dif-

ferences are the most commonly applied. However, the type of numerical scheme used is strongly

99

dependent on the type of PDE (elliptic, parabolic or hyperbolic) and dierent methods have been developed for each type. We note that the justication for these approximations and the computation of the errors involved depends on the Taylor expansions of the functions. For example, using Taylor series

f (a + h) = f (a) + h

df (a) + O(h2 ) dx df f (a h) = f (a) h (a) + O(h2 ), dx h2


and can be expected to

where

O(h2 ) h

means terms which behave essentially like constant times

be small if

is chosen to be small enough. Subtracting the second equation from the rst we nd:

df f (a + h) f (a h) (x = a) + O(h2 ), = dx 2h
so the error in this approximation is

(5.5)

O(h2 ).

[Note that the

O(h2 )

do not cancel in the subtraction!]

Exercise:

Show that the error in the backward dierence for

df /dx

is

O(h).

This indicates that a

central dierence is "superior" in some sense to a backward (or forward) dierence.

When dealing with partial derivatives, the approximations are the same except for the fact that there is a partial derivative with respect to each variable. approximation for For example, if

u = u(x, t)

then an

u/x

at

x=a

is

u u(a + h, t) u(a h, t) (x = a, t) + O(h2 ). = x 2h

(5.6)

5.1 Numerical solutions to the wave equation (hyperbolic)


Figure 5.1 illustrates a mesh of points, or

nodes, with spacing x in the x direction and t in the


(i, j)
so that the coordinates of the nodal

direction. Each node is specied by a pair of integers

points take the form:

xi = xi1 + x,
and then we use a forward dierence at the point

tj = tj1 + t, A and a backward dierence ( ) u ui+1,j ui,j , = x B x


Note that at the point

B:

u x

)
A

ui,j ui1,j , = x

i.e. a forward dierence at derivative at

A and a backward dierence at B .

ui,j = u(xi , tj ).

The second

therefore has the (central dierence) numerical form:

ui+1,j 2ui,j + ui1,j 2u (u/x)B (u/x)A = = . x2 x x2


Similarly,

(5.7)

ui,j+1 2ui,j + ui,j1 2u = . 2 t t2


100

(5.8)

t t j+1 tj t j-1

Columns i-1 i i+1 Rows j+1 A B t j j-1

P(i,j) x 0 x i-1 xi x i+1 x

Figure 5.1:

Mesh points for a numerical solution of the wave equation.

Thus the wave equation

utt = c2 uxx

becomes

ui+1,j 2ui,j + ui1,j ui,j+1 2ui,j + ui,j1 = c2 , 2 x t2


which can be re-arranged as

] [ ui,j+1 = 2ui,j ui,j1 + 2 ui+1,j 2ui,j + ui1,j ,


where

(5.9)

= ct/x. u

Equation (5.9) is a is known on rows

nite dierence representation of the wave equation,


and

and provided that

j1

then

ui,j+1

can be computed on row

j+1

from

(5.9) and thus the solution continued. On the zeroth row the boundary conditions and

u(x, 0) = f (x)

u(x, 0)/t = g(x)

are known, so that

fi ui,0

and

gi u/t

i,0

are also known at each node

on this row, and these are used to start the process o. Using a centred dierence we see that

gi =
Now (5.9) with

u t

=
(i,0)

ui,1 ui,1 . 2t

(5.10)

j=0

becomes

[ ] ui,1 = 2ui,0 ui,1 + 2 ui+1,0 2ui,0 + ui1,0 .


Since

(5.11)

ui,0 = fi

and

ui,1 = ui,1 2tgi ,

(5.11) now takes the form

ui,1 = (1 2 )fi +
Thus the basic strategy is to

) 2 ( fi+1 + fi1 + tgi . 2

(5.12)

compute row zero from ui,0 = fi , evaluate row one from (5.12), and then to march forward for general row j by (5.9).
101

1.4

1.2

t=0
1

0.8

t = 0.2 t = 0.4

u
0.6 0.4

t = 0.8

0.2

0.5

1.5

2.5

x
Figure 5.2:

Solution of wave equation example (with u(x, 0) = x exp 5(x 1)2 ), with x = 0.02,

= 0.5

for successive values of t.


utt = c2 uxx , c = 1,
for a semi-innite string (0

Example:

Solve the wave equation

with

x < ),

given the initial conditions

(a)

[ ] u(x, 0) = x exp 5(x 1)2 (x 0) u(x, 0)/t = 0 (x 0) u(0, t) = 0 (t 0)


Since

(string has a known initial displacement);

(b)

(string is initially at rest);

(c)

(string is xed at the point

x = 0).
needs to be specied. Figure 5.2 shows It can be seen that the solution splits

Solution.

gi = 0 u

in (5.12), only the one parameter

the solution of

for various

with

= 0.5

and

x = 0.02.

into two waves, one moving in the

+x

direction and the other in the

direction. At a given time We see that for

t = 0.8,

the

values are presented in Table 5.1 for various

with

x = 0.2.

<1

the solution is reasonably consistent, and we have errors of a few per cent. However, for the solution looks very suspect. It should be noted that the same using

= 4/3

x = 0.02

gives much

more accurate results (as expected because the mesh is much smaller) but the solution blows up for

> 1.
We can attempt an explanation for the apparent divergence of the solution in the example using Figure 5.3. The characteristics through the points

(xi1 , 0)

and

(xi+1 , 0)

are:

xi1 = x ct,

xi+1 = x + ct,

102

x u ( = 0.5) u ( = 0.8) u ( = 1) u ( = 4/3)

0 0 0 0 0

0.2 0.3487 0.3568 0.3652 0.4173

0.4 0.4665 0.4634 0.4682 0.4033

0.6 0.3318 0.3208 0.3105 0.2794

0.8 0.1340 0.1321 0.1322 0.1994

1.0 0.0272 0.0346 0.0408 0.0039

Table 5.1:

Table of values of u for a numerical solution for the example with x = 0.2 and t = 0.8.
P tp 1 t 0 i-1 -1 i i+1

Figure 5.3:

The rst rows of mesh points in the numerical solution of the wave equation.
P,

which can be solved to give, at the point

1 ctP = (xi+1 xi1 ) = x. 2


Recalling the work done on characteristics, we should require the new point to be of dependence dened by the interval

inside the domain

(xi1 , xi+1 ).

Hence we require

tP t,
so

ct 1. x
Indeed, a careful analysis, found in many specialist numerical analysis books, shows that this is precisely the condition for convergence of the method. The stringent condition on the timestep has always been considered to be a limitation of so-called

explicit methods of the type described


(Note that an

here, but such methods have the great merit of being very simple to program.

explicit technique for solving two variables u and v say, is one which gives rise to equations where u and v are explicitly given in terms of wholly known quantities. An implicit solution technique might give u and v in terms of known quantities and each other thus requiring some further work
in order to obtain values for

and

v.

As another illustration the single equation

u = sin x

denes

103

u
of

explicitly as a function of x but the equation u = sin (x u) denes u implicitly as a function


x).
As computers get faster, the very short timestep required for explicit methods is becoming

less of a problem, and vector or array processors allow nodes to be dealt with simultaneously, thus making such methods even more competitive. There are, however, clear advantages in the stability of calculations if an In Figure 5.1 the approximation to rows

implicit method is used.

uxx

may be formed by the average of the approximations from

j+1

to

j 1.

Thus

ui,j+1 2ui,j + ui,j1 c2 t2 ui+1,j+1 2ui,j+1 + ui1,j+1 + ui+1,j1 2ui,j1 + ui1,j1 . = 2x2
Assuming that form

is known on rows

and

j 1,

we can rearrange the equation into the convenient

2 ui+1,j+1 + 2(1 + 2 )ui,j+1 2 ui1,j+1 = 4ui,j + 2 ui+1,j1 2(1 + 2 )ui,j1 + 2 ui1,j1 .


The right-hand side of (5.13) is known, since it depends only on rows on row (5.13)

and

j 1.

The unknowns

j+1

appear on the left-hand side. The equations (essentially of the form

Ax = b

where

is a matrix and

x, b

are column vectors, with

being known and

the unknowns which we are

seeking) can now be solved simultaneously using Gaussian elimination or algorithms for tridiagonal systems. It can be shown that the method will proceed satisfactorily for any

, so that the timestep

is unrestricted. The evaluation of rows 0 and 1 is the same as for the explicit method, so this can reduce the accuracy, and clearly the algorithm needs a nite

region to allow the matrix inversion.

5.2 Numerical solutions to the diusion equation (parabolic)


As for the wave equation, except for the most straightforward problems, we must resort to numerical solutions of the heat-conduction equation. Even when analytical solutions are known, they are not always easy to evaluate because of convergence diculties near to singularities. They are, of course, crucial in testing the accuracy and eciency of numerical methods. We can write the heat-conduction equation

u 2u = c2 2 , t x
in the usual

(5.14)

nite-dierence form, using the notation of Figure 5.4.


j
and we wish to calculate the solution at In 5.1 we showed how to approximate the second derivative as

We assume that we know the solution up to timestep time step

j + 1.

ui+1,j 2ui,j + ui1,j 2u = . 2 x x2


104

t j+1 j i-1
Figure 5.4:

i+1

Mesh for marching forwards in the numerical solution of the heat conduction equation.
j
and

To obtain the time derivative, we use the approximation between rows

j + 1:

ui,j+1 ui,j u = . t t
Putting these into (5.14) gives

ui+1,j 2ui,j + ui1,j ui,j+1 ui,j = , 2 t c x2


or, on rearranging,

ui,j+1 = ui1,j + (1 2)ui,j + ui+1,j ,


where

(5.15)

= c2 t/x2 .

Equation (5.15) gives a nite-dierence representation of (5.14), and provided

that all the values are known on row

j,

we can then compute

on row

j+1

from the simple

explicit formula (5.15).


conditions give the values

This formula can only be used on the

inner mesh points but the boundary


xI = 1
for a domain

u0,j

and

uI,j

(where

is the size of the grid and so

0 x 1).

We will see this now in an example.

Example:
(a)

Solve the heat conduction equation

ut = c2 uxx ,

with

c = 1,

for a bar of conducting

material of length

subject to the boundary conditions: (a known initial temperature distribution);

u(x, 0) = x2 (0 x 1) u(0, t)/x = 0 (t 0) u(1, t) = 1 (t 0)

(b)

(the end

x=0

is insulated so no heat ow occurs through it);

(c)

(the end

x=1

is held xed at temperature

u = 1).

Solution.
so here

The condition (a) gives

ui,0 = x2 i

and this holds along the are

x-axis (as shown in Figure 5.5).


(for

If we choose

x = 0.2

then the values of

ui,0

02 , 0.22 , 0.42 , 0.62 , 0.82 , 12

i = 0, 1, ..., 5

and

I = 5).

The condition (c) immediately gives

u5,j = 1 and we therefore only need to interpret

condition (b). We can use a central dierence to deduce that

u x

x=0

u1,j u1,j =0 2x
105

u1,j = u1,j .

(5.16)

We are essentially adding a ctitious line of nodes at

i = 1.

The point

u1,j

must be eliminated using (5.10)). We

in a similar way to that done for the wave equation (where we eliminated use (5.15) with

ui,1

i=0

to obtain

u0,j+1 = u1,j + (1 2)u0,j + u1,j = (1 2)u0,j + 2u1,j ,


since

(5.17)

u1,j = u1,j .

Then we can nd all the points along the left boundary using (5.17), since the

right hand side involves known values (they are all at

rather than

j + 1). x=1

From Figure 5.5 it is axis, as well as along

clear that we have all the information required along the the

x=0

and

t=0

axis. We can then use (5.15) to solve for the interior points up until the appropriate

value to give us the required time. In Table 5.2 we show the results at

t=1

for various

and xed

x = 0.2.
expression

The number of

points used is determined from

t, u

which we nd from rearranging the with

= c2 t/x2 .

In Figure 5.6 we plot the solution

= 0.2.

Comparing this example with the numerical solution of the wave equation from 5.1, we observe similar behaviour for the explicit scheme, namely that the method will only converge for small enough timesteps or

From (5.15) it may be noted that the middle term changes sign at

0.5,

and above this value we might anticipate diculties (as shown in Table 5.2).

Indeed, some It is sucient

straightforward numerical analysis shows that convergence is certain for here to note that

< 0.5.

must not be too large.

j=2 t j=1

j=0

i=0

i=1

i=2 x

i=3

i=4

i=5

x x=1

u(x,0) = x i2

Figure 5.5:

Mesh for the example of the numerical solution of the heat conduction equation.
,
we can again look at an

To avoid the limitation on

implicit

formulation of the numerical

equations. Returning to Figure 5.4, the idea is to approximate the row

derivative by an average of

and row

j + 1.

This leads to (instead of (5.15))

ui1,j+1 + 2(1 + )ui,j+1 ui+1,j+1 = ui1,j + 2(1 )ui,j + ui+1,j ,


and is called the

(5.18)

Crank-Nicolson method.

We have the solution on row

j,

so the right hand

106

x u ( = 0.2) u ( = 0.5) u ( = 0.625)

0 0.9128 0.9160

0.2 0.9171 0.9202

0.4 0.9295 0.9320

0.6 0.9488 0.9507

0.8 0.9731 0.9740

1.0 1 1 1

1.3568 103

1.2922 103

1.0975 103

5.1857 102

4.1857 102

Table 5.2:

Table of values of u for a numerical solution for the heat conduction example.
Example for Heat Equation

0.8

0.6

u
0.4 0.2 0 1 0.8 0.6 0.4 0.2 0.4 0.2 0 0 0.6 0.8 1

Figure 5.6:

Solution of heat equation example, with x = 0.2, = 0.2 and t = 1.


j+1

side of (5.18) is known, and the row

have to be solved for simultaneously. Again this can be

written in matrix form, as discussed after equation (5.13) in the previous section.

5.3 Numerical solution of elliptic problems


Of the three classical partial dierential equations, the Laplace equation proves to be the most dicult to solve. The other two have a natural time variable in them, and it is possible, with a little care, to march forward either by a simple explicit method or by an implicit procedure. In the case of the Laplace equation (elliptic), information is given around the whole of the boundary of the solution region, so the eld variables at

all mesh points must be solved simultaneously.

This in

turn leads to a solution of the algebraic problem by matrix inversion. The usual numerical approximation for the partial derivatives, discussed in 5.1, are employed, so

107

that the equation

2u 2u + 2 = 0, x2 y
at a typical point, illustrated in Figure 5.7, becomes

(5.19)

ui+1,j 2ui,j + ui1,j ui,j+1 2ui,j + ui,j1 + = 0. 2 x y 2


For the case

x = y ,

rearranging gives

4ui,j = ui+1,j + ui1,j + ui,j+1 + ui,j1 .


This is the typical ve-point stencil and it should be noted that the middle value of its four neighbours. We now examine how (5.20) can be implemented.

(5.20)

ui,j

is the average

(i,j+1)

(i-1,j) (i,j)

(i+1,j)

(i,j-1)

Figure 5.7:

Five-point computational model for the Laplace equation.

Example:

Solve the Laplace equation (5.19) in the square region and the following boundary conditions:

0 x 1, 0 y 1,

with

x = y = 1/3

u(0, y) = 0,

u(1, y) = 1,

u(x, 0) = 0,

u(x, 1) = 0.

Solution.

For a rst solution we take the simplest mesh, illustrated in Figure 5.8, which contain

only four interior points labelled

u1 , u2 , u3 , u4 .

The four equations obtained from (5.20) are

4u1 = 0 + 0 + u2 + u4 4u2 = 0 + 1 + u3 + u1 4u3 = 1 + 0 + u4 + u2 4u4 = 0 + 0 + u1 + u3 ,

108

y 1 0.667 u=0 0.333

u=0

y j u=0

u4 u1

u3 u2

u=1 u=0 x

u=1

x u=0 i

0.333

u=0

0.667

Figure 5.8:

Meshes for the solution of the Laplace equation in this example: left is a simple mesh

containing 4 interior points; right is a larger mesh with 49 interior points.


which in turn can be written in matrix form (Ax

1 4 1 0 0 1 4 1 1 0 1 4
This has the solution

= b) as u1 u2 = u3 u4

0 1 . 1 0

u1 = 0.125, u2 = 0.375, u3 = 0.375, u4 = 0.125 which could be obtained using

Matrix inversion or Cramer's rule. Computationally both of these methods are not eective for large matrices and in practice some kind of elimination is used (e.g. Gaussian reduction or Successive Over Reduction (SOR)). A larger mesh obtained by dividing the sides up into eight equal parts is indicated in Figure 5.8. This generates 49 linear equations in 49 unknowns which can be solved by any convenient matrix inverter.

We have only considered

to be given on the boundary, and it is essential to know how to deal

with derivative boundary conditions where consider a typical example:

u/n

is given, since these are very common. Let us

u = g(y), x

on

x = 0.

We then insert a ctitious line of nodes, as discussed for the example in the previous section (after equation (5.16)). Approximately, the boundary condition gives

u1,j u1,j = gj , 2x
so that

u1,j = u1,j 2xgj .


109

(5.21)

Equation (5.20) is now solved for updated via (5.21).

i=0

as well as

i > 0,

but at the end of a sweep

u1,j

will be

Example:
spacing

Solve the Laplace equation (5.19) in the square region and the following boundary conditions:

0 x 1, 0 y 1,

with mesh

x = y = 1/4

u (0, y) = 1, x

u(1, y) = y 2 ,

u(x, 0) = 0,

u(x, 1) = x.

[The rst condition indicates a heat supply along this boundary and the last three conditions correspond to the temperature being given along these three sides].

Solution.

The region is illustrated in Figure 5.9. Since we have added the ctitious boundary

i = 1

there are 12 unknowns. Equation (5.21) just gives can write the equations as

u1,j = u1,j 1/2

for each

j.

From (5.20), we

4u0,1 = u1,1 + u1,1 + 0 + u0,2 = 1/2 + 2u1,1 + u0,2 4u1,1 = u0,1 + u2,1 + 0 + u1,2 4u2,1 = u1,1 + u3,1 + 0 + u2,2 ,
and so on, and hence obtain 12 equations in the 12 unknowns. These can be solved by any convenient method to give a solution as tabulated in Table 5.3.

i=0 j=4 j=3 j=2 j=1 j=0


0.0000 -0.1190 -0.1987 -0.1912 0.0000

i=1
0.2500 0.1114 0.0077 -0.0330 0.0000

i=2
0.5000 0.3067 0.1511 0.0516 0.0000

i=3
0.7500 0.4644 0.2384 0.0881 0.0000

i=4
1.0000 0.5625 0.2500 0.0625 0.0000

Table 5.3:

Data from the solution of the example using a step length of 0.25 in each direction. inhomogeneous
Laplace equation, namely the Poisson

Finally, note that if we were to have an equation

2 u uxx + uyy = f,
then the nite dierence approximation would become, instead of (5.20)

(5.22)

ui+1,j + ui1,j + ui,j+1 + ui,j1 4ui,j = h2 fi,j


where

(5.23)

fi,j f (xi , yj )

which is known.

110

y j=4 j=3 j=2 j=1 j=0 i = -1 ux = 1

u=x

u = y2

u=0 i=0 i=1 i=2 i=3 i=4

Figure 5.9:

Mesh used in the example with ux specied on the x = 0 boundary.

111

Vous aimerez peut-être aussi