Chapter 4 PDE
Chapter 4 PDE
Chapter 4 PDE
Walton
In this section we will consider second order partial differential equations (pdes). The three main
equations we will study are
2u
t2
u
t
2
4.1
c2 2 u, Wave equation,
2 u, Heat equation,
f (r),
Laplace/Poisson equation.
For this discussion we will restrict ourselves to the one-dimensional version of the equation, namely
2u
2u
= c2 2 .
2
t
x
4.1.1
(1)
Consider the following problem. Solve (1) for u(x, t) subject to the boundary conditions
u(0, t) = u(L, t) = 0, (t 0)
(2)
f (x), (0 x L),
(3)
0, (0 x L).
(4)
X 00 KX = 0.
(5)
The form of the general solution depends on whether K is positive, zero or negative. Lets consider those
cases in turn.
(i) K > 0. In this case the general solution of (5) is
A. G. Walton
10
-3
-1
-2
-5
-10
X(L)
0 A = 0,
0 B = 0 or sinh( KL) = 0.
Neither of these options are acceptable: the first leads to X identically zero, while a consideration of the
graph of sinh x (figure 1) shows that no such positive value for K exists. We therefore conclude that for
these boundary conditions the constant K cannot be positive.
(ii) K = 0. In this case the solution of (5) is
X = ax + b.
Again, if we apply X(0) = X(L) = 0 we see that no non-zero solution is possible.
(iii) K < 0. It is convenient to set K = 2 . Now the general solution of (5) is
X = A cos x + B sin x.
Applying the boundary conditions
X(0) = 0 A = 0,
as before, but now the condition X(L) = 0 leads to
sin L = 0,
for which there are an infinite number of solutions:
=
n
, n = 1, 2, . . . .
L
(6)
A. G. Walton
A solution that satisfies the wave equation and conditions (2), (4) is therefore
yn = XT = n sin(nx/L) cos(nct/L)
where we have introduced n = Bn Cn . Since the wave equation is linear it follows that any linear
combination of the solutions for different n is also a solution. The most general solution is therefore of
the form
X
n sin(nx/L) cos(nct/L),
u(x, t) =
n=
bn sin(nx/L) cos(nct/L),
(7)
n=1
where we have written bn = n n . We have one more initial condition to apply - the condition that
u = f (x) when t = 0. Imposing this, we see that f (x) is related to the unknown coefficients bn in the
following way:
nx
X
f (x) =
bn sin
, (0 < x < L).
L
n=1
We recognize this as a half-range Fourier sine series for f (x). Our Fourier series studies of section 2 have
shown us that
Z
nx
2 L
f (x) sin
dx,
(8)
bn =
L 0
L
and so can be computed for a given f (x). The required solution to the wave equation is therefore given
by the infinite sum (7), with the coefficients bn calculated from (8).
Example
Solve the wave equation subject to
u(0, t) = u(L, t) = 0 for t 0,
u(x, 0) = 0 for 0 x L,
u
(x, 0) = g(x) for 0 x L.
t
4.1.2
(9)
(10)
We take the Fourier transform in x of the differential equation, using property (vii) from section 3.2.
This gives
2u
b
= c2 2 u
b,
t2
where u
b(, t) is the Fourier transform of u(x, t). The general solution is
u
b(, t) = A() cos(ct) + B() sin(ct).
40
,
25 + 2
A. G. Walton
40
cos(ct).
25 + 2
(11)
Now to find the inverse transform of the second term we can use the result from section 3.5.3 that
F{cos(0 x)} = ( + 0 ) + ( 0 ),
where is the Dirac delta function. Then using the symmetry formula (property (vi) in section 3.2) it
follows that
F{(x + 0 ) + (x 0 )} = 2 cos(0 ),
and hence
F 1 {cos(0 )} =
1
1
(x + 0 ) + (x 0 ).
2
2
1
4e5|x| ((x + ct) + (x ct))
2
Z
Z
5|xs|
= 2
e
(s + ct) ds + 2
e5|xs| (s ct) ds
2e5|x+ct| + 2e5|xct| ,
with the last line following from the sifting property of the delta function (section 3.5.3).
4.1.3
1X
n
n
1X
u(x, t) =
(x + ct) +
(x ct) ,
bn sin
bn sin
2 n=1
L
2 n=1
L
Similarly, the solution we obtained by Fourier transforms also depends on the combination of variables
x ct and x + ct. The functional dependence on these quantities indicates that in both cases the solution
is the sum of a left-travelling (x + ct) and right-travelling (x ct) wave, with both waves propagating at
speed c. This observation provides us with some motivation for the following study which results in the
derivation of the general solution of the wave equation.
We introduce new variables
= x + ct, = x ct.
The partial derivatives transform as follows:
t
We can then calculate
2u
x2
=
=
=
=
+
=
+
,
x
x
+
=c
c .
t
t
u
u u
( )=
+
+
x x
2
2
2
u
u
u
+2
+ 2,
2
A. G. Walton
and
2u
t2
u
u
u
c
( )= c
c
c
t t
2
2
2
u
u
u
c2
2
+ 2 .
2
=
=
becomes
4c2
2u
= 0,
The equation is said to be in its canonical form. This equation can be integrated once with respect to
to give
u
= f 0 ()
where f 0 is an arbitrary function of . Integrating again, this time with respect to , we obtain
u = f () + g(),
with g an arbitrary function of . The general solution of the wave equation therefore has the form
u = f (x ct) + g(x + ct),
and so can always be written as the sum of right and left travelling waves.
4.1.4
The same technique used for the wave equation can be used to simplify other partial differential equations.
Consider the most general constant coefficient linear pde of 2nd order:
auxx + buxy + cuyy + rux + suy + qu = f (x, y).
(12)
=
=
X
x
X
y
u
Y u
u
u
+
=
+
,
X
x Y
X
Y
u
Y u
u
u
+
=
+
,
X
y Y
X
Y
and so
2u
x2
2u
y 2
2u
xy
=
=
=
2u
u
u
2u
2u
=
+
+
,
+
+2
2
2
X
Y
X
Y
X
Y
XY
2u
u
2u
2u
u
+ 2
+ 2
= 2
+
+
,
2
2
X
Y
X
Y
X
Y
XY
u
2u
u
2u
2u
=
+
+
.
+
+ ( + )
2
2
X
Y
X
Y
X
Y
XY
Substituting these expressions into the pde (12) and gathering together like terms we get
2
2u
2u
2 u
+
(a
+
b
+
c
)
+
(2a
+
(
+
)b
+
2c)
X 2
Y 2
XY
u
u
+(r + s)
+ (r + s)
+ qu = F (X, Y ),
X
Y
(a + b + c2 )
(13)
A. G. Walton
where F (X, Y ) = f (x, y). We can simplify this equation by eliminating the coefficients of uXX and uY Y .
This can be achieved by choosing , to be the roots of the quadratic equation
c2 + b + a = 0.
The previous analysis is only consistent if the roots are real and distinct, i.e. we require our pde to have
the property
b2 4ac > 0.
We will come back to this point shortly. Assuming that this condition is satisfied our pde (13) can be
written in the simpler form
(2a + ( + )b + 2c)
u
u
2u
+ (r + s)
+ (r + s)
+ qu = F (X, Y ).
XY
X
Y
This is known as the reduction to canonical form. In some cases we may be able to solve the resulting
equation exactly, as we managed for the wave equation.
Example
Reduce the pde
3uxx + 4uxy + uyy + 2ux + 2uy = 0
to canonical form and find its general solution. Find also the particular solution that satisfies the following
conditions on y = 0 :
u = 1 + xex , uy = (x 3)ex .
We see that in this case a = 3, b = 4, c = 1. Following the method described above we set
X = x + y, Y = x + y,
with , the roots of
c2 + b + a = 0.
For this choice of a, b, c we have
2 + 4 + 3 = 0 ( + 3)( + 1) = 0,
so that we can take = 1, = 3 (or vice versa). The pde becomes
(6 + 4( + ) + 2)uXY + (2 + 2)uX + (2 + 2)uY = 0.
Substituting for , we obtain 4uXY 4uY = 0, and hence the canonical form is
uXY + uY = 0.
To solve this we set = uY so that
+ = 0.
X
The variables can be separated, and can be found to have the form
= G0 (Y )eX
where G0 is an arbitrary function of Y. Integrating again, this time with respect to Y, we obtain
u = G(Y )eX + F (X)
with F an arbitrary function of X. Writing back in terms of x and y we obtain the general solution
u = G(x 3y)e(xy) + F (x y).
(14)
We now apply the boundary conditions to determine the arbitrary functions F, G. Applying u = 1 + xex
on y = 0 we have
1 + xex = G(x)ex + F (x).
A. G. Walton
which must hold for all x. Replacing x by x y in this equation and rearranging we have
F (x y) = 1 + (x y)e(xy) G(x y)e(xy) .
We can then substitute for F (x y) in (14) to obtain
u = G(x 3y)e(xy) + 1 + (x y)e(xy) G(x y)e(xy) .
(15)
The function G can then be determined by applying the second boundary condition that uy = (x 3)ex
on y = 0. Firstly we calculate from (15) that
uy = 3G0 (x3y)e(xy) +G(x3y)e(xy) e(xy) +(xy)e(xy) +G0 (xy)e(xy) G(xy)e(xy) ,
so that
In the last section we saw that our method of reduction to canonical form was only valid for second order
pdes of the form
auxx + buxy + cuyy + rux + suy + qu = f (x, y)
with the property
b2 4ac > 0.
We define pdes for which this inequality holds to be hyperbolic. Note that the classification only involves
the coefficients of the second order derivatives. Clearly the wave equation is hyperbolic, since b = 0 in
that case and a and c are of different signs. However for Laplaces equation b = 0 and a = c = 1, and
so b2 4ac < 0. Such pdes are known as elliptic. For the heat equation which we study next we have
b = c = 0 and so b2 4ac = 0. Such a pde is said to be parabolic.
4.2
(16)
A. G. Walton
4.2.1
(17)
(18)
XT 0 = X 00 T,
so that
T0
X 00
=
.
X
T
As in the case of the wave equation we now see that the left-hand-side is a function of x only, and the
right-hand-side depends only on t. Therefore we must have, for some constant 2 :
T0
X 00
=
= 2 .
X
T
The sign of the separation constant 2 depends on the type of boundary conditions we impose. In our
particular case since we are imposing (17) we require X(0) = X(L) = 0 which can only be accomplished
if 2 > 0 (otherwise the solutions for X will be of exponential form). We therefore have
X(x) = A cos x + B sin x
T (t) = Cen
2 t/L2
Putting the two components of our solution together and summing over all modes we obtain
u(x, t) =
bn sin
n=1
nx
L
n2 2 t
exp
L2
(19)
bn sin
n=1
nx
L
which we recognize as a half-range Fourier sine series for f (x) with coefficients
bn =
2
L
f (x) sin
0
nx
L
dx.
(20)
Therefore the required solution of the heat equation subject to (17) and (18) is given by (19) and (20).
The method can be adapted to accommodate boundary conditions on u/x, rather than u [see problem
sheet 7].
A. G. Walton
4.2.2
Again, as with the wave equation we can use Fourier transforms to help us obtain a solution. Consider
for example the problem
u
2u
= 2 for 0 < x < , t > 0,
t
x
u(0, t) = 0 for t 0,
u(x, 0) = f (x) for 0 < x < .
(21)
(22)
Since this problem is posed over a semi-infinite domain we could take either a Fourier cosine or sine
transform. Recall from property (ix), section 3.2 that if we take a cosine transform of a second derivative
we require a knowledge of u/x when x = 0, while if we take a sine transform we need to know u at
x = 0. In this particular case, in view of (21), we have the latter situation and so we will take a Fourier
sine transform of the equation, to give
b
us
us + u(0, t),
= 2 b
t
where u
bs (, t) is the Fourier sine transform of u(x, t) with respect to x. Substituting for u(0, t) from (21)
and integrating, we obtain
2
u
bs = B()e t .
Taking the Fourier sine transform of (22) we obtain u
bs = fbs () on t = 0, allowing us to determine
b
B() = fs (), and hence
2
u
bs = fbs ()e t .
Applying the inversion formula for the Fourier sine transform we can then write the solution in the form
Z
2
2 b
fs ()e t sin(x) d,
u(x, t) =
0
where
4.2.3
Higher dimensions
2
fbs () =
f () sin() d.
The methods of separation of variables and Fourier transforms can also be used on the heat equation in
two and three dimensions. However the variables in the boundary conditions need to be separated for
this technique to work, and so the methods are of limited use for problems with complicated geometries.
4.3
(23)
If we look for a solution in a volume V, then the boundary conditions will be given on the surfaces S
which bound V. These boundary conditions are generally of two types:
(i) Dirichlet boundary conditions, in which is given on the boundary;
(ii) Neumann boundary conditions, in which the normal derivative /n, is prescribed on the
boundary.
A. G. Walton
10
4.3.2
The same techniques used for the wave and heat equations will also work on Laplaces equation. The
main limitations of these methods are the simple shapes of domain to which they can be applied, and
the necessity for the variables in the boundary conditions to separate. There are examples of the use of
these techniques on problem sheets 7 and 8.
In what follows we shall consider the three-dimensional form of the equations and apply some of the
techniques and theorems we have learned to formulate solutions. We will use a number of results from
vector calculus and will also generalize the Dirac delta function we encountered in section 3.
4.3.3
2
dS =
2 + || dV.
n
S0
V
In view of the boundary conditions, the left-hand side is zero, and since satisfies Laplaces equation
throughout V , the first term on the right-hand-side is also zero. This leaves
Z
2
|| dV = 0.
V
The volume integral of a positive quantity can only be zero if the integrand is in fact identically zero,
and so this implies
= 0 throughout V.
This means that is at most a constant throughout V, but because is zero on the boundaries, it follows
that is identically zero throughout V. Hence 1 = 2 and the solution is unique.
Much the same reasoning applies if is a complex-valued function of position, if we have Neumann
rather than Dirichlet boundary conditions, and also if the volume V has holes in it [problem sheet 8].
A. G. Walton
11
Figure 3: An unbounded volume V with an inner boundary S1 . The dashed line representing the outer
boundary is to be considered at infinity.
Example
Solve 2 = 2 inside the unit sphere r 1 with = 1 on r = 1.
We note that the right-hand-side, the geometry and the boundary conditions have radial symmetry.
We therefore seek a solution = (r) independent of , in spherical polar coordinates. Referring back
to section 1.9.10, the form for the Laplacian in spherical polars is
2
2
=
r sin
+
sin
+
r2 sin r
r
sin
2
2
2
2 cot
1
1
+
,
=
+ 2
+ 2 2 + 2 2
2
r
r r
r
r
r sin 2
so that our equation reduces under the conditions of radial symmetry to
1 d
2 d
r
= 2.
r2 dr
dr
Integrating we obtain
r2
d
2
= r3 + C
dr
3
and hence
1 2 C
r + D.
3
r
For to be finite at r = 0 we require C = 0. Applying = 1 on r = 1 gives D = 2/3 and so the required
solution is
1
2
= r2 + .
3
3
Due to the uniqueness theorem, we know this is the only possible solution.
=
4.3.4
Now suppose we have a situation where there is an inner boundary S1 , but the outer boundary S0 is
taken to infinity so that V is now an unbounded volume (figure 3). Suppose
2 = f (r)
throughout V. Suppose in addition that = O(1/r), /r = O(1/r2 ) as r . Then the solution for
in V is unique.1
1 If
A. G. Walton
12
Proof
Lets start by considering the surface S0 to be a large sphere of radius R. Suppose there are two solutions
1 , 2 and form the difference . Proceeding as in the previous proof, using Greens first identity, we
have
Z
|| dV
1 Z
X
i=0
Si
S0
dS
n
dS,
n
since the integral over S1 is zero due to the boundary condition that vanishes on S1 . Since S0 is a
sphere of radius R we can write dS = R2 sin dd in spherical polar coordinates, and /n = /r.
We therefore have
Z
Z 2 Z
2
2
sin d d.
|| dV = R
r
0
0
V
Because of the assumed behaviour of as r , the right-hand-side above is of order 1/R and hence
tends to zero as R . We therefore see that for the exterior problem
Z
2
|| dV = 0,
V
and hence, arguing as in the previous proof, = 0 and hence the solution is unique. The proof extends
to Neumann boundary conditions as before, and also to the situation where the volume V has any finite
number of inner boundaries [problem sheet 8].
Example
Solve 2 = f (r) for 0 r < , where
f (r) =
f0 ,
0
r a,
r > a.
We will assume that is bounded throughout the region and that and d/dr 0 as r to
guarantee a unique solution. As before we can seek a solution with radial symmetry and so
1 d
2 d
r
= f (r).
(24)
r2 dr
dr
Solving for r a first, we obtain (after some elementary calculus):
=
1
A
f0 r2 + B.
6
r
We need A = 0 so that the solution is finite at r = 0. Next solving (24) for r > a we obtain
=
C
+ D.
r
We require 0 as r and so we deduce that D must be zero. To find the remaining constants
B, C we impose continuity of and d/dr at r = a. This gives
1
C 1
C
f 0 a 2 + B = , f0 a = 2 .
6
a 3
a
Substituting for B and C we find that the resulting solution for is
(
1
1
2
2
6 f0 r 2 f0 a , r a,
=
13 f0 a3 /r,
r > a.
A. G. Walton
4.3.5
13
Lets consider the result of our previous example in the limit as a 0. This means that the right-hand
side is becoming concentrated at the origin r = 0. In addition we will let f0 in such a way that
(4/3)a3 f0 remains equal to a constant - call this K. In this limit the solution we obtained above for
for r > a becomes
K
.
=
4r
We have therefore obtained a solution to
2 = f (r),
where the right-hand-side has the properties
f (r) =
0,
r 6= 0,
, r = 0,
Another property of the function f (r) can be seen from the following calculation, in which we use the
divergence theorem over a sphere radius a centred at the origin:
Z
Z
Z
2
f (r) dV =
dV =
dV
V
V
ZV
=
dS
r=a r
Z 2 Z Z a
K 2
r sin d d
=
2
4r
0
0
0
= K.
The function f /K is the extension of the Dirac delta function studied in section 3 to three dimensions
and is denoted by (r). Moreover we can extend this definition so that the argument is a vector, i.e. the
function (r). We define
(r) = 0 for r 6= 0,
and
(r) dV =
V
1,
0,
2 = K(r)
(25)
K
.
4 |r|
(26)
is
=
This can be verified in the following way. Firstly we have already seen in section 1.4.6 that 2 (1/r) = 0
for r 6= 0. To check the solution for r = 0 we integrate both sides of (25) over a volume V containing
r = 0 to get
Z
Z
V
2 dV =K
(r) dV = K.
where the origin is interior to the closed surface S which bounds V. But if = K/4 |r| , then =
(K/4)b
r/(1/r) = (K/4)b
r/r2 = (K/4)r/r3 , and so this can be rewritten as
Z
b
K
rn
dS.
3
4 S r
The integral here should be familiar as it is equal to 4 using Gauss flux theorem (1.8.10). The lefthand-side is therefore also equal to K, and we have therefore verified that (26) is indeed the solution to
(25), and is the only solution since we can invoke the uniqueness theorem.
A. G. Walton
14
If we move the source to r = r0 then we can easily modify our analysis to show that
The solution of 2 = K(r r0 ) is = K/(4 |r r0 |).
It can also be shown that the sifting property of the delta function carries over to three dimensions, i.e.
Z
g(r)(r r1 ) dV = g(r1 ),
V
Greens function
(27)
subject to some appropriate boundary conditions. For the three-dimensional problems we have studied
we have seen that the so-called free-space Greens function, i.e. the function that satisfies (27) and tends
to zero as r is given by
G(r; r0 )
1
4 |r r0 |
1
,
4[(x x0 )2 + (y y0 )2 + (z z0 )2 ]1/2
in Cartesian coordinates. As we shall see, knowledge of the Greens function will enable us to write down
solutions to Poissons and Laplaces equation in closed form.
4.3.7
(2 G G2 ) dV =
(
G
) dS.
n
n
V
V
The right hand side can be rewritten as
Z
p(r)
V
G
(r; r0 ) dS,
n
A. G. Walton
15
Figure 4: The points r0 and r00 and their position with respect to the plane z = 0.
p(r)
V
G
(r; r0 ) dS.
n
(28)
Thus, in principle, if we can find the Greens function we can solve Poissons equation for .
A similar approach can be taken if Poissons equation is subject to Neumann conditions on the
boundary [Problem Sheet 8].
4.3.8
Often it is possible to find the Greens function explicitly by the method of images as shown in the
following Laplace equation example.
Suppose we wish to solve
2 = 0
in the region z > 0 with the boundary condition
=
=
(r r0 ) for z > 0,
0 on z = 0.
(29)
(30)
1
.
4 |r r0 |
1
1
+
.
4 |r r0 | 4 |r r00 |
(31)
A. G. Walton
16
|r r0 | = |r r00 |
(figure 4), and so we see that G = 0 on z = 0 as required. Thus the Greens function (31) satisfies
equation (29) and the boundary condition (30). Now that we have the Greens function we can apply
the result of the previous section (equation (28) with f = 0) to obtain the solution for as
Z
G
p(x, y)
(r0 ) =
(r, r0 ) dS.
n
V
In this example V is the plane z = 0 and /n = /z (since n is the outward normal to the volume
V ). Using our expression for G :
n
1/2
1/2 o
(x x0 )2 + (y y0 )2 + (z + z0 )2
,
G = (4)1 (x x0 )2 + (y y0 )2 + (z z0 )2
we find that
n
3/2
3/2 o
G
= (4)1 (z z0 ) (x x0 )2 + (y y0 )2 + (z z0 )2
+ (z + z0 ) (x x0 )2 + (y y0 )2 + (z + z0 )2
.
z
Example
Suppose we wish to solve Laplaces equation for z > 0 with = p(x, y) on z = 0 and p(x, y) given
explicitly as
1, x2 + y 2 1,
p(x, y) =
0, x2 + y 2 > 1.
Using the result derived above with this specific form for p :
Z
3/2
z0
dx dy.
(x x0 )2 + (y y0 )2 + z02
(x0 , y0 , z0 ) =
2 x2 +y2 1
Z
Z
z0 2 1 2
( + x20 + y02 + z02 2x0 cos 2y0 sin )3/2 d d,
=
2 0
0
where we have switched to plane polar coordinates (, ). In particular, the solution along the zaxis is
(0, 0, z0 )
=
=
=
z0
2
2
0
1
0
(2 + z02 )3/2 d d
We can apply the method of images in a similar fashion to solve the same problem but with a Neumann
condition on z = 0 [Problem Sheet 8].
A. G. Walton
17
4.3.9
This same approach can also be used for two-dimensional problems, although the Greens function has a
different (logarithmic) form in this case [see problem sheet 8]. For a Dirichlet problem in which we wish
to solve
2 = f (r)
in a region R of the x y plane, with
= p(x)