Professional Documents
Culture Documents
+D=FJAH
Examples:
f (t) = (2, t, sin t), 0t< t 2 2 < t < . f (t) = (t3 , t, 3), f (t) = (2t2 , 2, 6t1 ),
OP
As t varies over it's range of values, P describes a curve in 3 dimensions. The equation
OP = r = f (t),
where
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).
z C r(t) y x P
Figure 1.1:
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)
relative to
is
AB = b a.
The point
and
AP = (b a)t,
where
OP = OA + AP ,
we have
r = a + (b a)t.
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
and the second term moves the point in a direction parallel to the line
AB .
The value of
) ,
(1.4)
A a r O
Figure 1.2:
B b
dn f dtn , e.g.
d2 f = dt2
) .
Example 1.3.1 Find the values for which a = (cos x, sin x, 0) satises the dierential equation
d2 a = 9a. dx2
a(t), b(t)
and
(t)
t:
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
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).
is described by
(1.5)
to symbolise the
be a particular point on
dr dt lies along the tangent to the curve in the sense in which the curve is described
as
z P r(t) dr dt
Figure 1.3:
Tangent to a curve:
dr dt
If the tangent at
is
dr dt at
t = t0 ,
then the
= 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)
piecewise smooth curve r = r(t) is one which is continuous and consists of a nite number of
1.7
Let
Arclength
be a parametric equation of a
ds dr = = dt dt
and so,
Dene
dx dt
)2 +
dy dt
(1.7)
s(t) =
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
t0 to r(t1 ) = OB .
t.
s(t0 ) = 0
and
s(t1 )
ds
satises
ds2 = dx2 + dy 2 + dz 2
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:
dt du
>0
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
(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
( dx )2
ds
( dy )2
ds
( dz )2
ds
( ds )2
ds
= 1.]
i.e. only
one
i.e.
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
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).
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.
where 0
1.10
Let
r(t)
in space, where
as being a
r(t)
v=
is tangent to
dr , dt P.
We recall also that
(1.11)
|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)
(where
is the time)
R with centre at the origin in the xy -plane and describes the motion of a v(t) = R ).
dr dt
= R sin ti + R cos tj
is tangent to
The
angular speed
(speed
a=
dv = R 2 cos i R 2 sin j = 2 r. dt
7
|a|
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.
ma a
It is clear that
v.
In the example,
|v|
is constant, but
|a| = 0
which
|v|.
C.
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)
r , the ( ) ds 2
dt
s r d 2 . dt
2
From this we see that if, and only if, the normal component is zero,
rate of change of
|v| =
|a| = |r |
d2 s dt2
d2 s dt2
r =
dr ds
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
of
P.
Solution.
is of the form
(1.16)
v=
Obviously
dr db =b+t . dt dt t db dt
(1.17)
is the velocity of
a=
db d2 b dv =2 +t 2 . dt dt dt
8
(1.18)
d2 b dt2
= 2 b
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
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
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
then
2m db dt
y b b x
Figure 1.6:
+D=FJAH
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:
x2 + y 2 < 1 x2 + y 2 1
is an open region.
is a closed region;
(1, 0)
(0, 0)
is an interior
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
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
10
y = f (x),
y = f (x)
pen from the page. This is represented by a curve in the A function of two variables
xy -plane.
z = f (x, y)
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 ,
n > 3.
f f (x + h, y, z) f (x, y, z) = lim x h0 h
and
f z
Note:
z
In the denition of
y,
x.
fz = xy. (1, 2, 3)
rst evaluate the partial and
derivative symbolically rst and then substitute in the values above example,
x = 1, y = 2
z = 3.
Thus in the
(x,y,z)=(1,2,3)
= 3 + 4 + 6 = 13.
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:
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).
fx , fy
and
fz
Example 2.3.2 Demonstrate the above results for f (x, y, z) = sin (ax + by + cz).
F = F (f, g, h)
f, g
and
h = h(x, y, z)
x, y
x, y, z
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)
F (x, y, z).
F (f, g, h)
and
G(x, y, z)
say, where
This way we could write the chain rule replacing the LHS of (2.3) the chain rule with and
G/z
G = G(x, y, z).
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
We will i.e.
r = (x, y, z)
xi + yj + zk,
(0, 0, 0)
(x, y, z).
On occasion
(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)?
, , x y z
x, y, z .
Consider a scalar
y = f (x).
x.
z = f (x, y).
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).
and
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.
any direction (not just parallel to the co-ordinate axes) and still be able to
We dene the directional derivative of
f (x, y, z) n
be a scalar eld.
in the direction of
any
f
vector
PP
n.
f (P ), f (P )
and
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,
in dierent directions; the directional derivative measures the rate of variation in the
n.
n. f
w.r.t. n!
14
0.8
0.6
z
0.4 0.2 0 4 3 2 2 1 1 0 0 3 4
Figure 2.1:
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.
f = f n = |f || | cos , n n
where
and
n.
value when
=0
(i.e. when
cos = 1).
This is the
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).
z = f (x, y),
has a max-
f (x, y)
in a 2D representation
has a local maximum (mountain top) the contours or level curves might look like those in Figure
15
f (x, y) = c, c
(x, y)
which
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)
f=2
"Valley"
w = f (x, y, z),
we cannot draw this in 4D. However, if we generalise the above, then the As
surface in space.
f = c.
This curve
C)
may be written
f =c
we have
That is,
f
Now
dr = 0. dt r.
From the results
f =c
and
r(t).
But
f =c
i.e.
and so grad f
= f
level surfaces.
y = f (x)
or a surface given by
z = g(x, y).
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
f.
f = c,
where
c arbitrary
ln(x2 + y 2 ) = c
x2 + y 2 = ec = ,
for arbitrary
= ec
x2 + y 2 = ,
Thus
=4 i
(2, 0) x
x2 + y 2 = 4 .
At
(2, 0),
the
direction). In addition
( f =
so at the point
2x 2y , 2 + y 2 x2 + y 2 x f |(1,0)
) ,
and so
= (1, 0).
y = f (x),
x0 ,
x0
x0 ,
x0 .
f (x)
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:
where
h = x x0 .
h1
h 1,
then
h2
h1
the rst
two (or three) terms on the RHS will be a good approximation for the LHS].
f (x, y, z),
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
(x0 , y0 , z0 )
in terms of quantities
(x0 , y0 , z0 ).
h, k, l 1.
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?
R.
R,
the
f1 f2 f3 + + . x y z
18
(2.9)
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)
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
div v = 0
is said to be a
3. If
v(x, y, z) is the velocity of a uid, then curl v is termed the vorticity and concerns whether
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).
= (x, y)
in this simple case the velocity vector only has two components.
and
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:
The mass of liquid passing through the left hand upright edge in the positive time (mass ux) is approximately
direction in unit
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 .
(v) y xy .
Hence the net ow of liquid out of the (innitesimally) small element of area
dx dy
is given by
20
where
dV
is the "volume" of the element (in this 2D problem it is the area of the element). This is
divergence:
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
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
(x, y, z)
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
= 0. =0
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 + 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
1234.
Now write all the velocity components as Taylor series about 1 is (approximately) and along 4 is
(x, y)
along 2 is
u(x, y + dy/2).
along 1: along 2:
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).
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
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)
z -direction).
vector
Example 2.7.3 A uid has velocity eld u = (x+z, y2 , 0). Check whether the ow is incompressible
and/or irrotational.
d2 y dx2 ( 2 d
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,
i +j +k = x y z
is called the
, , x y z
) ,
(2.12)
vector operator
= grad ,
and we think of eld
(2.13)
(x, y, z).
and likewise
v = curl v.
As with the
(2.15)
operator,
23
+D=FJAH !
b
a
the limits of integration which physically corresponds to getting the area under the curve between
and
a
Integration is merely a
f (x) dx = lim
m i=1
f (xi )xi .
(3.1)
y y = f(x)
Figure 3.1:
b
a
f (x) dx =
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.
with
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
C s A P2 P1 P3
Figure 3.2:
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)
(x, y, z)
tion. The last equality comes from the fact that because the curve along the curve each of
x, y , z
is a function of
C.
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
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)
ds
Summarising:
of integration terms of
r = r(t),
ds =
and
ds dt in
ds
z O x A(1,0,0)
Figure 3.3:
B(0,1,0) y
Remarks:
(i) The line integral along a curve
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
closed
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
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 .
(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
[Hint:
x = a cos , y = b sin , z = 0,
0 2 ].
C.
Let
along
C.
We dene:
I=
C
f ds, t
(3.6)
along
C.
r = r(s)
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
f dr.
C
(3.9)
is the velocity eld vector the circulation about a closed curve i.e.
u dr
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
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
r = r(t)
is a
dummy parameter:
r = r()).
t.
dr =
dr dt dt
= r (t)dt
ds
dt
in the case of
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
=
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.
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
( ) ( ) f dr = f r(b) f r(a) .
(3.10)
28
f dr
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
( ) ] 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 = .
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
f dr is independent of path.
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
F dr
is independent of path.
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)
2. If we know that
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,
= F.
= = 0. k
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
F = .
If
F = (P, Q, R)
( =
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.
v = gk
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
So
such that
F = = x2 , y
or
(i)
= 2xy + z 3 , x x
gives
(ii)
(iii)
= 3xz 2 . z
= 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
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
r(a) = r(1) =
(2, 2, 1)
and
F dr =
C
dr = (r(b)) (r(a))
C
f ds
f ds = i
C
where
f1 ds + j
C
f2 ds + k
C
f3 ds,
C
f = (f1 , f2 , f3 ).
three scalar line integrals (which we saw how to deal with in 3.1).
31
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.
inner integral:
q(x)
f (x, y) dy,
p(x)
while holding
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
b
a
q(x)
b { f (x, y) dy 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.
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
xy dy dx.
/4 y 0
sin y dx dy. y
in
xy
space as shown
in Figure 3.4.
and
from 1 to
n.
(xk , yk )
k th
32
x
Figure 3.4:
Jn =
where
n k=1
f (xk , yk )Ak , n
tend to innity:
Ak
k th
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
Rf
diculty in evaluating area integrals is in choosing the limits of integration to correspond to the region of integration
R.
dA
instead of
Rf
dA
R xy dA
where R is the square formed by the points (0, 0), (1, 0), (1, 1), (0, 1).
R xy dA
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:
so the
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)
x (1, 0)
Figure 3.5:
Note again that in performing the integration w.r.t. strips and the limits on
Alternatively, we can reverse the order of integration noting that in this case the region by the inequalities:
R is described
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.
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
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:
f = f (x, y)
the equation
z = f (x, y)
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
z = f(x,y)
R x
Figure 3.7:
R
This give the area of a region
R,
i.e.
Area of
R=
R
1 dx dy.
I=
0
To evaluate this integral we let correspondingly. Thus the limit
x = sin x=1
so
corresponds to
= /2
x=0
corresponds to
35
= 0.
Thus
I=
0
/2
/2
cos2 d =
0
/2
1 (1 + cos 2) d = . 2 4
Thus in general if
I=
b
a
x = x(),
we write:
f (x())
dx d, d
where
x() = a
and
x() = b.
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
f (x, y)dxdy =
R
where
(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
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.
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
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
(u, v)
du dv
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 =
36
(x, y)
(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
= r cos2 + r sin2 = r.
f (x, y) dA =
R
f (r cos , r sin )r dr d.
G
(3.14)
I =
Ry
2 dx dy
i.e. in terms of
(x, y)
and
(r, ).
x = r cos ,
y = r sin .
domains:
As we are dealing with a quarter circle in the rst quadrant we have the following
(1, 0)
Figure 3.8:
(1, 0)
(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
u = r,
v=
x = r cos , y = r sin
J = r.
Considering
in the
(x, y)
quadrant
37
(r, )
space if
0r1
and
0 /2.
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).
f (x, y, z)
is
volume of space V .
Then we break
V ,
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,
dV = dx dy dz .
f dV
is often
f dV .
f dx dy dz
(i.e. one higher dimension than that shown in Figure 3.7). gives an integral
f (x, y, z) 1
1 dV
V.
with density
= (x, y, z)
mass in V
is
mass
=
V
dV =
V
(x, y, z) dx dy dz.
38
If the density
mass
=
V
dx dy dz = V
mass
= density volume.
repeated integrals.
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)
V (y
+ z 2 ) dV
f (x, y, z) dV
(x, y, z)
to
(u, v, w)
with
z = z(u, v, w),
then
f (x, y, z) dx dy dz =
V
where
f (u, v, w) |J| du dv dw
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
(u, v, w)
space corresponding to
in the
xyz -space.
Again we transform:
(ii) Each
(x, y, z)
in
f (x, y, z)
is written in terms of
(u, v, w)
g(u, v, w));
(iii) The dierential volume element
dV = dx dy dz = |J| du dv dw.
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
dV = r dr d dz.
z (r, , z) P(r, , )
z y r x (a) Cylindrical
Figure 3.9:
y x (b) Spherical
Spherical co-ordinates
Let
(x, y, z),
let
the point
P,
let
OP
z -axis
(and so
0 )
and
be see
xz -plane
and the
z -axis
(and so
0 2 ),
Note:
in cylindrical 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:
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
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
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
Sk
(xk , yk , zk )
f dS
where
dS
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
(u, v)
are
uv -plane
(x, y, z)
u, v .
If
a family of
co-ordinate
curves by holding
u.
S.
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 .
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
S1
to a point in
S2
crosses
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:
dened parametrically by
r = r(u, v).
At any point on
S,
the vectors
r u and
This
ru
and
rv )
are
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
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
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).
Let
or
P0 P1 P2 P3
dS P0 P1 P0 P3 .
Now, since
ru
and
rv
lie parallel to
P0 P1
and
P0 P3
r du, P0 P1 u
Thus in the limit as
r P0 P3 dv. v
du, dv 0
dS =
r r r r du dv = ru rv du dv. du dv = u v u v
43
(3.19)
v curve
A surface element dS .
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.
be a surface with
r = r(u, v).
Let
(u, v)
space corresponding to
points on then
S.
If a scalar eld
(x, y, z)
f (z, y, z)
S,
we have
= (u, v)
f = f (u, v).
(3.21)
(3.22)
Remarks:
By writing
(u, v)
and
f (u, v)
we really mean
and
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 |
44
f dS
We dene
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)
vector functions.
if
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
y = a sin u sin v, 0 u , 0 v 2 .
z = a cos u,
Of course
is constant and
(u, v)
are just
(, )
(r, , )
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
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
, z .
not
(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,
w.r.t.
u, v
are
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
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
xy -plane
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
yz -plane
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
xz -plane
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
by
and
z = 0.
Now
ru = (1, 0, 2u),
and so
rv = (0, 1, 2v),
z 2 S z=2-u
2
- v2
u (= x)
Figure 3.14:
On
S , r = (u, v, 2 u2 v 2 )
and so
r dS =
S
r (ru rv ) du dv =
R
(2 + u2 + v 2 ) du dv.
R
in (3.25)
R).
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)
S S
with with
2 u2 v 2 = 0
which implies
(u, v)
u2 + v 2 = 2,
2 u 2.
to be the
2 u2 v 2 u2 .
2
2u2
(2 2u2
+ u2 + v 2 ) du dv = 6.
u = r cos ,
where
0r
2, 0 2 . r dS =
2
(2 + r )r dr d =
2 0
r4 r2 + 4
] 2 d =
0
3 d = 6.
47
is given by
z = g(x, y).
Then
u=x
and
v=y
dS =
S
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
dS =
S
x = g(y, z)
y = g(x, z).
S (xy + z) dS
Figure 3.15:
48
Definite Integral
Line Integral
Greens Thm
(in plane, 2D) Double Integral
Stokes Thm
Surface Integral
Divergence Thm
Volume Integral
Figure 3.16:
We will look at three theorems, the Divergence Theorem (Guass' Theorem), Green's Theorem in two dimensions and Stokes' Theorem.
=
S
f dS, S ".
with
becomes
(u) dS =
S
(u) dV.
V
Now the LHS is the mass ux of liquid across the surface the surface
S,
(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 .
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:
constant and
u = 0.
Therefore
(u) dV = 0
(If the volume is
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).
f dS
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, , )
0 r a, 0 , 0 2 .
x = r sin cos ,
Thus the integrand
y = r sin sin ,
z = r cos .
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
Exercise: Verify the divergence theorem when f = r = (x, y, z) and S is the sphere x2 +y2 +z 2 = a2 .
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
Remarks:
1. The integral is taken along the
entire
boundary
or
such that
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
(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
f1
and
f2
such that
f2 f1 = 1. x y
(i) Let
f1 (x, y) = 0
and
f2 (x, y) = x.
dx dy =
R
Note that the RHS can be written as
x dy.
C
(3.30)
f dr
where
f = (0, x).
says that
f1 (x, y) = y
and
(3.31)
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
xy dx+x2 y 3 dy
Solution.
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.
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
52
y 2 y=2x R 1
Figure 3.18:
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
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.
is the curve
x 2 + y 2 = a2
0 t 2.
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)
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
i f =
x
j
y
k
z
x2 y
0
54
( f ) dS =
S
( f )(, ) (r r ) d d
R
= a
2 2
/2 [
Note:
1. In the above example we used the following indenite integrals:
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
x2 + y 2 a2 .
In Stokes' theorem, it does not matter which open surface we use as long
C.
xy -plane
(label it
D)
dS = k dx dy
the direction
xy -plane
= r cos , y = r sin ). x dx dy =
2 2
(x,y) (r,)
= r) cos2 d = a4 . 4
a4 r cos r dr d = 4
2 2
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
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:
The surface
is the plane
Hence
i rx ry =
k = (1, 1, 1),
1 0 1 0 1 1
and
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.
is described by
0 y 1 x, 0 x 1.
F dr =
C
1 1x 1 1x 0 1[ 1 0
y 2xy y 2
dx
1 (x2 x) dx = . 6
56
+D=FJAH "
elasticity, heat transfer, chemical reactions, electromagnetic theory and other areas of study lead to
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
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
2.
57
3.
2u 2u + 2 =0 x2 y
4.
2u 2u + 2 = f (x, y) x2 y 2u 2u 2u + 2 + 2 =0 x2 y z
5.
6. Here (with
h2 2 + v(x) = ih 2m t
are known constants,
(Schrdinger equation)
c, h, m
x, y, z
u = u(x, t),
A
u = u(x, y)
solution
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.
x, y, z, t
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
partial
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
innite
+
2u ). y 2
number of solutions.
Suppose that
u1 , u2 , u3 , ...
L[u] = 0 (L
2u x2
L[u] =
n=1
an u n ,
58
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
f (x, t)
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
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.
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.
u = u(x, y)
du dx
the equation
u x
=0 u
can be solved using ODE techniques. = constant but allow this "constant" where
=0
y. x.
u x
=0
is
u = a(y)
a(y)
is any function of
but
u = a(y)
u x
= 0.
(ii)
u = x, x
(iii)
u + u = 0, x
(iv)
2u + u = 0, y 2
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 .
u(x, y)
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
encloses the region within which we are trying to solve the equation. There are three common types of boundary condition.
1.
2.
of the normal to the bounding curve is given at every point on the boundary. (Recall
3.
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.
They lead to families of characteristic curves for each type which can help to solve the PDEs. We start by considering the dierential equation
( ) u u x, y, , . x y
(4.1)
60
where
u(x, y)
and
N (x, y) =
s,
i.e.
dy ds , ds
t ) dx
t n
u u dy u dx = N (s) = n u = + . n x ds y ds
We can also write
(4.2)
(4.3)
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)
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
where
x.
Ax = b
A1
= 0]. u
Thus these three inhomogeneous equations can be solved for the second partial derivatives of
unless
0
dy ds
= 0,
2B
61
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
( A(x, y)
)2
(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
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.
If the characteristics are to be real curves, we clearly must have condition are called
B 2 > AC .
utt = c2 uxx .
If
B 2 AC = 0
ut = c2 uxx .
If
B 2 AC < 0
the equation is
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
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
Figure 4.1:
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)
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
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
specifying
u.
u t .
64
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
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)
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.
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
u(x, 0) = f (x),
(x)
along the
t = 0.
Boundary conditions describe the temperatures in the rod at the ends (which are
65
u(0, t) = 0,
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.
(x)
(t).
2
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.
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
require the initial velocity in the string. It is possible to have dierent situations with the same initial displacement but dierent initial velocity.
Separation of variables.
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.
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
66
4.
2 T = 0
u(x, y) + iv(x, y)
i.e.
2 u = 0
and
2 v = 0.
5.
Numerical techniques
nite
y = y(x)
h(x)k(y)
where
(4.15)
f (x), h(x)
x,
and
y.
If the equation
h(x)g(y)
to obtain
dx
straightforward integration:
k(y) dy = g(y)
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
exactly
dy dx
(4.18)
d2 y = n2 y, dx2
where
(4.19)
(4.20)
and
The equation
d2 y = n2 y, dx2
where
(4.21) or equivalently
y = Cenx + Dnx ,
where
(4.22)
A, B, C, D
f (x)
and
l x l f
and
f (x)
interval
[l, l]
2l,
then
(4.23)
1 An = l
1 Bn = l
f (x) sin
l
nx dx. l
(4.24)
f (x)
is an
f (x) = f (x)
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
f (x) = f (x)
sine series:
with
f (x) =
Bn sin
nx , l
Bn =
2 l
f (x) sin
nx dx. l
(4.26)
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],
l,
inside
[0, l]
[0, l].
2l
the form of a fourier half range sine (or cosine) series using the above results.
69
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,
u alpha P T1 Q
beta T2
x
Figure 4.2:
x+
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:
70
These assumptions are such that we may expect that the solution
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
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
(4.27)
T1 sin
and
T2 sin
T1
and
T2 :
is directed downwards.
By Newton's second law the resultant of those two forces is equal to the mass times the acceleration
utt ,
and
x + x:
here
(4.28)
tan
and
tan
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
depends also on
t.
Dividing (4.28) by
x,
we
) =
x
2u . T t2
If we let
2u 2u = c2 2 , t2 x
where
or
utt = c2 uxx ,
c2 =
It is parabolic as we showed in 4.2. The notation to indicate that this constant is positive.
71
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).
f (x)
g(x),
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)
First Step:
product method,
or
we shall
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
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
and
t):
G F = . c2 G F
The expression on the left involves functions depending only on involves functions depending only on
x.
k.
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,
(4.33)
and
G c2 kG = 0.
In these equations,
(4.34)
F = F (x)
and
G = G(t).
k,
Second Step:
We will now determine solutions conditions in (4.30), that is
and
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,
and therefore
F (0) = 0;
For
F (l) = 0.
(4.35)
k=0
F = ax + b,
a = b = 0.
F = 0,
u = 0.
For positive
k,
i.e.
k = 2 ,
F = Aex + Bex ,
73
F = 0,
k = p2 .
F + p2 F = 0,
and the general solution is (see (4.20))
F (0) = C = 0
We must take
and
Hence
D = 0
since otherwise
F = 0.
pl = n
i.e. p = n/l
(4.36)
Fn (x) = Dn sin
which satisfy (4.35) and the constants
n = 1, 2, 3, ...,
(4.37)
Dn
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 ,
G + 2 G = 0 where n = cn/l. n
The general solution is
are given by
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
nx , l
n = 1, 2, 3....
Third Step:
Clearly, a single solution,
un (x, t) will,
Now, since the one-dimensional wave equation is linear and homogeneous, it follows from Theorem
74
un
obtain a solution that satises (4.31) and (4.32), we consider the innite series
u(x, t) =
n=1
un (x, t) =
n=1
nx . l
(4.38)
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
u(x, 0)
f (x),
namely, the
f (x);
that is
2 Bn = l
f (x) sin
nx dx, l t
n = 1, 2, 3....
(4.40)
u t
t=0
= =
nx ) l t=0
nx = g(x). l
Bn
must be chosen so that, for
t = 0,
u/t
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)
u(x, t) =
n=1
nx , l utt = c2 uxx
that satises the
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
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
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)
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.
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
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
76
x = 1
and
x = 1
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)
u = h(),
where
h()
is an arbitrary function of
we have
u=
where
h() d + (), ,
say
()
is an arbitrary function of
(),
the solution
is of the form
u = () + ().
Because of (4.42) we may write
(4.44)
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
ut (x, 0) = 0
u(x, 0) = f (x).
u = c (x + ct) c (x ct), t
where primes denote derivatives with respect to the
(4.45)
From (4.44), (4.45), and the initial conditions we have two equations in two unknowns:
(4.46) (4.47)
= .
Hence
= + k,
for
2 + k = f
Then
or
1 = (f k). 2
= 1 (f + k) 2
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.
initial conditions and the boundary conditions determine the solution uniquely.
Exercise:
ut (x, 0) = g(x).
ut = c2 2 u,
where
c2 = K
K ,
is the specic
u(x, y, z, t)
heat capacity,
is the Laplacian of
with respect to
Cartesian coordinates
x, y, z ,
i.e.
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
x-direction only.
Then
second
partial derivative
utt ,
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
lateral sides of the bar are perfectly insulated (with some lagging material) so
We will also assume that the temperature
in the
and
t,
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
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
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
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
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
u u
is the is the
t.
i.e.
t.
The
the increase in heat in the element in unit time) is thus given by heat energy in the element in time
is:
(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
(4.53)
The
t's
x 0
to get:
(4.54)
(4.55)
in terms of
(4.56)
c2 =
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 .
T.
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,
x=0
is
u(0, t),
ux (0, t) h1 u(0, t) = 0,
where
t > 0, h1 = 0
(4.59)
h1
corresponds to an
h1
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
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.
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.
l.
c2 uxx = ut .
Let us start with the case when the ends Then the (homogeneous)
(4.62)
x=0
and
x=l
Let
f (x)
initial condition
is
u(x, 0) = f (x),
where
(4.64)
f (x)
is a given function.
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
x.
Dividing by
we have
(4.66)
82
t,
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.
k0
we
u = FG
u = 0.
k = p2
F + p2 F = 0,
and
(4.67)
G + c2 p2 G = 0.
(4.68)
Second Step:
The general solution of (4.67) is
(4.69)
u(0, t) = F (0)G(t);
Since that
u(l, t) = F (l)G(t) = 0.
and
G0
implies
u 0,
F (0) = 0
F (l) = 0.
F (0) = A
and so
A = 0,
B = 0,
since otherwise
F 0. i.e
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
p = n/l
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
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
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)
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)
f (x),
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).
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
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:
2 u = 0,
where, with respect to cartesian co-ordinates
(4.74)
x, y, z
in space,
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
of complex analysis exploiting the fact that the real and imaginary parts of valued function
any
analytic complex
problems involving the two dimensional Laplace's equation reduce to exercises in complex variable theory.
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
2 = 0.
/t 0
f (y)
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:
Problem Formulation
The mathematical problem can be formulated as follows (PDE and boundary conditions):
(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
0xa 0 y b,
(4.76) (4.77)
f (y)
is a known function.
86
initial conditions were then used to solve for the superposition constants.
initial conditions as the problem is time independent.
f (y) = 0
In the
solution everywhere. In fact, the method which we are about to develop will work when we have precisely
and
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
(4.78) (4.79)
x = constant
y = constant
(4.77)), while if the inhomogeneous condition were on separation constant of opposite sign. Equation (4.78) leads to the following solution:
y = b,
(4.80)
A=0
(4.81)
87
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
En .
Thus, on
x = a,
f (y) =
n=1
En sinh
na ny sin , b b
(4.84)
na 2 En sinh = b b
and so
f (y) sin
ny dy, b
2 En = b
b
0
(4.85)
2y
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
8 sin n 2 . En = 2 2 n sinh 3n 2
88
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).
f (s) =
a
where
f (x)K(s, x) dx, x
(4.86)
K(s, x)
is a
known
function of
and
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
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).
1. Select the appropriate transform (depending on the equation and especially the boundary conditions).
and the boundary conditions by the kernel and integrate between the
89
f (x)
or
f (t).
The denitions
f (s, t), or the "x" variable would be unaected and the transform would
f (x, s).
f (x)
(satis-
f ()
is dened to be
f () =
where
f (x)eix dx,
(4.87)
i2 = 1.
eix .
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)
The notation
F(f ) = f and F1 (f ) = f
(i)
For
f, g
any trans-
F1 .
as
(ii)
If
x ,
then
90
Proof:
F
df dx
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.
d2 f dx2
from the
= (i)2 f ().
(iii)
Fourier convolution.
f g
f (x ) g() d,
Recall that
then
g F(f g) = f ()()
or
f g = F1 (f g ).
and
F1
another so that
FF1 = F1 F
(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.
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
> )
s = + i
is
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
(i)
For
f, g
any trans-
L1 .
as
(ii)
t +,
then
n=1
and
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.
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
another so that
LL1 = L1 L
92
(iv) For reference purposes, we list some other less important properties:
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
H(t) = 0
if
t < 0, H(t) = 1
t > 0.
constant coecients.
If
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
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, ),
(, )
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)
by using integral
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
x.
of course.
93
cux + ut = 0
where
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
(4.91)
[ ] u(0, s) = L ect =
The initial condition is
e(sc)t dt =
1 . sc
(4.92)
u(x, 0) = ex
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)
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)
A=0
nd that
(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.
u(x, 0) = f (x),
u(x, t) = f (x ct)
c.
94
c2 uxx = utt
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.
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
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
L[uxx ] =
Furthermore, from 4.7.4 we nd that
2u (x, s). x2
c2
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)
u(x, t)
95
u(x, s) = A(s)e
where
sx/c
+ B(s)e
sx/c
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
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
, 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) =
where
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)
(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 .
(4.101)
96
u(, ) = 0
B() = 0.
Accordingly we have
u(, y) = A()ey ,
where
(4.102)
A()
(4.103)
As
f (x)
A()
in principle,
f (x).
F[f (x)] =
f (x)eix dx,
(4.104)
u(, y) = e
To nd the solution
f (x)eix dx.
(4.105)
u(x, y)
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)
97
+D=FJAH #
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
4x = 3x + 5,
is simple to nd mainly because the equation is linear in the unknown linear in the unknown
x.
x,
we cannot in general solve it except for certain well known special cases
2x2 + 3x = 1).
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
f (x) = 0,
f (x)
as a function of
x,
and from
f (x) = 0,
x-axis.
would also work for the linear equation above but it is of course not necessary in such situations. Also note that
linear
unique
x2 = 1).
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.
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
For example,
suppose we wish to solve the heat equation for heat ow in a bar of length
l.
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
and we will not have solutions at every point in time but at a discrete number of time intervals (e.g.
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)
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
where
O(h2 ) h
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 ).
O(h2 )
Exercise:
df /dx
is
O(h).
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
(5.6)
xi = xi1 + x,
and then we use a forward dierence at the point
B:
u x
)
A
ui,j ui1,j , = x
ui,j = u(xi , tj ).
The second
(5.7)
(5.8)
t t j+1 tj t j-1
Figure 5.1:
utt = c2 uxx
becomes
(5.9)
= ct/x. u
j1
then
ui,j+1
j+1
from
(5.9) and thus the solution continued. On the zeroth row the boundary conditions and
u(x, 0) = f (x)
fi ui,0
and
gi u/t
i,0
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
(5.11)
ui,0 = fi
and
ui,1 = (1 2 )fi +
Thus the basic strategy is to
(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
Example:
with
x < ),
(a)
(b)
(c)
x = 0).
needs to be specied. Figure 5.2 shows It can be seen that the solution splits
Solution.
gi = 0 u
the solution of
for various
with
= 0.5
and
x = 0.02.
+x
t = 0.8,
the
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
0 0 0 0 0
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,
(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
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.
u = sin x
denes
103
u
of
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
uxx
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,
and
j 1.
The unknowns
j+1
Ax = b
where
is a matrix and
x, b
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
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
u 2u = c2 2 , t x
in the usual
(5.14)
j + 1.
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
j + 1:
ui,j+1 ui,j u = . t t
Putting these into (5.14) gives
(5.15)
= c2 t/x2 .
j,
on row
j+1
u0,j
and
uI,j
(where
0 x 1).
Example:
(a)
ut = c2 uxx ,
with
c = 1,
material of length
(b)
(the end
x=0
(c)
(the end
x=1
u = 1).
Solution.
so here
ui,0 = x2 i
If we choose
x = 0.2
ui,0
i = 0, 1, ..., 5
and
I = 5).
u x
x=0
u1,j u1,j =0 2x
105
u1,j = u1,j .
(5.16)
i = 1.
The point
u1,j
in a similar way to that done for the wave equation (where we eliminated use (5.15) with
ui,1
i=0
to obtain
(5.17)
u1,j = u1,j .
Then we can nd all the points along the left boundary using (5.17), since the
rather than
j + 1). x=1
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
t, u
= c2 t/x2 .
= 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).
straightforward numerical analysis shows that convergence is certain for here to note that
< 0.5.
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
implicit
derivative by an average of
and row
j + 1.
(5.18)
Crank-Nicolson method.
j,
106
0 0.9128 0.9160
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:
written in matrix form, as discussed after equation (5.13) in the previous section.
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
2u 2u + 2 = 0, x2 y
at a typical point, illustrated in Figure 5.7, becomes
(5.19)
x = y ,
rearranging gives
(5.20)
ui,j
is the average
(i,j+1)
(i-1,j) (i,j)
(i+1,j)
(i,j-1)
Figure 5.7:
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
u1 , u2 , u3 , u4 .
108
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
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
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.
u/n
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
(5.21)
i=0
as well as
i > 0,
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
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=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
2 u uxx + uyy = f,
then the nite dierence approximation would become, instead of (5.20)
(5.22)
(5.23)
fi,j f (xi , yj )
which is known.
110
u=x
u = y2
Figure 5.9:
111