Download as pdf or txt
Download as pdf or txt
You are on page 1of 149

Essential Partial Differential Equations:

Analytical and Computational Aspects


Solutions to all exercises

David F. Griffiths, John W. Dold and David J. Silvester


Springer International Publishing Switzerland, 2015

Solutions to all exercises are available to approved instructors


by contacting the publishers.

Springer Undergraduate Mathematics Series


ISBN: 978-3-319-22568-5, e-ISBN: 978-3-319-22569-2
Essential Partial Differential Equations:
Analytical and Computational Aspects
Solutions to all exercises
David F. Griffiths, John W. Dold and David J. Silvester

Exercises

1 Introduction 2

2 Boundary and initial data 6

3 Origins of PDEs 9

4 Classification of PDEs 10

5 Boundary value problems in R1 19

6 Finite difference methods in R1 30

7 Maximum principles and energy methods 46

8 Separation of variables 50

9 The method of characteristics 66

10 Finite difference methods for elliptic PDEs 86

11 Finite difference methods for parabolic PDEs 102

12 Finite difference methods for hyperbolic PDEs 115

13 Projects 131

1
Exercises 1 Introduction
1.1

Function Comment Conclusion

u(x, y) = A(y) uy = A′ (y) False


u(x, y) = A(y) uxy = 0 True
uxy = 0 concerns different
u(x, t) = A(x)B(t) False
independent variables!
u(x, t) = A(x)B(t) uuxt = ABA′ B ′ = ux ut True
u(x, t, y) = A(x, y) ut = ∂t A(x, y) = 0 True
u(x, t) = A(x+ct) + B(x−ct) utt + c2 uxx = 2c2 (A′′ + B ′′ ) False

1.2
These are not the only possible cases; you might find other PDEs:
(a) u(x, t) = et cos x: ∂tn u = et cos x = u (any n), ux = −et sin x, uxx = −et cos x so ∂tn u = u
or ∂tn u + uxx = 0, etc.
(b) u(x, y) = x2 + y 2 : uxx = 2, uyy = 2 so uxx − uyy = 0. Also uxy = 0, etc.
(c) u(x, t) = x2 t: ux = 2xt, ut = x2 , utx = 2x so 2tut − xux = 0 or ux = tutx , etc.
(d) u(x, t) = x2 t2 : utx = 4xt, uttxx = 4 so (utx )2 = 16u or utttxx = 0, etc.
2 2 2
(e) u(x, y) = e−x : ux = −2xe−x , uxx = (4x2 − 2)e−x , uy = 0 so uy = 0 or uxx = (4x2 − 2)u,
etc.
2x 2y 2 4x2 2
(f) u(x, y) = ln(x2 + y 2 ): ux = x2 +y 2 , uy = x2 +y 2 , uxx = x2 +y 2 − (x2 +y 2 )2 , uyy = x2 +y 2 −
2
4y
(x2 +y 2 )2 so yux − xuy = 0, uxx + uyy = 0, etc.

1.3
These are not the only possible cases; you might find other PDEs:
(a) u(x, t) = A(x+ct) + B(x−ct): ut = cA′ (x+ct) − cB ′ (x−ct), ux = A′ (x+ct) + B ′ (x−ct),
utt = c2 A′′ (x+ct) + c2 B ′′ (x−ct), uxx = A′′ (x+ct) + B ′′ (x−ct) so utt − c2 uxx = 0 (wave
equation).

(b) u(x, t) = A(x) + B(t): ut = B ′ (t) so utx = 0.


(c) u(x, t) = A(x)/B(t): ln u = ln A(x) − ln B(x) so (ln u)tx = 0 or uutx − ut ux = 0.
(d) u(x, t) = A(xt): ut = xA′ (xt), ux = tA′ (xt), so tut − xux = 0.
(e) u(x, t) = A(x2 t): ut = x2 A′ (x2 t), ux = 2xtA′ (x2 t) so 2tut − xux = 0.
2
(f) u(x, t) = A(x2 /t): ut = − xt2 A′ (x2 /t), ux = − 2x ′ 2
t A (x /t) so 2tut + xux = 0.

2
1.4
With u(x, y) = f (2x + y 2 ) + g(2x − y 2 ) we find, using the chain rule
ux = 2f ′ (2x + y 2 ) + 2g ′ (2x − y 2 ), uy = 2yf ′ (2x + y 2 ) − 2yg ′ (2x − y 2 )
uxx = 4f ′′ (2x + y 2 ) + 4g ′′ (2x − y 2 )
uyy = 2f ′ (2x + y 2 ) − 2g ′ (2x − y 2 ) + 4y 2 f ′′ (2x + y 2 ) + 4y 2 g ′′ (2x − y 2 )
and the result follows.
1.5 √
Suppose that u(x, t) = 21 c sech2 (z), where z = 12 c(x−ct−x0 ). Then zt = − 12 c3/2 and zx = 21 c1/2
so, by the chain rule, we find
sinh z sinh z
∂t u(x, t) = 12 c5/2 , ∂x u(x, t) = − 12 c3/2
cosh3 z cosh3 z
cosh2 (z) − 3
∂t u + 6u∂x u = 12 c5/2 (sinh z) = −∂x3 u(x, t)
cosh5 z
and so ut + 6uux + uxxx = 0.

1
c=4

c=2

−5 −4 −3 −2 −1 0 1 2 3 4 5 x

Figure 1: Soliton solutions of the KdV equation with c = 2 (solid) and c = 4 (dashed) for
Exercise 1.5 travel with speed c.

1.6

With u defined by (1.2) we may write


Z ∞
1
u(x, t) = √ f (x − s, t) ds
4π −∞
2
and f (x, t) = t−1/2 e−x /4t is the function used in Example 1.3. The partial derivatives of u are
given by
Z ∞ Z ∞ Z ∞
ut = ft (x − s, t) ds, ux = fx (x − s, t) ds, ux = fxx (x − s, t) ds,
−∞ −∞ −∞

and ut − uxx = 0 follows since ft = fxx for each s (see Example 1.3).
1.7
Since u = −2∂x φ = −2φx /φ, the partial derivatives are
φxt φx φt φxx (φx )2
ut = −2 −2 2 , ux = −2 +2 2 ,
φ φ φ φ
 
φxxx φxx φx φx φxx (φx )2
uxx = −2 +2 +4 −
φ φ2 φ φ φ2

3
so, with φt = φxx and φxt = φxxx ,
φxxx φx φxx
ut = −2 −2
φ φ2
and ut + uux = uxx . With φ = t−1/2 exp(−x2 /(4t)) we find log φ = − 12 log(t) − x2 /(4t) and so
u = x/t, which is a special case of equation (9.32).
1.8

Since
φt = a2 e−a(x−at) + b2 eb(x+bt) = φxx
we see that φ solves the heat equation. Then, by Exercise 1.7,
φx −ae−a(x−at) + beb(x+bt)
u(x, t) = −2 = −2 −a(x−at) .
φ e + eb(x+bt)
(a) The term eb(x+bt) → 0 as x → −∞ and so u → 2a.
Likewise, the term e−a(x−at) → 0 as x → ∞ and so u → −2b.
(b) Multiplying both numerator and denominator by ea(x−at) → 0 leads to
a − be(a+b)(x+(b−a)t)
u(x, t) = 2 ,
1 + e(a+b)(x+(b−a)t)
so that u(x, t) is constant along the lines x + (b − a)t = constant.
When a = b, u = −2a tanh ax is independent of t so the solution is stationary. It is translated
a distance a − b to the right or left for each unit of time depending on whether a > b or a < b,
respectively.
a>b
Figure 2: Solutions of Burgers’ equation at
t = 0 for Exercise 1.8 for a > b, a < b
x and a = b (dashed). The arrows indicate
a<b direction of travel as t increases.

1.9

The given function φ(x, t) is a linear combination of solutions of the heat equation and is therefore
a viable candidate for use in the Cole-Hopf transformation. We find
2e−2a(x−2at) + e−a(x−x0 −at)
u(x, t) = 2a
1 + e−2a(x−2at) + e−a(x−x0 −at)
which is shown in Fig. 3 when a = 1 and x0 = 10. Two “step”-like solutions coalesce into one.
1.10
With u = tan−1 (y/x),
y xy x xy
∂x u = − 2 , ∂x2 u = 2 , ∂y u = , ∂y2 u = −2
x + y2 (x2 + y 2 )2 x2 + y 2 (x2 + y 2 )2
so that uxx + uyy = 0. Provided x > 0, limy→0 u(x, y) = tan−1 0 = 0. When x, y > 0 we have
tan−1 (y/x) > 0 and tan−1 (y/x) → 12 π as y/x → ∞. There is therefore a discontinuity at the
origin.
Note that u = θ in polar coordinates. This is independent or r and so u is multivalued as r → 0.

4
4
t=0 t=5 t = 10 t = 15
2 Figure 3: The solution of Burger’s
equation at times t = 0, 5, 10, 15 for
Exercise 1.9.
−20 −10 0 10 20 30 40 x

5
Exercises 2 Boundary and initial data
2.1

(a) u(x, 0) = A(x) + B(x) = f (x) so A(x) + B(x) = f (x). There is not enough information to
determine both A(·) and B(·).
(b) u(x, 0) = A(x)+B(0) = f (x) so A(x) = f (x)−B(0). We would only need to know one value
of B, namely B(0) to determine A. However, the initial conditions gives no information
about B.
(c) u(x, 0) = A(x)/B(0) = f (x) so A(x) = B(0)f (x). We would only need to know one value
of B, namely B(0) to determine A, but we have no information about B.
(d) u(x, 0) = A(0) = f (x) so A(0) = f (x). This tries to set a constant A(0) to something that
is not constant f (x), which is not possible!
(e) (exactly the same)
(f) u(x, 0) = A(∞) = f (x) so A(∞) = f (x). This tries to set a constant A(∞) to something
that is not constant f (x), which is again not possible!

2.2

(a) u(x, 1) = A(x + c) + B(x − c) = g(x) which provides insufficient information to find both
A(·) and B(·).
(b) u(x, 1) = A(x) + B(1) = g(x) so A(x) = g(x) − B(1). We only need to know B(1) to
determine A. We obtain no information about B.
(c) u(x, 1) = A(x)/B(1) = g(x) so A(x) = B(1)g(x). We only need to know B(1) to determine
A. There is no information about B.
(d) u(x, 1) = A(x) = g(x) so A(x) = g(x) and u(x, t) = g(xt).
(e) u(x, 1) = A(x2 ) = g(x) so A(x2 ) = g(x). This determines A(ξ) for ξ ≥ 0 provided g(ξ) =
g(−ξ).
(f) u(x, 1) = A(x2 ) = g(x) so A(x2 ) = g(x). Again, this determines A(ξ) for ξ ≥ 0 provided
g(ξ) = g(−ξ).

2.3
From (1.2) with g(x) as given,
Z ∞ Z ∞ Z ∞
1 2 1 2 1 2
u(x, t) = √ e−(x−s) /4t g(s) ds = √ e−(x−s) /4t ds = √ e−z dz,
4πt −∞ 4πt 0 π −x/√4t

where we have made the change of variable s = x + z 4t in the integrand. Thus u(0, t) = 1/2
from the given result.
Z ∞ Z ∞ Z ∞
1 −z 2 1 −z 2 1 2
u(x, 0) = lim √ e dz = √ e dz = 2 √ e−z dz = 1,
t→0 π −x/√4t π −∞ π 0

6
since the integrand is an even function of z.
2.4
Defining


 utt (x, y) − c2 uxx (x, t) for x ∈ (0, 1), t ∈ (0, T ]




u(0, t) for x = 0, 0 < t < T
L u(x, y) = "u(1, t) # for x = 1, 0 < t < T



 u(x, 0)

 for t = 0, 0 < x < 1
 u (x, 0)
t

and


 0 for x ∈ (0, 1), t ∈ (0, T ]




g0 (t) for x = 0, 0 < t < T
F u(x, t) = g"1 (t) # for x = 1, 0 < t < T



 f1 (x)

 for t = 0, 0 < x < 1
 f (x)
2

allows (2.10) to be written as L u = F . Note that L and F are vector-valued for t = 0 in order
to accommodate two initial conditions.
2.5
First note that L(au) = −κ(au)xx = a(−κuxx ) = aLu. Similarly, B(au) = aBu. Then
 

(au)t (x, t) + (Lau)(x, t) 
a(ut (x, t) + Lu(x, t)) for (x, t) ∈ (0, 1) × (0, T )
(L au)(x, t) = (Bau)(x, t) = aBu(x, t) for (x, t) ∈ {0, 1} × (0, T ) .

 

au(x, 0) au(x, 0) for t = 0, x ∈ [0, 1]

and the right hand side is equal to aL u(x, t).


2.6
We need to show that L (u + v) = L u + L v and L (au) = aL u for any twice differentiable
functions u, v and any constant a (alternatively, one could show that L (au + bv) = aL u + bL v,
where b is any constant).


 uxx (x, y) + vxx (x, y) + uyy (x, y) + vyy (x, y) 0 < x, y < 1




 u(0, y) + v(0, y) x = 0, 0 < y < 1
L (u + v)(x, y) = u(1, y) + v(1, y) x = 1, 0 < y < 1 = L u(x, y) + L v(x, y)



 −uy (x, 0) − vy (x, 0) y = 0, 0 < x < 1


 u (x, 1) + v (x, 1) + u(x, 1) + v(x, 1) y = 1, 0 < x < 1
y y


 auxx (x, y) + auyy (x, y) 0 < x, y < 1




 au(0, y) x = 0, 0 < y < 1
L (au)(x, y) = au(1, y) x = 1, 0 < y < 1 = aL u(x, y).



 −auy (x, 0) y = 0, 0 < x < 1


 au (x, 1) + au(x, 1) y = 1, 0 < x < 1
y

7
2.7
2
First we confirm that u = AT 1/2 (T −t)−1/2 e−x /4(T −t) is a solution of ut = −uxx:
1 2 1 2
ut = AT 1/2 (T −t)−3/2 e−x /4(T −t) − AT 1/2 x2 (T −t)−5/2 e−x /4(T −t) ,
2 4
1 1/2 −3/2 −x2 /4(T −t)
ux = − AT x(T −t) e ,
2
1 2 1 2
uxx = − AT 1/2 (T −t)−1/2 e−x /4(T −t) + AT 1/2 x2 (T −t)−5/2 e−x /4(T −t) = −ut
2 4
so that ut = −uxx .
Note that with this solution |u(x, 0)| ≤ A and u(0, t) → ∞ as t → T .
2
Hence, given any ε > 0 and any position (X, T ), the solution u = εT 1/2 (T −t)−1/2 e−(x−X) /4(T −t) ,
2
satisfying the initial condition u(x, 0) = εe−(x−X) /4T , for which |u(x, 0)| ≤ ε, becomes infinite
as (x, t) → (X, T ).
Because of this, the negative heat equation is ill-posed for t > 0 when subjected to initial
conditions at t = 0; we can always find solutions that are arbitrarily small initially but that
become infinite at any chosen time later on.
Suppose that the negative heat equation is subjected to final conditions u(x, tf ) = g(x) at some
time t = tf , say. Then it is well posed for times before the final time, t < tf .
2.8

(a) ut − (x2 + u)uxx = x − t is 2nd order and quasilinear.


(b) u2 utt − 21 u2x + (uux )x = eu is 2nd order and quasilinear.
(c) ut − ∇2 u = u3 is 2nd order and semilinear.
(d) (uxy )2 − uxx + ut = 0 is 2nd order and fully nonlinear.

(e) ut + ux − uy = 10 is 1st order, linear and inhomogeneous.

2.9
The highest derivatives take the form autt + butx + cuxx (or different subscripts for different
independent variables):
(a) ut + utx − uxx + u2x = sin u : semilinear.
(b) ux + uxx + uy + uyy = sin(xy): linear and inhomogeneous.
(c) ux + uxx − uy − uyy = cos(xyu): semilinear.
(d) utt + xuxx + ut = f (x, t): linear and inhomogeneous.
(e) ut + uuxx + u2 utt − utx = 0: quasilinear.

8
Exercises 3 Origins of PDEs
3.1
Since H does not depend on t, we can differentiate ht + Hvx with respect to t:

htt + Hvxt = 0 ⇒ htt + H∂x vt = 0.

But vt = −ghx , so ∂x vt = −ghxx and htt − c2 hxx = 0, where c2 = gH.


3.2
The flow speed will adjust until the resistive force balances the gravitational force: av 2 = bh or
v = Ch1/2 . Substituting this into (3.12) gives

ht + 32 C(h3/2 )x = r ⇒ ht + 32 Ch1/2 hx = r.

This becomes ut + u1/2 ux = f , where u = ( 32 C)2 h and f = ( 32 C)2 r.


3.3
This simply requires the vector form of differentiation of a product:
~ · (~v T ) = T ∇
∇ ~ · ~v + ~v · ∇T.
~

For example, suppose that ~v = (u, v), then in R2 ,

~ · (~v T ) = (uT )x + (vT )y = ux T + uTx + vy T + vTy



~ · ~v + ~v · ∇T.
= T (ux + vy ) + (uTx + vTy ) = T ∇ ~

3.4
The main difference between the situation leading to (3.8) and that in Section 3.2.5 is that the
depth of the water is h(x, t) (rather that H + h(x, t)) so the approximation H + h ≈ H is no
longer valid.
The argument leading up to (3.8) becomes:
For a narrow column of water of depth h(x, t) and width δx centred on the location x, the flux
of water in the x-direction is hv, the product of depth and velocity, so the net flux into this
strip, per unit time, is “flux in” minus “flux out”, that is

hv|x− 1 δx − hv|x+ 1 δx ≈ −δx(hv)x


2 2

by Taylor expansion. If water is neither added nor removed from the tank, conservation of (fluid)
mass requires that this net influx must be balanced by the rate of change in the volume hδx of
the column. Thus,
∂t (hδx) = −δx(hv)x ,
so, on dividing by δx, we obtain ht + (hv)x = 0.

9
Exercises 4 Classification of PDEs
4.1
If ϕ(x) = x/(1 + |x|), then ϕ is a continuous function for x ∈ R and
( (
x 1
x ≥ 0 ′ (1+x)2 x≥0
ϕ(x) = 1+x x
⇒ ϕ (x) = 1
.
1−x x<0 (1−x)2 x<0

Therefore
1 1
lim ϕ′ (x) = lim = 1 = lim = lim ϕ′ (x).
x→0− x→0 (1 − x)2 x→0 (1 + x)2 x→0+

That is, ϕ′ (0− ) = ϕ′ (0+ ) showing that ϕ is continuously differentiable at the origin.
4.2
Since u(x, y) = A(x − y) (where A(x) = g(s(x))) it follows that limy→x ux (x, y) = limt→0 A′ (t).
With g(x) = exp(−x2 ) we find that A′ (t) = g ′ (s(t))s′ (t) = −2s(t)s′ (t) exp(−s(t)2 ) so

lim A′ (t) = −2 lim s(t)s′ (t)


t→0 t→0

and a little care is required since s(t) → 0 while |s′ (t)| → ∞. The function s(x) satisfies
x = s(x) − ϕ(s(x)) so
1 = (1 − ϕ′ (x))s′ (x)
and, using ϕ′ (x) from the previous solution,
( (1+x)2 (
(1+t)2 1
1 x≥0 → t → 0+

s (x) = = x(x+2)
(1−x)2
⇒ ′
s(t)s (t) = t+2
(1−t)2
2
1 − ϕ′ (x) x<0 → − 21 t → 0−
x(x−2) t−2

Thus ux (x, x+ ) = −1 and ux (x, x− ) = 1—there is jump discontinuity in ux at x = y.


4.3
u(x, t) = F (x − ct) + G(x + ct) and so the initial conditions give

u(x, 0) = g0 (x) = F (x) + G(x)


ut (x, 0) = g1 (x) = −cF ′ (x) + cG′ (x)

Integrating the second of these over the interval (x − ct, x + ct) leads to
Z
1 x+ct
−F (x + ct) + F (x − ct) + G(x + ct) − G(x − ct) = g1 (s) ds
c x−ct
while, from the first,

−F (x + ct) + G(x + ct) = g0 (x + ct)


−F (x − ct) + G(x − ct) = g0 (x − ct).

Combining these gives d’Alembert’s formula (4.20).


4.4
Using the rules for differentiating an integral with variable limits:
Z b(x) Z b(x)
d ′ ′
g(x, t) dt = b (x)g(x, b(x)) − a (x)g(x, a(x)) + gx (x, t) dt,
dx a(x) a(x)

10
we find, from (4.20)
1 1 
ut = (−cg0′ (x − ct) + cg0′ (x + ct)) + cg1 (x + ct) + cg1 (x − ct)
2 2c
1 1 
utt = (c2 g0′′ (x − ct) + c2 g0′′ (x + ct)) + c g1′ (x + ct) − g1′ (x − ct)
2 2
1 1 
ux = (g0′ (x − ct) + g0′ (x + ct)) + g1 (x + ct) − g1 (x − ct)
2 2c
1 1 ′ 
uxx = (g0′′ (x − ct) + g0′′ (x + ct)) + g (x + ct) − g1′ (x − ct)
2 2c 1
from which we find utt = c2 uxx , as required.
4.5
The highest derivatives take the form autt + butx + cuxx (or different subscripts for different
independent variables):
(a) ut + utx − uxx + u2x = sin u. b2 − 4ac = 1 > 0 so hyperbolic.
(b) ux + uxx + uy + uyy = sin(xy). b2 − 4ac = −4 < 0 so elliptic.
(c) ux + uxx − uy − uyy = cos(xyu). b2 − 4ac = 4 > 0 so hyperbolic.
(d) utt + xuxx + ut = f (x, t). b2 − 4ac = −4x so: elliptic for x > 0, hyperbolic for x < 0,
parabolic for x = 0.
(e) ut + uuxx + u2 utt − utx = 0. b2 − 4ac = 1 − 4u3 so elliptic for u3 > 41 , hyperbolic for u3 < 14 ,
parabolic for u3 = 41 .

4.6
(a)

(∂x − ∂y )(∂x + ∂y )u = (∂x − ∂y )(ux + uy ) = ∂x (ux + uy ) − ∂y (ux + uy )


= uxx + uxy − uxy − uyy = uxx − uyy .

(b) 
ux = vy ⇒ uxx = vxy
⇒ uxx = uyy .
uy = vx ⇒ uyy = vxy
(c) Under the change of variables s = x + y, t = x − y, the chain rule gives

∂x = (∂x s)∂s + (∂x t)∂t = ∂s + ∂t ∂ + ∂y = 2∂s
⇒ x
∂y = (∂y s)∂s + (∂y t)∂t = ∂s − ∂t ∂x − ∂y = 2∂t

and so, by part (a),


uxx − uyy = (∂x − ∂y )(∂x + ∂y )u = 4∂t ∂s u.
Integrating the PDE ∂t ∂s u = 0 with respect to t gives us = f (s) (where f is an arbitrary
function) then
R integrating with respect to s, u = F (s) + G(t), where G is an arbitrary function
and F (s) = s f (s) ds being the integral of an arbitrary function is also an arbitrary function.
The general solution of uxx − uyy = 0 is, therefore u(x, y) = F (x + y) + G(x − y).
4.7
With the change of variables s = x + y, t = x − y, it follows from the previous answer that

11
uxx − uyy = x + y becomes 4ust = s. Integrating with respect to t gives us = 14 st + f (s) (where
f is an arbitrary function) then integrating
R with respect to s, u = 81 s2 t + F (s) + G(t), where G
is an arbitrary function and F (s) = s f (s) ds is also an arbitrary function. The general solution
of uxx − uyy = x + y is, therefore u(x, y) = 18 (x + y)2 (x − y) + F (x + y) + G(x − y).
The boundary conditions give:
1 3
u(x, 0) = 8x + F (x) + G(x) = x
u(0, y) = − 81 y 3 + F (y) + G(−y) = − 21 y 3

and, when we replace y by x in the second of these, we find that F (x) + G(−x) = − 38 x3 and so

G(x) − G(−x) = x + 14 x3 .

With the identity1 G(x) = 21 (G(x) − G(−x)) + 12 (G(x) + G(−x)) we have

G(x) = 21 x + 18 x3 + E(x)

where we have used E(x) for the even part of G (which is, as yet, undetermined). Then

F (x) = 21 x − 14 x3 − E(x)

so that the solution is (after some algebra)

u(x, y) = x(1 − xy) − 21 (x + y)y 2 − E(x + y) + E(x − y)

and involves an arbitrary even function E(·).


4.8
Comparing uxx − 2uxy − 3uyy = 0 with (4.12) a = 1, b = −1 and c = −3 and b2 − ac = 4 > 0
so the equation is hyperbolic. The form given for the general solution suggests the change of
variables s = 3x + y, t = x − y and the chain rule gives

∂x = (∂x s)∂s + (∂x t)∂t = 3∂s + ∂t ∂ + ∂y = 4∂s
⇒ x
∂y = (∂y s)∂s + (∂y t)∂t = ∂s − ∂t ∂x − 3∂y = 4∂t .

Hence uxx − 2uxy − 3uyy = (∂x2 − 2∂x ∂y − 3∂y2 )u = (∂x − 3∂y2 )(∂x + ∂y2 )u = 16ust . Then integrating
ust = 0 twice gives u = F (s) + G(t) = F (3x + y) + G(x − y) as the general solution.
The initial conditions give

u(x, 0) = g0 (x) = F (3x) + G(x)


uy (x, 0) = g1 (x) = F ′ (3x) − G′ (x).

Integrating the second of these leads to


Z
1
3 F (3x) − G(x) = g1 (s) ds.
x

Solving for F (3x) and G(x) gives


Z Z
F (3x) = 34 g0 (x) + 3
4 g1 (s) ds, G(x) = 14 g0 (x) − 3
4 g1 (s) ds
x x
1 Every function can be written as the sum of an odd and an even function.

12
R
and so F (x) = 43 g0 ( 13 x) + 43 x/3 g1 (s) ds. Combining these with the earlier general solution gives
Z x+y/3
1

u(x, y) = 4 3g0 (x + 13 y) + g0 (x − y) + 3
4 g1 (s) ds.
x−y

4.9
Comparing the equation 2uxx + 5uxt + 3utt = 0 with the template (4.12) we see that a = 2, b=
5/2 and c = 3 so b2 − ac = 14 > 0, so the equation is hyperbolic. The factorisation

2uxx + 5uxt + 3utt = (2∂x + 3∂y )(∂x + ∂y )u


suggests the change of variables y = x − t, s = 3x − 2t and the chain rule gives

∂x = (∂x y)∂y + (∂x s)∂s = 3∂y + ∂s ∂ + ∂t = 4∂y
⇒ x
∂t = (∂t y)∂y + (∂t s)∂s = ∂y − ∂s ∂x − 3∂t = 4∂s .

Hence 2uxx + 5uxt + 3utt = (2∂x + 3∂t )(∂x + ∂t )u = 16uys which, on integrating twice gives the
general solution u = F (y) + G(s) = F (x − t) + G(3x − 2t).
The initial conditions give
2
F (x) + G(3x) = 0, −F ′ (x) − 2G′ (3x) = xe−x
2
and integrating the second of these we find F (x) + 23 G(3x) = 21 e−x + C, where C is the constant
of integration. It follows that
2 2 2
F (x) = 32 e−x + 3C, G(3x) = − 32 e−x − 3C ⇒ G(x) = − 32 e−x /9 − 3C.
3 2 2 
Hence u(x, y) = 2 e−(x−t) − e−(3x−2t) /9 in which there is no arbitrary constant.
4.10
(a) With u = v/r,
vr v
ur = − 2, r2 ur = rvr − v, ∂r (r2 ur ) = (vr − rvrr ) − vr = vrr
r r

and so a2 ∂r r2 ur = r2 ∂t2 u becomes a2 vrr = vtt . The change of independent variables p = r−at,
q = r + at gives

∂r = (∂r p)∂p + (∂r q)∂q = ∂p + ∂q
(a∂r )2 −∂t2 = a2 (∂p +∂q )2 −a2 (−∂p +∂q )2 = 4a2 ∂p ∂q
∂t = (∂t p)∂p + (∂t q)∂q = a(−∂p + ∂q )

Integrating vpq = 0 twice gives the general solution v = g(p) + f (q) = g(r − at) + f (r + at) and
u = (g(r − at) + f (r + at))/r.
The initial condition u(r, 0) = 0 gives g(r)+f (r) = 0 and ut (r, 0) = 0 gives (−ag ′ (r)+af ′ (r))/r =
exp(−r2 ). The first of these gives g(r) = −f (r) so that g ′ (r) = −f ′ (r) and the second initial
condition gives
1 −r2 1 −r2
f ′ (r) = re ⇒ f (r) = e + C,
2a 4a
2 2
where C is an arbitrary constant. Therefore u(r, t) = (e−(r−at) − e−(r+at) )/(4ar) for r > 0.
4.11
Substituting u(r, t) = rm f (t − r) into the PDE and collecting terms leads to
rm−2 f (t − r)m(m + n − 2) + rm−1 f ′ (t − r)(2m + n − 1) = 0.

13
This will hold for all differentiable functions f if, and only if,
m(m + n − 2) = 0 and 2m + n − 1 = 0.
Thus, either m = 0 and n = 1 or n = 3 and m = −1 giving the solutions u(r, t) = f (t − r) when
n = 1 and u(r, t) = f (t − r)/r when n = 3 (see the previous question).
4.12 √
Suppose that φ(x, t) satisfies the heat equation φt = φxx and that u(x, t) = φ((x − at)/ κ, t)
then, by the chain rule,
√ √
ut = (−a/ κ)φx + φt , ux = (1/ κ)φx , uxx = (1/κ)φxx
so that
ut + aux = φt = φxx = κuxx .
Thus u satisfies the advection-diffusion equation ut + aux = κuxx . The result follows by choosing
φ(x, t) to be the solution of the heat equation given by (4.22).
4.13
The change of independent variables x = s cos α − t sin α, y = s sin α + t cos α gives

∂s = (∂s x)∂x + (∂s y)∂y = cos α∂x + sin α∂y
∂t = (∂t x)∂x + (∂t y)∂y = − sin α∂x + cos α∂y
(∂s2 + ∂t2 )u = (cos α∂x + sin α∂y )2 u + (− sin α∂x + cos α∂y )2 u = uxx + uyy
since α is constant and cos2 α + sin2 α = 1.
4.14
This question can be answered by using the change of variables s = y, t = β(cx − by) (in which β
is a scaling constant) and following the procedure in Section 4.2.3. It is rather more economical to
observe that the operator L = 1c (ac − b2 )∂x2 + (b∂x + c∂y )2 is related to (4.27) by interchanging
a ↔ c and x ↔ y. Since Q b appearing in (4.29) is unaffected by these interchanges, the same
solution is obtained in the two cases.
4.15
y

Figure 4: With a = 2, b = 0 and c = 3 then Q b = 1 (3x2 + 2y 2 ) in the


6
b =
solution (4.29). The figure shows a typical elliptical curve xT Qx
O x
constant.

4.16

Differentiating under the integral sign, we find


Z ∞ Z ∞
ux = kx (x − s, y)g(s) ds, uy = ky (x − s, y)g(s) ds
−∞ −∞
Z ∞ Z ∞
uxx = kxx (x − s, y)g(s) ds, uyy = kyy (x − s, y)g(s) ds
−∞ −∞
Z ∞
uxx + uyy = (kxx (x − s, y) + kyy (x − s, y))g(s) ds.
−∞

14
However
1 y(3(x − s)2 − y 2 )
kxx (x − s, y) = = −kyy (x − s, y)
π (x − s)2 + y 2
and it follows that uxx + uyy = 0. Note that there are singularities in kxx and kyy at x = s when
y = 0.
4.17 
1
With G(x, y, t) = 4π log(x2 + (y + t)2 ) − log(x2 + (y − t)2 ) we find
 
1 2(y + t) −2(y − t)
∂t G(x, y, t) = − 2
4π (x2 + (y + t)2 x + (y − t)2
 
1 y
∂t G(x, y, t)|t=0 = = k(x, y)
π x2 + y 2
from (4.32).
With the change of variables s = x + y tan θ the interval −∞ < s < ∞ becomes − 21 π < θ < 12 π
and ds = y sec2 θ dθ so that
Z ∞ Z ∞ Z π/2
y
k(x − s, y) ds = 2 2
ds = dθ = π,
−∞ −∞ (x − s) + y −π/2

where we have used the identity 1 + tan2 θ = sec2 θ.


4.18
(a) If g(s) > 0 for s ∈ R the integrand in (4.32) is strictly positive and consequently u(x, y) > 0.
(b) If g(x) = c, a positive constant, in a neighbourhood (x0 − ε, x0 + ε) of a point x0 and is zero
otherwise then Z x0 +ε
u(x, y) = c k(x − s, y) ds > 0
x0 −ε

since k(x − s, y) > 0. Hence u(x, y) must be affected at every point in the domain by the value
of c. The principle of superposition applies, so any change in the boundary values of u in the
neighbourhood of any point x0 on the boundary will affect the solution throughout the domain.
(c) Since k(x, y) > 0 we deduce from (4.32) that
Z ∞ Z ∞ 
|u(x, y)| ≤ k(x − s, y)|g(s)| ds ≤ k(x − s, y) ds max |g(s)| ≤ max |g(s)|
−∞ −∞ −∞<s<∞ −∞<s<∞
R∞
since −∞
k(x − s, y) ds = 1.
4.19
The identity
tan a − tan b
tan(a − b) =
1 + tan a tan b
with tan a = (x + 2)/y and tan b = (x − 2)/y gives, after a little manipulation,
4y
tan(a − b) = = tan(πu)
x2 + y 2 − 4
and, in the limit u → 1/2, we have x2 + y 2 → 4. In particular, when y → 0 and x → ±2 we see
that u(±2, 0) = 1/2. However, the boundary condition is discontinuous at (±2, 0): g(2− , 0) = 0,
g(2+ , 0) = 1, g(−2− , 1) = 0, g(−2+ , 0) = 0 from which we see that
u(2, 0) = 12 (g(2− , 0) + g(2+ , 0)) and u(−2, 0) = 12 (g(−2− , 0) + g(−2+ , 0)).

15
4.20
With x = r cos θ, y = r sin θ, the chain rule gives

∂r = (∂r x)∂x + (∂r y)∂y = cos θ ∂x + sin θ ∂y


∂θ = (∂θ x)∂x + (∂θ y)∂y = −r sin θ∂x + r cos θ ∂y

cos θ × the first − ((1/r) sin θ)× the second and


sin θ × the first + ((1/r) cos θ)× the second gives
1
∂x = cos θ ∂r − sin θ ∂θ
r
1
∂y = sin θ ∂r − cos θ ∂θ .
r
Denoting c = cos θ and s = sin θ,
s s s s
uxx = (c∂r − ∂θ )(c∂r − ∂θ )u = (c∂r − ∂θ )(cur − uθ )
r r r r
 cs cs  s c s2

2
= c urr + 2 uθ − 2 urθ − −sur + curθ − uθ + 2 uθθ
r r r r r
c c c c
uyy = (s∂r + ∂θ )(sur + uθ ) = (s∂r + ∂θ )(sur + uθ )
r r r r
 cs cs  c s c2

2
= s urr − 2 uθ + 2 urθ + cur + surθ − uθ + 2 uθθ
r r r r r

adding and using c2 + s2 = 1 leads to


1 1 1 1
∇2 u := uxx + uyy = urr + ur + 2 uθθ = ∂r (rur ) + 2 uθθ .
r r r r
When u = rn f (θ), ur = nrn−1 f (θ), (ru)r = n2 rn−1 f (θ), uθθ = rn f ′′ (θ) and so

∇2 u = (n2 f (θ) + f ′′ (θ))rn−2

and ∇2 u = 0 if, and only if f ′′ (θ) + n2 f (θ) = 0. This has general solution f (θ) = A sin(nθ + B)
giving u = Arn sin(nθ + B) for arbitrary constants A and B.
Similarly, when u = f (θ) log(r) we find ∇2 u = − r12 f ′′ (θ) log(r) = 0 leading to f ′′ (θ) = 0 and
then u = (Aθ + B) log(r). Note that A = 0 and B = 1 leads to the solution in Example 1.4.
4.21
(a) From Exercise (4.22) with u = F (r), we find ∇2 u = r1 (rF ′ (r))′ ) so −∇2 u = 1 leads to

A
(rF ′ (r))′ = −r ⇒ rF ′ (r) = − 12 r2 + A ⇒ F ′ (r) = − 21 r + ⇒ F (r) = − 41 r2 + A log r + B,
r
which is the general solution with arbitrary constants A and B. The boundary condition F (1) = 0
requires B = 41 and, since log r → −∞ as r → 0, a bounded solution on any region contain the
origin, requires A = 0. Thus u(r, θ) = 14 (1 − r2 ).
(b) We look for a solution of the form u(r, θ) = F (r) cos θ. Substituting into Laplace’s equation
gives  
2 ′′ 1 ′ 1
∇ u = F (r) + F (r) − 2 F (r) cos θ = 0.
r r

16
We try a solution in the form F (r) = Arn and find ∇2 u = A(n2 − 1) cos θ. This will be a solution
if n = ±1. This gives two linearly independent solutions Ar cos θ and (B/r) cos θ but the second
of these is unbounded when r → 0. Therefore u(r, θ) = Ar cos θ and the boundary condition
u(1, θ) = cos θ requires A = 1. Hence u = r cos θ, i.e., u = x.
4.22

ux = vy ⇒ uxx = vxy
⇒ uxx + uyy = 0.
uy = −vx ⇒ uyy = −vxy

4.23
Under the change of variables z = x + iy, z ∗ = x − iy, the chain rule gives

∂x = ∂z + ∂z∗ , ∂y = i∂z − i∂z∗

and so,

uxx = (∂z + ∂z∗ )2 u = uzz + 2uzz∗ + uz∗ z∗


2
uyy = −(∂z − ∂z∗ ) u = −(uzz − 2uzz∗ + uz∗ z∗ )

giving uxx + uyy = 4uzz∗ . Integrating the PDE uzz∗ = 0 with respect to z ∗ gives uz = f (z)

(where f is an arbitrary function) then
R integrating with respect to z, u = F (z) + G(z ), where G
is an arbitrary function and F (s) = s f (s) ds is also an arbitrary function. The general solution
of uxx + uyy = 0 is, therefore, u(x, y) = F (x + iy) + G(x − iy).
If F is a real function then, since ℜF (z) = 12 (F (z) + (F (z))∗ ) = 21 (F (z) + F (z ∗ ). This will be a
solution if we choose G(s) = F (s). (The PDE is homogeneous, so u = c(F (x + iy) + G(x − iy)
is also a solution for any constant c.)
Since ℑF (z) = 21 (F (z) − (F (z))∗ ) = 12 (F (z) − F (z ∗ ). This will be a solution if we choose
G(s) = −F (s).
4.24

(a) F (z) = z n = (x + iy)n so, the real and imaginary parts of F (z) with n = 0, 1, 2 give the
solutions 1, x, y, x2 − y 2 and xy.
(b) With F (x) = exp(−nx) we find F (z) = exp(−nx)(cos(ny) − i sin(ny)) (where z = x + iy).
Thus ℜF (z) = exp(−nx) cos ny and ℑF (z) = exp(−nx) sin ny are solutions of Laplace’s
equation for any real n.
(c) With F (x) = sin(nx) we find F (z) = sin(nx + iny). Thus ℜF (z) = sin(nx) cos ny (see
Example 2.12) and ℑF (z) = cos(nx) sin ny are solutions of Laplace’s equation for any
real n.
(d) In polar coordinates x = r cos θ, y = r sin θ and z = x + iy = r exp(iθ). Therefore

F (z) = log(z) = log(reiθ ) = log r + iθ.

Thus ℜF (z) = log r (see Example 1.4) and ℑF (z) = θ = tan−1 (y/x) (see Exercise 1.10)
are solutions of Laplace’s equation.

17
4.25
Since −∇2 u = v and −∇2 v = f ,

−∇2 −∇2 u = −∇2 v = f

and so ∇4 u = f .
With u = Cr2 log(r) and ∇2 u = (1/r)(rur )r

ur = 2Cr log r + Cr, ⇒ rur = 2Cr2 log r + Cr2


(rur )r = 4Cr log r + 4Cr ⇒ ∇2 u = 4C log r + 4C

so v = −∇2 u = −4C log r − 4C which satisfies ∇2 v = 0 (see Exercise 4.20). Hence u satisfies
the biharmonic equation.
4.26
By Exercise 4.23 ∇2 v = vzz∗ and −∇2 u = v becomes −uzz∗ = v. Therefore, −uzz∗ zz∗ = vzz∗ =
0, as required.
Now
u = ℜ(z ∗ F (z) + G(z)) = 21 (z ∗ F (z) + G(z) + zF (z ∗ ) + G(z ∗ ))
since F and G are real functions. Thus

uz = 21 (z ∗ F ′ (z) + G′ (z) + F (z ∗ )), uzz∗ = 21 (F ′ (z) + F ′ (z ∗ )) = ℜF ′ (z).

and, with v = −uzz∗ = −ℜF ′ (z), then ∇2 v = 0 by Exercise 4.23. Consequently ∇4 u = 0.

18
Exercises 5 Boundary value problems in R1
5.1
First we look for a particular solution u(x) = C, where C is constant. Substituting into the ODE
gives −4C = 1 and so C = −1/4.
Next we look for a solution of the homogeneous equation u′′ + 3u′ − 4u = 0 in the form u = Aeλx ,
where A and λ are constants. Substituting into the ODE gives

Aeλx (λ2 + 3λ − 4) = 0.

Thus, either A = 0 (leading to the trivial solution u(x) = 0) or λ2 + 3λ − 4 = (λ + 4)(λ − 1) = 0,


that is, λ = −4 or λ = 1. The ODE is linear and homogeneous so the principle of superposition
applies and the general solution of homogeneous ODE (often referred to as the complementary
function) is u = Ae−4x + Bex . The general solution of the given ODE is therefore

u(x) = Ae−4x + Bex − 14 .

Applying the boundary conditions u(0) = 1 and u(1) = 3 leads to



A + B − 14 = 1 5e − 13 13 − 5e−4
−4 1 ⇒ 4A = , 4B =
Ae + Be − 4 = 3 e−e −4 e − e−4

which uniquely determine u(x).


5.2
From (5.6) we find √
cosh b(x − 12 )
bu(x) + ε = ε √
cosh 12 b
and, differentiating both sides twice, gives

′′ cosh b(x − 12 )
bu (x) = εb √ = b(bu(x) + ε)
cosh 12 b

and so u′′ − bu = ε, as required.


Similarly, from (5.8) p
cos |b|(x − 12 )
bu(x) + ε = ε p
cos 12 |b|
and, again differentiating both sides twice,
p
′′ cos |b|(x − 12 )
bu (x) = −εb p = −b(|b|u(x) + ε).
cos 12 |b|

since |b| = −b we have u′′ − bu = ε, as required.


5.3
The key identities are

cosh A − cosh B = 2 sinh 21 (A + B) sinh 12 (A − B), cos A − cos B = −2 sin 21 (A + B) sin 12 (A − B).

19
1
√ √
The first of these with A = 2 b(x − 12 ) allows us to rewrite (5.6) as
b and B =
√ √ √ ! √ !
2ε sinh( 12 bx) sinh 12 b(1 − x) ε sinh 12 bx sinh 12 b(1 − x)
u(x) = − √ = −2 √ √ √
b cosh 12 b cosh 12 b b b

Now as z → 0, cosh z → 1, sinh(az)/z → a (for any constant a) and consequently u(x) →


− 21 εx(1 − x).
Similarly, (5.8) may be rewritten as
p p p ! p !
2ε sin 12 |b|x sin 12 |b|(1 − x) ε sin( 12 |b|x) sin 12 |b|(1 − x)
u(x) = − p = −2 p p p
b cos 12 |b| cos 21 |b| |b| |b|

and, since cos z → 1, sin(az)/z → a as z → 0 we again obtain u(x) → − 21 εx(1 − x).


5.4

(a) −u′′ + 20u′ = 1 becomes −(e−20x u′ )′ = e−20x .


(b) u′′ + 3u′ − 4u = x2 becomes −(e3x u′ )′ + 4e3x u = −x2 e3x .
(c) (1 − x2 )u′′ − 2xu′ + ku = 0 becomes −((1 − x2 )u′ )′ − ku = 0.
(d) x2 u′′ + xu′ + (x2 − ν 2 )u = 0 becomes −x(xu′ )′ − (x2 − ν 2 )u = 0.

5.5
It follows from the inverse monotonicity of L that there is a comparison function ϕ(x) such that
L ϕ ≥ 1. Then
L u = F ≥ −kF k = −kF k × 1 ≥ −kF k × (L ϕ)
and so, using the linearity of L , L (u + kF kϕ) ≥ 0 which, by inverse monotonicity, implies that
u + kF kϕ) ≥ 0, as required.
5.6
For the BVP (5.2) the operator L is defined by


 u(0) for x = 0,
L u(x) = −u′′ (x) + b(x)u(x) for 0 < x < 1,


u(1) for x = 1.

First, the argument that L u(x) > 0 implies that u(x) ≥ 0 for 0 ≤ x ≤ 1 carries through
unchanged.
Secondly, the existence of a comparison function is also unchanged since the function ϕ(x) =
1 + 12 x(1 − x) defined by (5.13) satisfies −φ′′ (x) ≥ 1 and so
 

 ϕ(0) 
1 for x = 0,
L ϕ(x) = −ϕ′′ (x) + b(x)ϕ(x) = 1 + b(x)ϕ(x) for 0 < x < 1,

 

ϕ(1) 1 for x = 1.

and so L ϕ ≥ 1 for b(x) ≥ 0.


The third, and final, part then follows as before.

20
5.7
a0 u′ (0) v ′ (0)
The given equations imply = = from which u′ (0)v(0) − u(0)v ′ (0)) = 0 follows.
b0 u(0) v(0)
5.8
With Lu = −u′′ + au′ + bu and integrating the term with a second derivative by parts twice
(that with a first derivative only once), we obtain
Z 1
u, Lv = u(−v ′′ + av ′ + bv) dx
0
1
Z 1

= (−u(x)v (x) + au(x)v(x)) + (u′ v ′ − au′ v + buv) dx
0 0
1
Z 1
= (−u(x)v ′ (x) + au(x)v(x) + u′ (x)v(x)) + (−uv ′′ − auv ′ + buv) dx
0 0
1
Z 1
= (−u(x)v ′ (x) + au(x)v(x) + u′ (x)v(x)) + (Mu)v dx
0 0
= Mu, v + boundary terms.

Clearly Lu = Mu when a = 0.
5.9
Multiplying both sides of −2xu′′ − u′ = 2f (x) by 12 x−1/2 we obtain

−x /2 u′′ − 12 x− /2 u′ = x− /2 f (x) ⇒ −(2x /2 u′ )′ = x− /2 f (x)


1 1 1 1 1

which has the form (5.28) with p(x) = x /2 , q(x) = 0 and g(x) = x−1/2 f (x). The change of
1

independent variable ξ = ξ(x) given by (5.30), that is,


Z x
1
ds = 2x /2
1
ξ=
0 p(s)

then leads to (5.31), i.e.,

d2 u
− = g̃(ξ) = p(x)g(x) = 2f (x) = 2f ( 41 ξ 2 ).
dξ 2
in which q̃(ξ) = 0. This boundary value problem with Dirichlet boundary conditions may be
written in the form L u = F , where L is identical to the operator defined in Example 5.2 except
that the independent variable is ξ rather than x. The arguments used there establish that this
equation has a unique solution.
5.10 Z Z
1 1
u, v = (2x − 1)(4x2 − 4x + 21 ) dx = (8x3 − 12x2 + 5x − 12 ) dx = 0.
0 0
5.11 RL
With u, v = 0 u(x)v ∗ (x) dx :
Z L ∗ Z L
∗ ∗
(a) v, u = v(x)u (x) dx = v ∗ (x)u(x) dx = u, v since (u∗ )∗ = u.
0 0
Z L
(b) u, u = |u(x)|2 dx ≥ 0 since the integrand is non-negative.
0

21
(c) Suppose that u, u = 0 but that u(x) is not identically zero. There must therefore be
point a ∈ (0, L) where u(a) 6= 0. By continuity there must be an ε > 0 such that u is
R a+ε
non-zero in the interval (a − ε, a + ε) so u, u = a−ε |u(x)|2 dx > 0 giving a contradiction.
Z L Z L Z L
∗ ∗
(d) c1 u1 + c2 u2 , v = (c1 u1 + c2 u2 )v dx = c1 u1 v dx + c2 u2 v ∗ dx by the property
0 0 0
of integrals and so c1 u1 + c2 u2 , v = c1 u1 , v + c2 u2 , v .

(e) Suppose that u and v are orthogonal with respect to the inner product u, v and are
linearly dependent. Thus u, v = 0 and there are non-zero constants a, b such that au(x)+
bv(x) = 0. However, since v(x) = −(a/b)u(x),

u, v = u, −(a/b)u(x) = −(a/b)u(x) u, u 6= 0

(having used properties (d) with c1 = −b/a, c2 = 0 and (c) 5) giving a contradiction.

5.12
For u′′ + a2 u = sin πx, 0 < x < 1 the general solution is
1
u = A sin ax + B cos ax + sin πx, a2 6= π 2 .
a2 − π 2
Applying the BCs u(0) = 1 and u(1) = −2 we find B = 1 and A sin a = −2 − cos a so that

2 sin ax + sin a (x − 1) 1
u(x) = + 2 .
sin a a − π2
Taking the limit a → 0 in the first term

2 sin ax + sin a (x − 1)
lim = 3x − 1
a→0 sin a
and the solution is well–defined: u(x) = 3x − 1 − π12 sin πx.
When a = ±π the particular solution is not valid (the right hand side is a special case of the
solution of the homogeneous equation) and so we try a particular solution of the form

u = Cx cos πx.

Substituting into the ODE gives C = −1/(2π) so the general solution is


1
u = A sin πx + B cos πx − x cos πx, a2 = π 2 .

Applying the boundary conditions leads to
1
u(0) = 1 = B, u(1) = −2 = −B −

which clearly have no solution (This is similar to the situation in linear algebra when the matrix
A is singular, the system Ax = b will have a solution only if b ∈ range(A) —in which case there
will be an infinity of solutions).
5.13
φ(x) = sin 2πx satisfies the differential equation and boundary conditions.

22
Multiplying −u′′ − 4π 2 u = f (x) by φ and integrating over (0, 1), then integrating by parts twice,
gives
Z 1 Z 1
φ(x)f (x) dx = φ(x)(−u′′ − 4π 2 u) dx
0 0
1 1
Z 1
= −φ(x)u (x) ′ ′
+ φ (x)u(x) + u(x)(−φ′′ − 4π 2 φ) dx = 0.
0 0 0
R1
The ODE cannot be satisfied with the given BCs unless 0 φ(x)f (x) dx = 0.
This condition is clearly violated when f (x) = φ(x) = sin 2πx. The ODE −u′′ − 4π 2 u = sin(2πx)
has the general solution
cos 2πx
u(x) = x + A sin 2πx + B cos 2πx

1
and applying the BCs we find u(0) = B = 0 and u(1) = 4π + B = 0 which are contradictory.
There cannot therefore beR a solution.
1
When f (x) = 1 we find 0 φ(x)f (x) dx = 0. In this case the ODE −u′′ − 4π 2 u = 1 has the
general solution
1
u(x) = − 2 + A sin 2πx + B cos 2πx

and, applying the BCs we find u(0) = − 4π1 2 + B and u(1) = − 4π1 2 + B
Thus,
u(x) = − 4π1 2 + A sin 2πx − 4π1 2 cos 2πx
satisfies the differential equation and boundary conditions for any choice of constant A so we
have a non-unique solution: the solution is unique up to an arbitrary multiple of φ(x).
5.14
The general solution is u(x) = A sin 3x + B cos 3x − 91 (x − a) and the boundary conditions give

u(0) = 0 = B + 91 a, u(π) = 0 = B cos 3π − 19 (π − a).

The values of B are inconsistent unless a = (π − a), i.e., a = 21 π. Note: This makes the rhs x− 12 π
orthogonal to the eigenfunction sin 3x of the homogeneous problem (the product of a symmetric
function and an anti–symmetric function on the interval (0, π)).
5.15
(a) The standard argument shows that φ cannot satisfy the boundary conditions unless λ > 0.
So, with λ = µ2 , the general solution of the ODE is φ(x) = A sin µx + B cos µx. The boundary
condition φ(0) = 0 requires B = 0 and φ′ (1) = 0 requires A cos µ = 0. Since A 6= 0 (since
it would lead to a trivial solution), it follows that λ = λn := (n − 12 )2 π 2 , n = 1, 2, . . ., with
corresponding eigenfunctions φn (x) = sin(n − 12 )πx.
(b) Suppose that ω 2 = λn for some value of n. If φ(x) is the corresponding eigenfunction, then
Z 1 Z 1
φ(x)(−u′′ (x) + ω 2 u) dx = φ(x)f (x) dx.
0 0

Integrating the left hand side by parts twice and using the boundary conditions on both u and

23
φ, we find
1
Z 1 Z 1
−φ(x)u′ (x) + (φ′ (x)u′ (x) + ω 2 φu) dx = φ(x)f (x) dx,
0 0 0
1
Z 1 Z 1
(−φ(x)u′ (x) + φ′ (x)u(x)) + (−φ′′ (x) + ω 2 φ)u(x) dx = φ(x)f (x) dx,
0 0 0
Z 1
2φ(1) − φ′ (0) = φ(x)f (x) dx,
0

since −φ′′ (x) + ω 2 φ = 0. The data for the problem are inconsistent unless this condition is
satisfied.
When ω 2 = λ1 = 21 π, then φ(x) = sin 21 πx and, with f (x) = c, we find that c = 12 π(2 − 12 π). The
general solution of −u′′ (x) = ω 2 u(x) + c is u(x) = A sin 12 πx + B cos 12 πx − c/ω 2 . Applying the
BCs:
u(0) = 1 = B − c/ω 2 , u′ (1) = −2 = − 21 πB
both of which give the same value B = 4/π because the value of c was carefully chosen. The
solution is, therefore, u(x) = 1 + A sin 21 πx + (4/π) cos( 21 πx) − 1 which is unique up to an
arbitrary multiple of φ.
5.16
The chain rule with ξ = x/L gives
d dξ d 1 d d2 1 d2
= = , =
dx dx dξ L dξ dx2 L2 dξ 2
so the eigenvalue problem becomes, with v(ξ) = u(Lξ),

d2 v 2 
− = (L λ)v, 0 < ξ < 1
dξ 2

v(0) = v(1) = 0.

in which the eigenvalue has become rescaled to (L2 λ). This new eigenvalue problem is identical to
that in Example 5.10 so L2 λ = (nπ)2 with corresponding eigenfunctions vn (x) = sin nπξ. Thus,
the given problem has eigenvalues λn = (nπ/L)2 with corresponding eigenfunctions un (x) =
sin nπx
L , n = 1, 2, . . .. Note: the frequency of vibration λ increases as L decreases.
5.17
When u(x) = M (x)w(x) we find

u′ (x) = M ′ (x)w(x) + M (x)w′ (x), u′′ (x) = M ′′ (x)w(x) + 2M ′ (x)w′ (x) + M (x)w′′ (x)

so that

u′′ − au′ − bu = M w′′ + (2M ′ − aM )w′ + (M ′′ − aM ′ − bM )w.

The coefficient of w′ can be made to vanish by choosing M such that 2M ′ = aM in which case
2M ′′ = a′ M + aM ′ = (a′ + 21 a2 )M and

M ′′ − aM ′ − bM = − 21 (2b + 12 a2 − a′ )M.

Thus, u′′ − au′ − bu = f becomes

−w′′ + Q(x)w(x) = G(x),

24
1
where RQ(x) = −(M ′′ − aM ′ − bM )/M = 2 (2b + 21 a2 − a′ ), G(x) = f (x)/M (x) and M (x) =
x
A exp( a(s) ds).
5.18 R1
A function u is square integrable if 0 (u(x))2 dx < ∞. When u(x) = xm ,
Z 1 Z 1 1
1
(u(x))2 dx = x2m dx = x2m+1
0 0 2m + 1 0

which is finite provided that 2m + 1 > 0. If m ≤ −1/2,


Z 1 1
1
(u(x))2 dx = lim+ x2m+1
0 ε→0 2m + 1 ε

and the limit does not exist.


5.19
With φn (x) = e2πinx/L then, for m 6= n,
Z L Z L
φn , φm = e2πinx/L e−2πimx/L dx = e2πi(n−m)x/L dx
0 0
L L L  
= e2πi(n−m)x/L = e2πi(n−m) − 1 = 0
2πi(n − m) 0 2πi(n − m)

since n − m is an integer and so e2πi(n−m) = 1. Also, when m = n,


Z L Z L
2πinx/L −2πinx/L
φn , φn = e e dx = dx = L.
0 0

5.20
For ϕn = sin(2πnx/L) and ψm = cos(2πmx/L) we use

sin A cos B = 21 (sin(A + B) − sin(A − B))

so that, for m 6= n,
Z L 
ϕn , ψm = 21 sin(2(n + m)πx/L) − sin(2(n − m)πx/L) dx
0
 L L L
= − cos(2(n + m)πx/L) + cos(2(n − m)πx/L) =0
4(n + m)π 4(n − m)π 0

When m = n,
Z L  Z L L
1 L
ϕn , ψm = sin(2nπx/L) cos(2nπx/L) dx = 2 sin(4nπx/L) dx = − cos(4nπx/L) = 0.
0 0 8nπ 0

Using cos A cos B = − 12 (cos(A + B) − cos(A − B)) and supposing that m 6= n,


Z L 
ψn , ψm = − 21 cos(2(n + m)πx/L) − cos(2(n − m)πx/L) dx
0
 L L L
= − sin(2(n + m)πx/L) + sin(2(n − m)πx/L) = 0.
4(n + m)π 4(n − m)π 0

25
Finally, with m = n,
Z L Z L
ψn , ψn = cos2 (2πx/L) dx = 1
2 (1 + cos(4πx/L)) dx = 21 L.
0 0

5.21
Suppose that the eigenvalue problem is defined by Lu = λu with boundary conditions Bu = 0.
Let v = cu, where c is a constant. By the linearity of L and B, Lv = L(cu) = cLu = cλu = λv
and B(v) = B(cu) = cBu = 0. Thus, v satisfies the same equations as u: Lv = λv and Bv = 0.
5.22
When a0 = a1 = 0, b0 6= 0, b1 6= 0 and q(x) ≡ 0 the Sturm–Liouville problem (1) becomes
)
−(p(x)u′ )′ = λw(x)u, 0<x<1
(1)
−u′ (0) = 0, u′ (1) = 0.

which has the eigenfunction u(x) = 1 corresponding to an eigenvalue λ = 0.


5.23
With φn = cos(n − 12 )x for 0 < x < π and m 6= n,
Z π
φn , φm = cos(n − 12 )x cos(m − 21 )x dx
0
Z π
1
=2 (cos(n + m − 1)x + cos(n − m)x) dx
0
 sin(n + m − 1)x sin 2(n − m)x  π
= + = 0.
2(n + m − 1) (n − m) 0

5.24
)
−u′′ + 4u = λu, 0 < x < π
(2)
u′ (0) = u(π) = 0.
When λ = 4, the ODE−u′′ = 0 has general solution u(x) = Ax + B which gives u(x) = 0, the
trivial solution, once the boundary conditions u′ (0) = u(π) = 0 have been applied.
When λ = 4−µ2 the ODE becomes u′′ −µ2 u = 0 which has general solution u(x) = Aeµx +Be−µx .
The boundary conditions give

u′ (0) = 0 = µ(A − B) and u(π) = 0 = Aeµπ + Be−µπ .

The first of those gives A = B so the second becomes A cosh µπ = 0. However, cosh z > 0 for all
real z and so this can only be satisfied when A = 0, in which case u(x) = 0—again the trivial
solution.
5.25
When λ ≤ 4 the argument from the previous exercise is easily adapted to show that only trivial
solutions are possible for the ODE −u′′ + 4u = λu with BCs u(0) = u(π) = 0. When λ > 4 we
have the general solution
√ √
u(x) = A sin λ − 4x + B cos λ − 4x

26
and the BCs give √
u(0) = 0 = B and u(π) = 0 = A sin λ − 4π = 0.
Since
√ A cannot be zero (this
√ would imply that u(x) = 0, the trivial solution) so λ must satisfy
sin λ − 4π = 0. Hence λ − 4π = nπ, n = ±1, ±2, ... giving λn = 4 + n2 with corresponding
eigenfunction un (x) = sin nπx, n = 1, 2, 3, .. (we do not include negative values of n, since
sin(−nπx) = − sin(nπx) and we would have linearly dependent eigenfunctions).
5.26
Suppose that λ = −µ2 < 0, then −u′′ = −µ2 u has general solution u(x) = Aeµx + Be−µx . The
boundary conditions give

u(0) − u′ (0) = 0 = A + B − µ(A − B) and u(π) − u′ (π) = 0 = Aeµπ + Be−µπ − µ(Aeµπ − Be−µπ ).

That is (µ − 1)A = (µ + 1)B and (µ − 1)Aeµπ = (µ + 1)Be−µπ . Substituting the first into the
second leads to eµπ = e−µπ and µ = 0. Alternatively, the boundary conditions are satisfied by
choosing µ = 1 and B = 0 (giving an eigenvalue λ = 1 with eigenfunction u(x) = ex ). The same
solution is obtained with A = 0 and µ = −1.
When λ = 0 we have u(x) = Ax + B and the BCs give A = B = 0.
When λ = µ2 > 0, then −u′′ = µ2 u has general solution u(x) = A sin µx+B cos µx and, applying
the BCs, we find

u(0) − u′ (0) = B − µA = 0 and u(π) − u′ (π) = 0 = (A sin µπ + B cos µπ) − µ(cos µπ − B sin µπ)

which, on elimination of B, give A(1 + µ2 ) sin µπ = 0. Thus, either A = 0 (the trivial solution)
or µ = ±i (which leads back to the earlier case of λ = −1) or sin µπ = 0, that is µ = n = 1, 2, . . ..
The corresponding eigenfunctions are obtained with B = nA, that is,

λn = n2 , un (x) = sin nx + n cos nx.

5.27
With u = M w the ODE −x2 u′′ + 2xu′ − 2u = λx2 u becomes (see Exercise 5.17)
 
−x2 M ′′ − aM ′ − bM + 2x M ′ w + M w′ − 2M w = λx2 M w
−x2 M w′′ + (2xM − 2x2 M ′ )w′ + (−x2 M ′′ + 2xM ′ − 2M )w = λx2 M w

and the coefficient of w′ vanishes when M − xM ′ = 0. Therefore we may choose M (x) = x and
the eigenvalue problem becomes −w′′ = λw. Since u′ = w + xw′ , the BC u′ (0) = 0 becomes
w(0) = 0 and u(1) = u′ (1) becomes w′ (1) = 0.
The standard argument can be applied to show that λ = 0 and λ < 0 both lead to trivial solutions.
For the case λ > 0, let λ = µ2 then −w′′ = µ2 w has general solution w = A sin µx + B cos µx.
The BC w(0) = 0 implies B = 0 and w′ (1) = 0 then leads to Aµ cos µ = 0. Choosing A = 0 gives
immediately the trivial solution, choosing µ = 0 leads to the earlier case λ = 0 so we are left
with cos µ = 0. Therefore µ = (n − 12 )π, n = 1, 2, . . . and the eigenvalues are λn = (n − 12 )2 π 2
with corresponding eigenfunction wn = sin(n − 12 )πx, i.e., un (x) = x sin(n − 21 )πx, n = 1, 2, . . ..
5.28
−u′′ = λu: The standard argument rules out the possibilities that λ < 0 and λ = 0 because they
both lead to trivial solutions. We therefore suppose that λ > 0 and write λ = µ2 (µ ∈ R). The
general solution may then be written as u(x) = A sin µx + B cos µx and the BC u(0) = 0 implies
that B = 0.

27
O π 2π 3π µ

Figure 5: The graphs of µ and tan µ.

The BC u(1) = u′ (1) leads to A sin µ = Aµ cos µ and, since A cannot be zero (this would lead
again to a trivial solution), µ must satisfy µ = tan µ and, for each such µ, the corresponding
eigenfunction is u(x) = sin µx.
We observe from the graphs of µ and tan µ shown in Fig. 5 that :
1. The roots of µ = tan µ occur in ± pairs. Since the eigenfunction is effectively unchanged
when µ is replaced by −µ, we need only consider positive roots.
2. tan µ = 0 at µ = nπ (n = 0, 1, 2, ...),
3. tan µ → +∞ as µ → (n + 12 )π − 0 (i.e., from the left, or below), n = 0, 1, 2, ....

4. tan µ and µ are both monotonic increasing for µ ∈ nπ, nπ + 21 π , n = 1, 2, 3, ... with
µ − tan µ > 0 at the left of each interval and < 0 at the right of each interval, hence there
must be at least one root µn in each of these intervals. Hence there are an infinite number
of roots µ from which we have an infinite number of positive eigenvalues λ = µ2n .
5. For large n, the roots approach the vertical asymptotes of tan µ, i.e., µn → (n + 21 )π.

5.29
We shall work from first principles. Multiplying the differential equation −u′′ (x) = λw(x)u(x)
by u∗ (x) and integrating by parts gives, on applying the boundary conditions,
Z 1 Z 1
−u′′ (x)u∗ (x) dx = λ w(x)u(x)u∗ (x) dx
0 0
1
Z 1 Z 1
−u′ (x)u∗ (x) + u′ (x)(u′ (x))∗ dx = λ w(x)|u(x)|2 dx
0 0 0
Z 1 Z 1
|u(1)|2 + |u′ (x)|2 dx = λ w(x)|u(x)|2 dx
0 0

and so R1
|u(1)|2 + 0 |u′ (x)|2
λ = R1
2
0 w(x)|u(x)| dx
in which both numerator and denominator are real and positive.
5.30
Multiplying the differential equation −(p(x)u′ )′ + q(x)u = λw(x)u(x) by u∗ (x) and integrating

28
by parts and applying the BCs u′ (1) = −a1 u(1)/b1 and u′ (0) = a0 u(0)/b0 gives
Z 1 Z 1
′ ′ ∗
(−(p(x)u ) + q(x)u)u (x) dx = λ w(x)u(x)u∗ (x) dx
0 0
Z 1 Z 1
1
2 2


−p(x)u (x)u (x) ∗
+ ′
p(x)|u (x)| + q(x)|u(x)| dx = λ w(x)|u(x)|2 dx
0 0 0
Z 1 Z 1
a1 a0 
p(1) |u(1)|2 + p(0) |u(0)|2 + ′ 2
p(x)|u (x)| + q(x)|u(x)| 2
dx = λ w(x)|u(x)|2 dx
b1 b0 0 0

and the result follows since p(x) > 0 (see (5.34)), a0 b0 > 0 and a1 b1 > 0.
5.31
This requires on the insertion of a factor w(x) in each of the integrands in the solution of
Exercise 5.11.
5.32 ∞
X
We take the inner product of both sides of f (x) = an φn (x) with φm (x). That is,
n=1


X
f, φm = an φn , φm w
.
n=1

Repeated application of Property (d) from Exercise 5.11 to the right hand side gives

X
f, φm = an φn , φm w
n=1

but, since φn , φm w
= 0 whenever n 6= m, this reduces to

f, φm = am φm , φm w

and the required result follows by replacing m by n.


5.33
Choosing u = φm (x) and v = φn (x) so that

Lu = λm wφm and Lv = λn wφn


R1 
then by Lagrange’s identity (5.25) 0 v ∗ Lu − uLv ∗ dx = 0. However, the eigenfunctions are
real by Exercise 5.30, so
Z 1 Z 1
 
0= v ∗ Lu − uLv ∗ dx = φn λm wφm − φm λn wφn dx
0 0
= (λm − λn ) φn , φm w

and therefore φn , φm w
= 0 provided λm 6= λn .

29
Exercises 6 Finite difference methods in R1
6.1
Using Taylor series expansions with remainder terms, (6.13) with x = xm becomes
v(xm ± h) = v(xm ) ± hv ′ (xm ) + 12 h2 v ′′ (xm ) ± 61 h3 v ′′′ (xm ) + 1 4 ′′′′ ±
24 h v (ξm ),
− +
where xm − h < ξm < xm < ξm < xm + h. Adding these series together we obtain

v(xm+1 ) + v(xm−1 ) = 2v(xm ) + h2 v ′′ (xm ) + 24
1 4 ′′′′ − +
h v (ξm ) + v ′′′′ (ξm ) .
− +
but, by the Intermediate  Value Theorem, there must be a point ξm ∈ (ξm , ξm ) such that
1 ′′′′ − ′′′′ + ′′′′
2 (v (ξm ) + v (ξm ) = v (ξm ). Consequently, on rearranging,
′′ −2
 1 2 ′′′′
v (xm ) = h v(xm+1 ) − 2v(xm ) + v(xm−1 ) − 12 h v (ξm ).

6.2

△+ △− Um = △+ (△− Um ) = △+ (Um − Um−1 ) = △+ Um − △+ Um−1


= (Um+1 − Um ) − (Um − Um−1 ) = Um+1 − 2Um + Um−1 = δ 2 Um .
(a) △− △+ Um = △− (△+ Um ) = △− (Um+1 − Um ) = △− Um+1 − △− Um
= (Um+1 − Um ) − (Um − Um−1 ) = Um+1 − 2Um + Um−1 = δ 2 Um .
 
(b) △Um = 21 (Um+1 − Um−1 ) = 12 (Um+1 − Um ) + (Um − Um−1 )
= 21 (△+ Um + △− Um )
(c) δ 2 Um = Um+1 − 2Um + Um−1 = ((Um+1 − Um ) − (Um − Um−1 )
= △+ Um − △− Um

6.3

△+ △+ vm = △+ (△+ vm ) = △+ (vm+1 − vm ) = △+ vm+1 − △+ vm


= (vm+2 − vm+1 ) − (vm+1 − vm ) = vm+2 − 2vm+1 + vm = δ 2 vm+1 .
Then solution to Exercise 6.1 gives
h−2 △+ △+ vm = h−2 δ 2 vm+1 = vm+1
′′
+ O(h2 )
′′
but vm+1 = v ′′ (xm + h) = vm
′′ ′′′
+ hvm + O(h3 ) = vm
′′
+ O(h), Hence, h−2 △+ △+ vm = vm
′′
+ O(h).
− −
The corresponding results for △ △ vm are:
h−2 △− △− vm = h−2 δ 2 vm−1 = vm−1
′′
+ O(h2 ) = vm
′′
+ O(h).

6.4
By differentiating the exact solution u(x) = cos2 (σx) − tan(σx)/tan σ it can be shown that
 tan σx 
u′′′′ (x) = 8σ 4 cos 2σx + sec2 σx − 3 sec4 σx .
tan σ

30
With σ = 3/2 and 0 ≤ x ≤ 1 we find (rounding up the bounds to avoid fractions)
tan σx
cos 2σx ≤ 1, ≤ 1, sec2 σx ≤ 200, 3 sec4 σx < 12 × 104
tan σ
which combine to show that |u′′′′ (x)| ≤ 3 × 104 and the fourth derivative is bounded. Thus the
local truncation error is bounded: |Rm | ≤ 250h2 .
From Example 6.13 the stability constant C = 9/8 and so, from Theorem 6.7,

kEkh,∞ ≤ CkRkh,∞ ≤ 300h2

(we have used the fact that R0 = RM = 0). The global error E therefore converges to zero with
h at a second order rate.
6.5
At m = 0, the equation Lh Um = Fh,m gives U0 = α.
For 0 < m < M ,
−am Um−1 + bm Um − cm Um+1 = fm
and at m = M , UM = β. With u = [U1 , U2 , . . . , UM−1 ]T , these equations may be combined to
give Au = f , where
   
b1 −c1 f1 + αa1
 −a2 b2 −c2   f2 
1 
 . .. ..



 ..


A= 2 .. . . , f = . .
h    
 −aM−2 bM−2 −cM−2   fM−2 
−aM−1 bM−1 fM−1 + βcM−1

6.6
With Lh Um := −h−2 δ 2 Um + x2m Um the local truncation error is Rm = Lh Um − fm , where
fm = xm . Therefore, using (6.30) with rm = x2m we find that Rm = O(h2 ). The BCs u(0) = 1,
u(1) = −2 have the exact replacements U0 = 1, UM = −2 so the local truncation error Rh is
estimated by (
0 M = 0, M
Rh,m = 2
.
Rh,m = O(h ) 0 < m < M
Thus, Rh = O(h2 ) showing that the method is consistent of second order.
When M = 4 the finite difference equations give, with h = 1/4

m = 0 : U0 = 1
1 1 1
m=1:− 16 (U0 − 2U1 + U2 ) + 16 U1 = 4
1 1 1
m=2:− 16 (U1 − 2U2 + U3 ) + 4 U1 = 2
1 9 3
m=3:− 16 (U2
− 2U3 + U4 ) + 16 U1 = 4
m = 4 : U4 = −2.

Multiplying the equations for m = 1, 2, 3 by 16, they may be written as Au = f , where


     
3 −1 0 U1 5
A=  −1 6 −1  , u= U 
2 , 
f = 8 .
0 −1 11 U3 10

31
6.7
am = h−2 , bm = 2h−2 + x2m , cm = h−2 , dm = xm for m = 1, 2, . . . , M − 1.
Referring to Definition 6.9, these coefficients are all positive and bm = am + cm + x2m ≥ 0 and
the corresponding operator Lh is of positive type.
6.8
(a) For 0 < m < M the local truncation error is

Rh,m = −h−2 δ 2 um − 1 = −u′′ (xm ) − 1 + O(h2 )

so it is consistent of order two with the ODE −u′′ (x) = 1, 0 < x < 1. The BC at U0 = 0 is
clearly an exact representation of u(0) = 0. At m = M ,

Rh,M = 2h−1 (uM − uM−1 ) − 1.

Now xM = 1, xM−1 = 1−h and, with the Taylor expansion u(1−h) = u(1)−hu′(1)+ 12 h2 u′′ (1)+
O(h3 ), we find
Rh,M = 2(u′ (1) + O(h)) − 1 = 2u′ (1) − 1 + O(h).
which is consistent of first order with the BC 2u′ (1) = 1. The overall order of consistency is
Rh = O(h).
(b) The scheme may be written in the general for (6.52) with a0 = 0, b0 = 1, c0 = 0 so the
inequalities (6.53) are satisfied at m = 0 with strict inequality.
For 0 < m < M : am = h−2 , bm = 2h−2 , cm = h−2 so the inequalities (6.53) are satisfied.
For m = M : aM = 2h−1 , bM = 2h−1 , cM = 0 so the inequalities (6.53) are satisfied.
The conditions of Definition 6.17 and so, by Theorem 6.18 Lh is of positive type.
The numerical solution U satisfies the equations Lh U = Fh , where


0 m = 0
Fh,m = 1 0 < m < M .


1 m=M

It follows that U ≥ 0 since Fh ≥ 0.


6.9
Since Φ(x) is a quadratic function of x, h−2 δ 2 Φm = Φ′′ (xm ) = 2c. Also,

ΦM − ΦM−1 = Φ(1) − Φ(1 − h) = hΦ′ (1) − 12 h2 Φ′′ (1) = −ch(1 − a) + ch2

Consequently,

−h−2 δ 2 Φm = −2c and h−1 (Φ(1) − Φ(1 − h)) = −c(1 − a) + ch.

Since h ≤ 12 we choose a = 41 so that 1 − a − h = 34 − h ≥ 41 and therefore c(1 − a) − ch ≥ 1


with c = −4. Then −h−2 δ 2 Φm = −2c = 8 ≥ 1. Thus Φ(x) = x(4 − x) is a possible comparison
function for Exercise 6.8.
When Um = 21 xm (3 − xm−1 ) we find U0 = 0, −h−2 δ 2 Um = 1 and 2h−1 (UM − UM−1 ) = 1 and
so U satisfies exactly the finite difference equations from Exercise 6.8. This is the only solution
since Lh is inverse monotone.

32
The general solution of the differential equation −u′′ (x) = 1 is u = A + Bx − 12 x2 . The BC
u(0) = 0 implies A = 0 while u′ (1) = 21 requires B = 3/2. Thus u(x) = 12 x(3 − x) and the global
error is
Em = u(xm ) − Um = 21 xm (xm − xm−1 ) = 12 hxm .
and so kEkh,∞ = O(h)—convergence is at a first order rate.
6.10
When the equations are written as Au = f , the first two rows of A are (when the Dirichlet BC
at m = 0 is incorporated), using (6.40b),
 
2εh−1 −(εh−2 − h−1 ) 0 ···
 −2 −1
2εh−1 −(εh−2 − h−1 ) 0 
A = −(εh + h ) .
..
.

The (1, 2) and (2, 1) entries in A differ so A cannot be symmetric.


6.11
The ODE is approximated by Lh Um = fm for m = 1, 2, . . . , M − 1, where

Lh Um := −h−2 δ 2 Um + 20h−1 △Um


= −h−2 (1 + 10h)Um−1 + 2h−2 Um − h−2 (1 − 10h)Um+1

and fm = (mh)2 . Comparing the coefficients of Lh with those of Definition 6.9, am = h−2 (1 +
10h) ≥ 0 for all h > 0, cm = h−2 (1 − 10h) ≥ 0 for h ≤ 1/10 and bm = 2h−2 = am + cm . Hence
Lh is a positive type operator for h ≤ 1/10, i.e., M ≥ 10.
With ϕ(x) = Ax + B and Lu(x) = −u′′ (x) + 20u′ (x) we find Lϕ(x) = 20A ≥ 1 if A ≥ 1/20.
Also ϕ(0) ≥ 1 and ϕ(1) ≥ 1 if B ≥ 1 and A + B ≥ 1, respectively. All these conditions can be
met by choosing A = 1/20 and B = 1 so ϕ(x) = 1 + x/20 is a comparision function for L with
Dirichlet BCs. Since ϕ is a linear function, then Lh ϕ(xm ) ≥ 1 so it also acts as a comparison
function for Lh . C = max0≤x≤1 ϕ(x) = 21/20 and therefore Lh with Dirichlet BCs is stable by
Lemma 6.8 for h ≤ 1/10.
6.12
Since δ 2 A = △A = 0, Um = A is a solution. For Um = Bρm :

δ 2 ρm = ρm−1 (1 − 2ρ + ρ2 ) = ρm−1 (ρ − 1)2


△ρm = 21 ρm−1 (ρ2 − 1) = ρm−1 (ρ − 1)(ρ + 1)

and so
 
−εh−2 δ 2 Um + 2h−1 △Um = Bρm−1 h−1 (ρ − 1) −εh−1 (ρ − 1) + (1 + ρ)

and the right hand side vanishes when ρ = (ε + h)/(ε − h). The equations therefore have a
general solution Um = A + Bρm .
Clearly ρ < 0 when h > ε so Um = Bρm changes sign from one grid point to the next. The
amplitude of these oscillations will clearly depend on the ratio h/ε and the BCs.
Note that the ODE −εu′′ + 2u′ = 0 with which it is consistent has the general solution u(x) =
a + be2x/ε so that um = a + b(e2h/ε )m . It may be shown that ρ = e2h/ε + O(h3 ), in keeping with
a scheme that is accurate of second order (ρm = (e2h/ε + O(h3 ))m so, by the binomial theorem,
ρm = (e2h/ε )m + mhO(h2 ) + higher order terms and mh = xm ).

33
6.13
The local truncation error is Rh = Lh U − Fh , where Lh Um := −εh−2 δ 2 Um + 2h−1 △− Um and
Fh,m = fm . Using the results in Table 6.1,

Rh,m = −εh−2 δ 2 mm + 2h−1 △− um − fm


1 2 ′′′′
 
= −ε u′′m + 12 h um + O(h4 ) + 2 u′m + 21 hu′′m + O(h2 ) − fm

= −εu′′m + 2u′m − fm + hu′′m + O(h2 ) = O(h)

since −εu′′ + 2u′ = f . The order of consistency is therefore first order. Also

Lh Um = −(εh−2 + 2h)Um−1 + (2εh−2 + h)Um − εh−2 Um+1

so, according to Definition 6.9, is of positive type for all ε > 0 and h > 0. The comparison
function ϕ(x) = 21 x + 1, being linear in x, also satisfies Lh ϕ(xm ) ≥ 1. Therefore Lh is stable
by Lemma 6.8 (with stability constant C = 3/2). Finally, convergence at a first order rate is a
consequence of Theorem 6.7.
6.14  
Consistency: Lh Um := h−2 −(1 − h2 )Um−1 + 2Um − (1 − h2 )Um+1 and so the local truncation
error is given by Rh = Lh u. Thus

Rh,m = h−2 −(1 − h2 )um−1 + 2um − (1 − h2 )um+1
um±h = um ± hu′m + 12 h2 u′′m ± 61 h3 u′′m + 1 4 ′′′′ ±
24 h u (ξm ), (see Exercise 6.13)
1 2 ′′′′ ± 2 ′′ 2 ′′ 1 2 ′′′′ ±
Rh,m = −u′′m + 12 h u (ξm ) + 2um + h um = h um + 12 h u (ξm )

since Lu(x) = −u′′ (x) + 2u(x) = 0. The local truncation error is O(h2 ).
An alternative approach would be to observe that Lh Um = −h−2 δ 2 Um + 2Um + δ 2 Um and using
the Taylor expansion for δ 2 um .
Stability: The expression Lh Um may be written in the form (6.32) with am = cm = 1 − h2 ,
bm = 2 and therefore satisfy the requirements of a positive type operator in Definition 6.9. The
operator Lh defined by (6.34) is inverse monotone. Therefore, to establish stability, we need only
exhibit a suitable comparison function Φ (see Lemma 6.8). With Φ = C, a constant, Lh Φm = 2C
and so ( (
Φm C for m = 0, M,
Lh Φm = =
Lh Φm 2C for m = 1, 2, . . . , M − 1,
and we shall have Lh Φ ≥ 1 by choosing C = 1 (say). Thus, Lh is a stable operator.
Convergence: This follows from Theorem 6.7.
6.15
ch u − F
From (6.51) the local truncation error Rh = L ch and, since △− um = hu′ − 1 h2 u′′ + O(h3 )
m 2 m
(see Table 6.1),

Rh,M = (a + 21 bhrM )uM + bh−1 △− uM − (β + 12 bhfM )


= (a + 12 bhr(1))u(1) + b(u′ (1) − 21 hu′′ (1) + O(h2 )) − (β + 12 bhf (1))
 
= au(1) + bu′ (1) − β + 12 hb −u′′ (1) + r(1)u(1) − f (1) + O(h2 )

and so Rh,M = O(h2 ) since au(1) + bu′ (1) = β and −u′′ (1) + r(1)u(1) = f (1). Had we used
△− um = hu′m − 12 h2 u′′m + 61 h3 u′′′ (ξm ), where xm − h < ξm < xm , we would have found that
Rh,M = bh2 u′′′ (ξm ). In both cases the local truncation error is of second order.

34
6.16
The finite difference equation (6.19) is a second order approximation of the differential equation
−u′′ (x) + r(x)u(x) = f (x) for 0 < x < 1 and the BC u(1) = β is replicated exactly by the
numerical BC UM = β. It only remains to check the local truncation error at m = 0. This is
given by

Rh,M = au0 − bh−1 △+ u0 − α


 
= au(0) − b u′ (0) + 21 hu′′ (0) + O(h2 ) − α = − 21 bhu′′ (0) + O(h2 )

since au(0) − bu′ (0) = α. Thus, Rh = O(h) and the approximation is consistent of first order.
6.17
The leading term in the local truncation error from the previous question is − 21 bhu′′ (0) and,
using the ODE −u′′ + ru = f at x = 0, this becomes 21 bh(f (0) − r(0)u(0)). Thus, subtracting
this term from the left of the BC gives the modified condition

aU0 − bh−1 △+ U0 − 12 bh(f0 − r0 U0 ) = α.

The corresponding local truncation error is

Rh,M = au0 − bh−1 △+ u0 − 12 bh(f0 − r0 u0 ) − α



= au0 − b u′ (0) + 21 hu′′ (0) + O(h2 ) − 12 bh(f0 − r0 u0 ) − α
 
= au(0) − bu′ (0) − α − 21 h −u′′ (0) + r0 u0 − f0 + O(h2 ) = O(h2 )

since au(0) − bu′ (0) = α and −u′′ (0) + r0 u0 = f0 .


6.18
At m = 0, the equation Lh Um = Fh,m gives b0 U0 − c0 = f0 .
For 0 < m < 1,
−am Um−1 + bm Um − cm Um+1 = fm
and at m = M , Lh UM = −aM UM−1 + bM UM . With u = [U0 , U1 , . . . , UM ]T , these equations
may be combined to give Au = f , where
   
b0 −c0 α
 −a1 b1 −c1   f1 
1  . . .



 . 

A= 2 .. .. ..  , f =  ..  .
h    
 −aM−1 bM−1 −cM−1  fM−1 
−aM bM β

6.19
The proof of Theorem 6.10 can be used to prove that Um cannot have a negative minimum for
1 ≤ m ≤ M − 1. It remains to prove that Um cannot have a negative minimum for either m = 0
or m = M .
We begin with the left end-point. Suppose that, contrary to the statement of the theorem, Um
has a negative minimum at m = 0 so that U1 ≥ U0 (which implies −c0 U1 ≤ −c0 U0 ) and

Lh U0 = b0 U0 − c0 U1 ≤ (b0 − c0 )U0 ≤ 0.

If this inequality were strict (because b0 > c0 ) it would contradict the assumption Lh U ≥ 0 and
prove that a negative minimum at m = 0 could not occur. Suppose therefore that equality holds
which means that b0 = c0 and U1 = U0 < 0.

35
The argument at the right end-point is essentially the same—either a negative minimum cannot
occur at m = M or bM = cM and UM−1 = UM < 0.
We now turn to the interior grid points. Suppose that, contrary to the statement of the theorem,
Um has a negative minimum at m, where 0 < m < M . The argument in Theorem 6.10 proves that
either there is a contradiction of Lh Um ≥ 0 or both Um−1 = Um = Um+1 < 0 and bm = am + cm .
Combining all three cases we see that either there is a contradiction of Lh Um ≥ 0 or the same
negative minimum is attained at all grid points and bm = am + cm for all m (recall a0 = cM = 0).
However, this last possibility is ruled out by Definition 6.17 which requires that bm > am + cm
for at least one value of m.
6.20
When 0 ≤ m < M we find Lh Um = Lh Um and Lh is shown to be of positive type in Example 6.12.
When m = M ,

Lh UM = aUM + bh−1 △− UM = −bh−1 UM−1 + (a + bh−1 )UM

which is of the form required by Definition 6.17 with aM = bh−1 and bM = a + bh−1 so both are
non-negative if b ≥ 0 and bM ≥ aM if a ≥ 0. Thus Lh is of positive type if a, b ≥ 0.
The case when both are negative can be dealt with in the same way if Lh is defined so that
Lh UM := −aUM − bh−1 △− UM .
6.21
We find that

a0 = 0, b0 = c0 = 1 b 0 = a0 + c0
am = 1, bm = 2, cm = 1 b m = am + cm , 0<m<M
aM = bM = 1, cM = 0 b M = aM + cM

so that bm = am + cm for all m and we do not have strict inequality for any m. Thus Lh is not
of positive type.
If Vm = C for m = 0, 1, . . . , M then △+ V0 = 0, δ 2 Vm = 0 for m = 1, 2, . . . , M − 1 and △− VM = 0.
Consequently Lh Vm = 0 for m = 0, 1, . . . , M . By linearity of Lh ,

Lh (U + V ) = Lh U + Lh V = Fh

so, if a solution exists then there are infinitely many solutions.


With Fh given by (6.22), the equation Lh U = Fh corresponds to
 
 −h−1 (U1 − U0 ),  α, m = 0,
Lh Um = −h−2 δ 2 Um , , Fh = fm , m = 1, 2, . . . , M − 1,
 
h−1 (UM − UM−1 ) β, m = M,

which is consistent with the BVP −u′′ (x) = f (x) (0 < x < 1) with BCs −u′ (0) = α, u′ (1) = β.
If we integrate this ODE over the interval (0, 1) and apply the BCs, we find
Z 1 Z 1
′ ′
−u (1) + u (0) = f (x) dx ⇒ −β − α = f (x) dx.
0 0

Thus, no solution is possible unless the data satisfy this compatibility condition. When they do,
u(x) + c is a solution for any constant c whenever u(x) is a solution.

36
Using the identity δ 2 = △+ △− (see Exercise 6.2) we see that
M−1
X M−1
X
δ 2 Um = △+ (△− Um )
m=1 m=1
= (△− UM − △− UM−1 ) + (△− UM−1 − △− UM−2 ) + · · · + (△− U2 − △− U1 )
= △− UM − △+ U0

by virtue of a telescoping series and △− U1 = U1 − U0 = △+ U0 .


Summing the equations Lh Um = Fh,m over m = 1, 2, . . . , M −1 gives, using the BCs −h−1 △+ U0 =
α and h−1 △− UM = β,
h  M−1
X
−h−2 △− UM − △+ U0 = fm
m=1
M−1
X M−1
X
−h−1 (β + α) = fm ⇒ −β − α = h fm
m=1 m=1

which is a discrete analogue of the compatibility condition found earlier for the ODE. Since
M−1
X Z 1
h fm → f (x) dx
m=1 0

for any continuous function f as h → 0, the continuous and discrete satisfy the same compatibility
condition in the limit, but not necessarily for finite values of h.
6.22
This modified operator has Lh U0 = b0 U0 − c0 U1 with b0 = h+ h−1 > c0 = h−1 and, since a0 = 0,
we have the strict inequality required by Definition 6.17, so Lh is of positive type (Note that it
loses this property in the limit h → 0).
Repeating the summation procedure used in the previous exercise, we now find that
M−1
X M−1
X 
hU0 − β − α = h fm ⇒ U0 = h−1 β + α + h fm
m=1 m=1

Thus, in general |U0 | → ∞ as h → 0 and there cannot be a constant C, independent of h such


that the bound kU kh,∞ ≤ CkFh kh,∞ required by Definition 6.6 holds.
6.23
Comparing the coefficients of Lh with those in Definition 6.9, am = cm = 8 > 0 and bm = 65 ≥
am + cm and so Lh is of positive type.

Lh A8m = ALh 8m = A8m−1 (8 × 82 − 65 × 8 + 8) = 0


Lh B 8−m = BLh 8−m = B8−m+1 (8 − 65 × 8 + 8 × 82 ) = 0

so both sequences satisfy Lh U = 0. Since Lh is a linear operator,

Lh (A8m + B 8−m ) = ALh 8m + BLh 8−m = 0

and Um = A8m + B 8−m is a solution for any A, B. The BCs lead to the equations

A + B = α, A8M + B 8−M = β

37
which are readily solved to give

β − α8−M α − β8−M
A = 8−M , B=
1 − 8−2M 1 − 8−2M
leading to
1 
Um = 8m−M (β − α8−M ) + 8m (α − β8−M ) .
1 − 8−2M
When M = 10 we find 8−10 ≈ 9 × 10−10 and so, when α = ±1 and β = ±2 we have Um ≈
α8−m + β8M−m . The solutions with α = ±1, β = 2 are shown in Fig. 6. On the left α = 1, β = 2
so that min(0, α, β) = 0 ≤ Um ≤ max(0, α, β) = 2. On the right α = −1, β = 2 so that
min(0, α, β) = −1 ≤ Um ≤ max(0, α, β) = 2.
b b

Um Um
1 b
1

b b
b
b b b b b b b b b b b b b b
b

M m M m

Figure 6: The points Um = α8−m + β 8m−M for m = 0, 1, . . . , M and M = 10 with α = 1, β = 2


(left) and α = −1, β = 2 (right).

6.24
If α, β ≥ 0 then min(0, α, β) = 0 and Lh U ≥ 0 then implies the result. Similarly, if α, β ≤ 0 then
by working with −U , Lh (−U ) ≥ 0 implies −U ≥ 0 = max(0, α, β).
Suppose therefore that α < 0 < β, that Lh U ≥ 0 and that U has a negative minimum. If the
minimum occurs at m = 0 then Um ≥ α as required. If the minimum occurs at m = 1:

Lh U1 = (b1 − a1 − c1 )U1 + a1 (U1 − U0 ) + a1 (U1 − U2 )

in which each of the terms on the right hand side is ≤ 0. Strict inequality (< 0) in any term
would lead to Lh U1 < 0 and contradict Lh U ≥ 0. Thus a negative minimum can occur at m = 1
if, and only if,
b1 = a1 + c1 and U2 = U1 = U0 = α.
A similar argument at m = 2 allows us to conclude that a negative minimum can occur at m = 1
or m = 2 if, and only if,

bj = aj + cj (j = 1, 2) and U3 = U2 = U1 = U0 = α.

Repeating the same argument we see that a negative minimum can occur at , ≤ m ≤ M − 1 if,
and only if,

bj = aj + cj (j = 1, 2, . . . , M − 1) and Um = α, m = 0, 1, . . . , M.

But Um = β > 0 so this is not possible. The negative minimum must therefore occur at m = 0
so Um ≥ α for m = 0, 1, . . . , M .

38
A similar argument with −U shows that −Um ≥ −β, i.e., Um ≤ β for m = 0, 1, . . . , M .
The case α > 0 > β follows by a similar argument.
6.25
The operator Lh is of positive type by Example 6.12 (with r(x) = σ 2 > 0)

 −1 + 1 2
−h △ U0 + 2 hσ U0
Lh Um = Lh Um = −h−2 δ 2 Um + σ 2 Um


(σ + 21 σ 2 h)UM + h−1 △− UM

 −1 1 2 −1
(h + 2 hσ )U0 − h U1 , m = 0,
= h−2 (−Um−1 + (2 + σ 2 h2 )Um − Um+1 ), m = 1, 2, . . . , M − 1,


(σ + 21 σ 2 h + h−1 )UM − h−1 UM−1 , m = M,

which satisfy the criteria of Definition 6.17 for σ > 0.


6.26
Rh = Lh U − Fh . At m = 0, Rh = U0 = 0.
For 0 < m < M :

Rh,m = −h−2 δx2 um + um − f (mh)


1 2 ′′′′

= − u′′m + 12 h um + O(h4 ) + um − f (mh) (see Table 6.1)
 1 2 ′′′′
= −u′′m + um − f (mh) + 12 h um + O(h4 ) = 12
1 2 ′′′′
h um + O(h4 )

since −u′′ + u = f . For m = M we use uM−1 = u(1 − h) = u(1) − hu′ (1) + 12 h2 u′′ (1) + O(h3 ) so
that

Rh,M = h−1 (1 + 12 h2 )uM − uM−1 − 12 hf (1)

= h−1 (1 + 21 h2 )u(1) − u(1) − hu′ (1) + 21 h2 u′′ (1) + O(h3 ) − 12 hf (1)

= u′ (1) + 12 h −u′′ (1) + u(1) − f (1) + O(h2 ) = O(h2 )

since u′ (1) = 0 and −u′′ + u = f .


To prove that Fh ≥ 0 implies U ≥ 0 if Lh U = Fh :
At m = 0: Lh U0 = U0 = Fh,0 = 0 and so U0 ≥ 0.
For 0 < m < M . Suppose that Um ≥ 0 is false. There must therefore be grid points at which
Um < 0 and, in particular, a grid point m = j, say, where Um has a negative minimum. Thus
Uj ≤ Uj±1 . However, this means that

Lh Uj = h−2 (−Uj−1 + 2Uj − Uj+1 ) + Uj ≤ Uj < 0

(since −Uj−1 + 2Uj − Uj+1 = (Uj − Uj−1 ) + (Uj − Uj+1 ) and both bracketed terms are ≤ 0).
This is in direct contradiction to the assertion that Lh Uj ≥ 0. Thus a negative minimum cannot
occur for 0 < m < M .
Finally, suppose that Um has a negative minimum at m = M . Therefore UM ≤ 0 and UM ≤
UM−1 .

Lh UM = h−1 ((1 + 21 h2 )UM − UM−1 ) ≤ 12 h2 UM < 0

again in direct contradiction of the assertion that Lh UM ≥ 0.


Thus U cannot have a negative minimum for m = 0, 1, . . . , M and so Um ≥ 0.

39
Note: this proof is more straightforward than this given in Theorem 6.10 and Theorem 6.18
(See Exercise 6.19) because, in the notation of Definition 6.17 we have strict inequality in bm >
am + cm , independently of h, for every m .
6.27
The argument used in (6.29) and (6.30) established a second order local truncation error for
0 < m < M . The local truncation error is identically zero at m = M . It remains to examine the
situation for m = 0. We use the expansion h−1 △+ u0 = (u(h)−u(0))/h = u′ (0)+ 12 hu′′ (0)+O(h2 )
(see Table 6.1)

Rh,0 = −h−1 △+ u0 − 1 = (−u′ (0) − 1) − 21 hu′′ (0) + O(h2 ) = − 12 hu′′ (0) + O(h2 )

since −u′ (0) = 1. The order of consistency is therefore first order.


For the second case,

Rh,0 = −h−1 △+ u0 − 1 + 21 h = (−u′ (0) − 1) − 12 hu′′ (0) + 21 h + O(h2 ) = 12 h(−u′′ (0) − 1) + O(h2 ).

However, the ODE −u′′ (x) + xu(x) = 1 evaluated at x = 0 gives −u′′ (0) = 1 so that Rh,0 =
O(h2 ): the order of consistency is second order.
6.28
A second order consistent approximation of the ODE −u′′ (x) = f (x) is −h−2 δ 2 Um = fm (see
Example 6.12). At x = 0, h−1 △+ u0 = (u(h) − u(0))/h = u′ (0) + 21 hu′′ (0) + O(h2 ) and, from the
ODE, u′′ (0) = 0. Hence the numerical BC −h−1 △+ U0 = 1 is consistent of order two.
At x = 1, we use a backward difference:

h−1 △− uM = h−1 (u(1) − u(1 − h)) = u′ (1) − 21 hu′′ (1) + O(h2 )

and, since the ODE evaluated at x = 1 gives −u′′ (1) = 1, we have

u′ (1) = h−1 △− uM − 12 h + O(h2 ).

The finite difference approximation h−1 △− UM + UM = 2 + 21 h of the BC u′ (1) + u(1) = 2 is, by


construction, consistent of order two.
6.29
Since h−2 δ 2 um = u′′m + O(h2 ) and h−1 △um = u′m + O(h2 ) (see Table 6.1), the given scheme is
consistent of second order.
At x = 1, we use a backward difference:

h−1 △− uM = h−1 (u(1) − u(1 − h)) = u′ (1) − 21 hu′′ (1) + O(h2 )

and, since the ODE evaluated at x = 1 gives −u′′ (1) + 4u′ (1) = 0, the BC u′ (1) = 2 gives
u′′ (1) = 8. Consequently,
u′ (1) = h−1 △− uM + 4h + O(h2 )
and the finite difference replacement h−1 △− UM = 2 − 4h of the BC u′ (1) = 2 is consistent of
second order.
6.30
Checking the local truncation error:

Rh,0 = h−1 (u1 − u0 ) − Au0 − B = u′ (0) + 21 hu′′ (0) − Au0 − B + O(h2 )


= u′ (0) − 21 h − Au0 − B + O(h2 ) = (2 − A)u(0) − 21 h − B + O(h2 )

40
where we have used −u′′ (0) = 1 (from the ODE) and the BC u′ (0) = 2u(0). Thus Rh,0 = O(h2 )
by choosing A = 2 and B = − 21 h leading to h−1 (U1 − U0 ) − 2U0 = − 21 h.
Note: This BC would need to be written in terms of the outward normal derivative: −u′ (0) +
2u(0) = 0 with the approximation −h−1 (U1 − U0 ) + 2U0 = 12 h in order to define an operator of
positive type.
6.31
 
  −1  
−1 1   2 −1
..
 .. ..  1 .  
  −1 . . . . . .

 . .  
T
LL = h −2
  .. = .
 −1 1 
 . −1  
  ..
.


 2 −1
−1 ρ 1 −1 
−1 1 + ρ2
ρ
When r(x) ≡ 0 and aM,M = 1 + ah/b, the matrix A in (6.47) becomes
 
2 −1
 .. .. 
 −1 . . 
A= 
.

 ..
. 2 −1 
−1 1 + ah/b

Thus LLT = A by choosing ρ2 = ah/b. This leads to a real value of ρ provided that a and b
have the same sign.
It follows that v T Av = v T LLT v = (LT v)T (LT v) = wT w ≥ 0 when w = LT v (as in Lemma 6.1).
This proves that A is positive semi-definite. We need to check that it is not possible to choose a
nonzero vector v such that v T Av = 0. This can only occur if w = 0 but it is easily verified that
the only solution of LT v = 0 is v = 0.
6.32
Since h−2 δ 2 vm = vm
′′
+ O(h2 ), we choose vm = u′′ (xm ) = h−2 δ 2 um + O(h2 ). Thus,
 
h−2 δ 2 vm = h−2 δ 2 h−2 δ 2 um + O(h2 ) = u′′′′ 2
m + O(h )

⇒ h−4 δ 4 um = u′′′′ 2
m + O(h ).

Now, with wm = δ 2 um ,
δ 4 um = δ 2 wm = wm−1 − 2wm + wm+1
= (um−2 − 2um−1 + um ) − 2(um−1 − 2um + um+1 ) + (um − 2um+1 + um+2 )
= um−2 − 4um−1 + 6um − 4um+1 + um+2
(Note Pascal’s triangular numbers). This result can be used to show that h−4 δ 4 um = u′′′′ 2
m +O(h )
by combining the Taylor expansions of um±1 and um±2 appropriately.
1 2 ′′′′
From u′′m = h−2 δ 2 um − 12 h um + O(h4 ), it follows that

u′′m = h−2 δ 2 − 12 δ um + O(h4 ).
1 4

Also
(12δ 2 − δ 4 )um = 12(um−1 − 2um + um+1 ) − um−2 + 4um−1 − 6um + 4um+1 − um+2
= um−2 − 16um−1 + 30um − 16um+1 + um+2

41
which gives the required result when both sides are divided by 12.
Thus, at grid points m = 2, 3, . . . , M − 2 the finite difference replacement

−h−2 δ 2 − 12 1 4
δ Um + rm Um = fm

of −u′′ (xm )+rm u(xm ) = fm is, by construction, consistent of order four and, for each m, involves
values of U at the five consecutive grid points xm , xm±1 , xm±2 .
It can shown (see Project 13.2) that, when r(x) ≡ 0 and the ODE is approximated at x1 and xM−1
by the standard second order finite difference equations −h−2 δ 2 Um = fm that the convergence
rate is fourth order in h provided that u and its first six derivatives are bounded on the interval
(0, 1).
6.33
Using (6.60) and the fact that δ 2 fm = 12δ 2 xm = 0 leads to
 
h−2 −Um−1 + 2Um − Um+1 + Um−1 + 10Um + Um+1 = 12xm ,
i.e., − (M 2 − 1)Um−1 + (2M 2 + 10)Um − (M 2 − 1)Um+1 = 12xm
since h−1 = M . With BCs u(0) = 3 and u(1) = −5, these can be written when M = 4 as
    
42 −15 0 U1 45 + 12x1
−15 42 −15 U2  =  12x2 ,
0 −15 42 U3 −75 + 12x3

where xm = m/4.
6.34
Suppose that

Lh um := −h−2 δ 2 um + rm um + 1 2
12 δ (rm um ) and Fh,m = fh + 1 2
12 δ fm .
1 2 ′′′′
Using h−2 δ 2 um = u′′m + 12 h um + O(h6 ), then the local truncation error at internal grid points
(given by Rh = Lh u − Fh ) satisfies
   
1 2 ′′′′
Rh,m = − u′′m + 12 h um + O(h6 ) + rm um + 12 1
h2 (ru − f )′′m + O(h4 )
  2  
1 2 d
= −u′′m + rm um − fm + 12 h −u ′′
(x) + r(x)u(x) − f (x) + O(h6 )
dx2 x=xm

so that Rh = O(h6 ) and the leading terms contain derivatives of u up to the 6th and derivatives
of f up to the 4th order.
A more careful treatment would start with the expansions

v(xm ± h) = v(xm ) ± hv ′ (xm ) + 12 h2 v ′′ (xm ) ± 1 3 ′′′


3! h v (xm ) +
1 4 ′′′′ 1 5 (5) 1 6 (6) ±
4! h v (xm ) ± 5! h v (xm ) + 6! h v (ξm ),
− +
where xm − h < ξm < xm < ξm < xm + h and deduce that

v ′′ (xm ) = h−2 δ 2 v(xm ) − 1 2 ′′′′


12 h v (xm ) − 1 4 (6)
360 h v (ξm ).

It can then be shown, in conjunction with Exercise 6.1, that


4
4 d
1
Rm = − 360 h4 u(6) (ξm ) + 1
144 h dx4 (r(x)u(x) − f (x))
x=ηm

42
where ξm , ηm both lie in the interval (xm−1 , xm+1 ).
6.35
For indices m for which Fh,m 6= 0 we have the standard inequalities:

Lh Um = Fh,m ≤ kFh kh,∞ ≤ kFh,m kh,∞ Lh Φm .

The same end result also holds for indices m such that Fh,m = 0 since Lh Um = 0 ≤ kFh,m kh,∞ Lh Φm
(because the right hand side is automatically non-negative).
Thus, Lh Um ≤ kFh,m kh,∞ Lh Φm for all m from which we have

Lh Um − kFh,m kh,∞ Φm ≤ 0

and then Um − kFh,m kh,∞ Φm ≤ 0 by inverse monotonicity.


This result is particularly useful when dealing with the local truncation error since it is frequently
identically zero at some grid points (see the following example).
6.36
The local truncation error Rh in Example 6.13 satisfies
(
0, m = 0, M
Rh,m = 1 2 ′′′′ 4
− 12 h u (xm ) + O(h ), 0 < m < M.

The global error E satisfies Lh E = Rh . With the comparison function Φm = ϕ(xm ) = 12 xm (1 −


xm ), which vanishes at the same grid points as Rh , we conclude, via the previous exercise, that

Em ≤ kRh kh,∞ Φm

A similar argument starting with Lh E = Rh ≥ −kRhkh,∞ leads to

Em ≥ −kRhkh,∞ Φm

and therefore kEkh,∞ ≤ kRh kh,∞ kΦm kh,∞ .


6.37
Suppose that Lh Um := −am Um−1 + bm Um − cm Um+1 and the coefficients have to be chosen so
that this is to be consistent with the operator defined by Lv(x) := −v ′′ (x) + r(x)v(x).
We require Lh vm = (Lv(x)) x=x for v(x) = 1, (x − xm ) and (x − xm )2 . Since Mh := Lh − L
m
is a linear operator (i.e., Mh (u + v) = Mh u + Mh v and Mh (cu) = cMh u for any sufficiently
smooth functions u and v and any constant c) it follows that
  
Mh (A + B(x − xm ) + C(x − xm )2 ) = A Mh 1 + B Mh (x − xm ) + C Mh (x − xm )2 ) = 0

for arbitrary constants A, B and C. Thus Mh p(x) = 0 for any quadratic polynomial p(x).
Applying the conditions Lh vm = (Lv(x)) x=xm
for v(x) = 1, (x − xm ) and (x − xm )2 we find

Lh 1 = −am + bm − cm = rm = (L1) x=xm


Lh (x − xm ) = ham − hcm = 0 = (L(x − xm )) x=xm
Lh (x − xm )2 = 2
−h am − h2 cm = −2 = (L(x − xm )2 ) x=xm

The first and third combine to give bm = −2h−2 + rm and the second and third give am = cm =
h−2 . Thus Lh coincides with the approximation used in standard finite difference approximation
(6.20).

43
6.38
Repeating the previous exercise with Lv(x) := −εv ′′ (x) + 2v ′ (x) we find

Lh 1 = −am + bm − cm = 0 = (L1) x=x


m
Lh (x − xm ) = ham − hcm = 2 = (L(x − xm )) x=xm
Lh (x − xm )2 = −h2 am − h2 cm = −2ε = (L(x − xm )2 ) x=xm

leading to am = h−2 (ε + h), cm = h−2 (ε − h), bm = −2h−2 ε and Lh coincides with the operator
in (6.40b).
6.39
Case (a) is entirely standard: u(x) = 1 − 16(x − 12 )4 .
In case (b), u′′ (x) = 0 for 0 < x < 12 and u(0) = 0 which gives u(x) = Ax for an arbitrary
constant A.
For 21 < x < 1, −u′′ (x) = 384(x− 21 )2 which, on integrating twice gives u(x) = ax+b−32(x− 12 )4 .
The three conditions u(1) = a + b − 2 = 0, continuity of u at x = 21 : u( 21 −) = u( 12 +), i.e.,
1 1 ′ 1 ′ 1 ′ 1
2 A = 2 a + B and continuity of u at x = 2 : u ( 2 −) = u ( 2 +), i.e., A = a lead to the solution
(
0, 0 ≤ x ≤ 1/2
u(x) = 2x + 1 4
.
−32(x − 2 ) , 1/2 < x ≤ 1

A similar procedure in case (c) leads to


(
0, 0 ≤ x ≤ 1/2
u(x) = 2x + 1 3
.
−16(x − 2 ) , 1/2 < x ≤ 1

These are shown in Fig. 7. These boundary value problems are solved numerically using the

1
Figure 7: The solutions for Exercise 6.39: case
(a) solid line, case (b) dashed line and case (c)
dotted line.
1 x
standard “second order” scheme

−h−2 δ 2 Um = fm , m = 1, 2, . . . , M − 1

with BCs U0 = UM = 0. The values of M chosen for the experiments are 8j , 9j and 5j
(j = 1, 2, . . . , 7) and the results are summarised in Fig. 8. On the left are shown graphs of
M 2 × global error for M = 9 (dots) and M = 16 (crosses) in cases (a), (b) and (c). We also
include the case labelled “Test” where f (x) = 8 and the exact solution u(x) = 4x(1 − x) is a
polynomial of degree two, for which the global error should be identically zero. The graphical
results show an error of less than 10−14 attributable to roundoff error. Including such a test
in numerical experiments is recommended to test the integrity of the code. In cases (a) and
(b) the graphs with different values of M are indistinguishable, in keeping with the global error
E ∝ 1/M 2 . In case (c) the graphs of M 2 × E appear to be two distinct continuous piecewise
linear functions. Note that a grid point lies exactly on the discontinuity in f ′ (x) at x = 1/2 when
M = 16 but this is not the case when M = 9.
On the right we show loglog plots of the global error as a function of h. For cases (a) and (b) the
results are almost identical and lie on a line having slope two, again in keeping with E ∝ h2 The

44
global error in case (c) is more erratic, especially for the larger values of h. However, the error
itself is never larger than in cases (a) and (b) and appears to behave more smoothly as h → 0.
The theory developed in this chapter requires that the first four derivatives of the exact solution
to be bounded in order that the local truncation error be bounded by a multiple of h2 , and for
the global error to converge to zero at a second order rate. The results of these experiments
suggest that a second order convergence rate is attainable under less onerous constraints, but
that goes beyond the scope of this book.

0
−14 10
x 10
4 4

2 3 −2
10
0 Test 2 (a) 2
=
−2 1 −4
10 o pe
sl
−4 0
0 0.5 1 0 0.5 1
−6
10
6 4

3 −8
4 10
(b) 2 (c)
2
1 −10
10 −5 −4 −3 −2 −1 0
10 10 10 10 10 10
0 0
0 0.5 1 0 0.5 1 h
Figure 8: The graphs show M 2 ×E (E is the global error) for M = 9 (dots) and M = 16 (crosses)
in the test case and cases (a), (b) and (c).

45
Exercises 7 Maximum principles and energy methods
7.1
With v(x, t) = u(x, t) + ε(τ − t) in place of (7.2) and it follows that −κvxx + vt = −κuxx + ut −κε
so that −κvxx + vt < 0 for all positive values of ε and the proof proceeds as before (but restricted
to 0 ≤ t ≤ τ ).
7.2
We have ut = κuxx and so:
1. −κuxx + ut ≤ 0 and therefore, by Theorem 7.1, u(x, t) is either constant or else attains its
maximum value on Γτ .
2. −κuxx + ut ≥ 0, that is κ(−u)xx − (−u)t ≤ 0 and therefore, by Theorem 7.1, −u(x, t) is
either constant or else attains its minimum value on Γτ . Thus, u(x, t) is either constant or
else attains its minimum value on Γτ .

7.3
If L u(x, t) ≥ 0 then −κuxx + ut ≥ 0 and therefore, by Theorem 7.1 applied to −u (or part (b)
of the previous solution), u(x, t) is either constant or else attains its minimum value on Γτ . But
L u(x, t) ≥ 0 also implies that u(x, t) ≥ 0 for (x, t) ∈ Γτ . Hence u(x, t) ≥ 0 for (x, t) ∈ Ωτ .
7.4
Differentiating M (t) and using the PDE gives
Z 1 Z 1

  1
M (t) = ut dx = uxx − 2ux dx = ux − 2u = 0.
0 0 x=0

R1
Therefore M (t) = M (0) = 0 6x dx = 3.
For the energy E(t) we have, using integration by parts,
Z 1 Z 1


E (t) = 2uut dx = 2 u uxx − 2ux dx
0 0
Z 1 Z 1
2 2
 1
= −2 (ux ) dx + 2 uux − 2u = −2 (ux )2 dx.
0 x=0 0
R1
Thus E ′ (t) ≤ 0 so that E(t) ≤ E(0) = 0 36x2 dx = 12.
7.5
The PDE ut = xuxx + ux may be written as ut = (xux )x so, multiplying by u and integrating
over the interval (0, 1) gives
Z 1 Z 1 Z 1
 1
uut dx = u(xux )x dx = uxux x=0
− x(ux )2 dx
0 0 0
Z 1 Z 1
d
1
2 u2 dx = − x(ux )2 dx ≤ 0.
dt 0 0

The boundary terms vanish by virtue of the BCs u(0, t) = u(1, t) = 0. Thus, the energy
R1 R1
E(t) := 0 u2 dx is a decreasing function of t so E(t) ≤ E(0) = 0 sin2 πx dx = 1/2.

46
7.6
Differentiating under the integral sign we find, on integrating by parts,
Z 2 Z 2 Z 2
d
ru2 dr = 2 ruut dr = 2 u(rur )r dr
dt 1 1 1
Z 2 Z 2
2
= −2 r(ur )2 dr + 2 ruur = −2 r(ur )2 dr
1 r=1 1
R2
since u = 0 at r = 1 and r = 2. Thus, the energy E(t) := 1 ru2 dr is a decreasing function of t
R1
so E(t) ≤ E(0) = 0 r(r − 1)2 (2 − r)2 dx = 1/20.
7.7
Differentiating under the integral sign we find
Z 1 Z 1
d
(ux )2 dx = 2 ux uxt dx
dt 0 0

but uxt = uxxx , and so


Z 1 Z 1 Z 2
d  1
(ux )2 dx = 2 ux uxxx dx = −2 (uxx )2 dr + 2 ux uxx .
dt 0 0 1 x=0

The boundary terms clearly vanish if homogeneous Neumann conditions ux = 0 are applied at
x = 0 and x = 1. When homogeneous Dirichlet conditions u = 0 are applied we deduce, from
the PDE, that uxx = ut and boundary terms again vanish because ut (0, t) = ut (1, t) = 0. Thus
R1
0
(ux )2 dx is a decreasing function of t and
Z 1 Z 1 Z 1
(ux (x, t))2 dx ≤ (ux (x, 0))2 dx = (g ′ (x))2 dx.
0 0 0

7.8
When the PDE −uxx − uyy = f is written as − div grad u = f and multiplied by u, we use the
multi-dimensional version of differentiation of a product:

div (α~v ) = α div ~v + ~v · grad α

with ~v = grad u and α = u. Thus


Z Z Z

uf dΩ = − u div grad u dΩ = − div (u grad u) − grad u · grad u dΩ
Ω Ω Ω

Applying the Divergence Theorem to the first term on the right hand side leads to
Z Z Z

uf dΩ = − u~n · grad u ds + (ux )2 + (uy )2 dΩ

Z ∂Ω Ω
2 2

= (ux ) + (uy ) dΩ

since u = 0 on ∂Ω.
Suppose that the problem consisting of Poisson’s equation − div grad u = f in Ω with BCs u = 0
on ∂Ω has two solutions u1 , u2 . Then, by virtue of the linearity of the problem, the difference

47
v = u1 − u2 satisfies Laplace’s equation − div grad v = 0 in Ω with BCs v = 0 on ∂Ω. The
energy identity applied to v (with f ≡ 0) then gives
Z

(vx )2 + (vy )2 dΩ = 0

and so vx = vy = 0 in Ω. This implies that v = constant in Ω but, since v = 0 on ∂Ω the


constant must vanish. Hence, v = u1 − u2 = 0 and the solution must be unique.
7.9
With homogeneous Neumann BCs: un := ~n · grad u = 0 on ∂Ω. Thus, after application of the
Divergence Theorem the boundary terms still vanish so v again satisfies
Z

(vx )2 + (vy )2 dΩ = 0

from the previous solution. However, the BCs no longer allow us to conclude that v = 0 from
vx = vy = 0 in Ω. In fact the solution is only unique up to an arbitrary constant.
7.10
From Example 7.11
Z 1  1

E (t) = 2 ut utt − c2 uxx dx + 2c2 ux ut .
0 0

Using utt = a2 uxx and and applying the new boundary conditions ux (0, t) = αu(0, t) and
ux (1, t) = βu(0, t) leads to
a1 a0 
E ′ (t) = −2c2 u(1, t)ut (1, t) + u(0, t)ut (0, t) .
b1 b0

However, 2uut = ∂t u2 so this expression can be written as


d a1 a0 
E(t) + c2 ( u2 (1, t) + u2 (0, t)) = 0
dt b1 b0
e = E(t) +
so the modified energy E(t) a1 2 2 a0 2 2
b1 c u (1, t) + b0 c u (1, t) is constant in time.
e if a1 /b1 ≥ 0 and
E(t) is clearly a nonnegative function and this property will be inherited by E(t)
a0 /b0 ≥ 0. That is, the BCs should be based on outward normal derivatives at the endpoints.
7.11
Differentiating m(t) and using the PDE gives
Z ∞ Z ∞ Z 1
 

m (t) = ut dx = uxxx − 6uux dx = uxxx − 3(u2 )x dx
−∞ −∞ 0
2
 ∞
= uxx − 3u =0
x=−∞

since u and its derivatives tend to zero at ±∞. Therefore m(t) is constant in time.
Similarly for M (t):
Z ∞ Z ∞

M ′ (t) = 2uut dx = 2 uuxxx − 6u2 ux dx
−∞ −∞

48
and, integrating the term involving uuxxx by parts,
Z ∞ Z ∞

3
 ∞ 

M (t) = 2(uuxx ) −2 ux uxx + 2(u )x dx = 2(uuxx) − ∂x (ux )2 + 4(u3 )x dx
−∞ −∞ x=−∞ −∞

2 3
= (2uuxx − (ux ) − 4u ) =0
−∞

since u and its derivatives tend to zero at ±∞. Therefore M (t) is constant in time.
7.12
Differentiating E(t), we find on integrating by parts (we shall ignore the boundary terms since
they all vanish)
Z ∞ Z ∞
E ′ (t) = (ux uxt − 3u2 ut ) dx = (−uxxut − 3u2 ut ) dx.
−∞ −∞

Now, using ut = −6uux − uxxx ,


Z ∞ Z ∞ Z ∞
1 2

uxx ut dx = − uxx (uxxx + 6uux) dx = − 2 ∂x (uxx ) + 6uux uxx dx
−∞ −∞ −∞
Z ∞
=− 6uux uxx dx
−∞
Z ∞ Z ∞ Z ∞
2 2

3u ut dx = − 3u (uxxx + 6uux) dx = − −6uuxuxx + 6(u3 )x dx
−∞ −∞ −∞
Z ∞
= 6uux uxx dx.
−∞

Combing these gives E ′ (t) = 0 so E(t) = constant.

49
Exercises 8 Separation of variables
8.1
As in Example 8.1, u(x, t) = X(x)T (t), where X satisfies −X ′′ = λX for 0 < x < 1 but, in this
case, the BCs are X ′ (0) = X ′ (1) = 0.
When λ = −µ2 < 0, the general solution is X = Aeµx + Be−µx and the BC X ′ (0) = 0 gives
µ(A − B) = 0. Thus, since µ = 0 is not possible (since λ < 0) we must have A = B . The second
BC then gives Aµ(eµ − e−µ ) = 0. But eµ 6= e−µ for µ 6= 0 so we are left with A = 0, leading to
the trivial solution X(x) = 0.
When λ = 0, the general solution is X = A + Bx and the BCs X ′ (0) = X ′ (1) = 0 both require
B = 0 with no restriction on A. Thus X(x) = A is a nontrivial solution corresponding to an
eigenvalue λ = 0. Since T ′ (t) = −λT (t), we have T (t) = constant and the corresponding solution
of the heat equation is u(x, t) = A.
When λ = µ2 > 0, the general solution is X = A sin µx + B cos µx and the BC X ′ (0) = 0 gives
µA = 0. Thus, since µ = 0 is not possible (since λ > 0) we must have A = 0 . The second
BC then gives Bµ sin µ = 0. To avoid the trivial solution, µ must be chosen so that sin µ = 0,
2
thus µ = nπ for n = 1, 2, . . .. Correspondingly, T ′ (t) = −λT (t), so T (t) = Ce−(nπ) t , leading to
2
fundamental solutions e−(nπ) t cos nπx.
The general solution is a linear combination of all fundamental solutions and so takes the form
X∞
1 2 2
u(x, t) = u(x, t) = A0 + An e−κn π t cos nπx.
2 n=1

The factor 1/2 in the leading term allows all the coefficients to be determined by the same
formula Z 1
An = 2 g(x) cos nπx dx, n = 0, 1, 2, . . . .
0
R1
(see Example 8.2). When g(x) = x we find A0 = 2 0 x dx = 1 and, using integration by parts,
Z 1 Z 1
sin nπx 1 2
An = 2 x cos nπx dx = 2x − sin nπx dx
0 nπ 0 nπ 0
2 1 2
= 2 2 cos nπx = 2 2 ((−1)n − 1).
n π 0 n π
Thus, An = 0 when n is even and An = 4/(nπ)2 when n is odd.
8.2
We use the facts that |8x−4| = 8x−4 for x ≥ 1/2, |8x−4| = −(8x−4) for x ≤ 1/2 and |8x−4| ≤ 1
for 3/8 ≤ x ≤ 5/8. Therefore 1 − |8x − 4| < 0 outside this interval and


 0 0 ≤ x ≤ 3/8

8x − 3 3/8 ≤ x ≤ 1/2
g(x) =

 5 − 8x 1/2 ≤ x ≤ 5//8


0 5/8 ≤ x ≤ 1.

50
Now
Z 1 Z 1/2 Z 5/8

g, sin nπx = g(x)sin nπx dx = (8x − 3)sin nπx dx + (5 − 8x)sin nπx


0 3/8 1/2

1/2
Z 1/2
cos nπx 8
= −(8x − 3) + cos nπx dx
nπ 3/8 nπ 3/8

5/8
Z 5/8
cos nπx 8
− (5 − 8x) − cos nπx dx
nπ 1/2 nπ 1/2

cos 12 nπ 8 1/2
cos 21 nπ 8 5/8

=− + 2 2 sin nπx + − 2 2 sin nπx


nπ n π 3/8 nπ n π 1/2

8  16 
= 2 2 2sin 12 nπ − sin 83 nπ − sin 58 nπ = 2 2 sin 21 nπ − sin 21 nπ cos 18 nπ
n π n π
32 2 1 1
= 2 2 sin 16 nπsin 2 nπ.
n π
Then An = g, sin nπx / sin nπx, sin nπx and sin nπx, sin nπx = 1/2 and so An is given by
(8.12).
8.3
The mean value theorem states that if g is continuous on an interval [a, b] and differentiable on
the open interval (a, b) then there is a point c ∈ (a, b) such that
g(b) − g(a)
g ′ (c) = .
b−a
If we choose b = x, a = 1 − x, then, for x > 21 ,
g(x) − g(1 − x)
g ′ (c) = = 0, 1 − x < c < x.
2x − 1
It follows that g ′ ( 12 ) = 0 by taking the limit x → 12 .
With the change of variable x = 1 − s and v(s, t) = u(1 − s, t),
vt = ut (1 − s, t), vs = −ux (1 − s, t), vss = uxx (1 − s, t)

and therefore

vt − κvss = ut (1 − s, t) − κuxx (1 − s, t) = ut (x, t) − κuxx (x, t) = 0.

Also v(0, t) = u(1, t) = 0, v(1, t) = u(0, t) = 0 and v(s, 0) = u(1 − s, 0) = g(1 − s) = g(s) (since
g is symmetric about x = 1/2).
8.4
With u(x, t) = X(x)T (t), then −X ′′ = λX for 0 < x < 1/2 and the BCs are X(0) = X ′ (1/2) = 0.
The standard argument shows that λ = µ2 > 0 and X(x) = A sin µx is the most general solution
satisfying the BC X(0) = 0. Applying X ′ (1/2) = 0 leads to cos 12 µ = 0 which means that µ must
be an odd multiple of π: µ = (2m − 1)π. Thus, X(x) = A sin(2m − 1)πx, λ = (2m − 1)2 π 2
2 2
and T ′ (t) = −λT (t) giving T (t) = Be−(2m−1) π . The fundamental solutions are um (x, t) =
2 2
e−(2m−1) π sin(2m − 1)πx and the general solution is a linear combination of these:

X 2
π2
u(x, t) = Am e−(2m−1) sin(2m − 1)πx.
m=1

51
When g(x) = 0 for 0 < x < 3/8 and g(x) = 1 for 3/8 < x < 1/2 we have
Z 1/2
1 1/2
g, sin(2m − 1)πx = sin(2m − 1)πx = − cos(2m − 1)πx 3/8
3/8 (2m − 1)π
1 1
= cos 38 (2m − 1)π = sin 21 (2m − 1)π sin 18 (2m − 1)π.
(2m − 1)π (2m − 1)π
R 1/2
Since sin(2m − 1)πx, sin(2m − 1)πx = 0 sin2 (2m − 1)πx dx = 1
4, we have, since An =
g, sin(2m − 1)πx / sin(2m − 1)πx, sin(2m − 1)πx ,

X 4 2 2
u(x, t) = sin 12 (2m − 1)π sin 18 (2m − 1)πe−(2m−1) π sin(2m − 1)πx.
m=1
(2m − 1)π

This is identical with (8.11) when n = 2m − 1.


The boundary value problem in Example 8.4(a) satisfies the conditions of Exercise 8.3 so that u
is symmetric about x = 1/2: u(x, t) = u(1 − x, t). Hence, with x = 21 − s,

u( 21 + s, t) − u( 21 − s, t)
0 = lim = 2ux ( 12 , t)
s→0 s
by l’Hôpital’s rule.
8.5
From Example 8.1 the general solution of the heat equation with BCs u = 0 at both x = 0 and
x = 1 is given by (8.6) and the coefficients by (8.8). When g(1 − x) = g(x) we have, making a
change of variable x = 1 − s,
Z 1 Z 1 Z 1
hg, Xn i = g(x) sin nπx dx = g(1 − x) sin nπx dx = g(s) sin nπ(1 − s) ds
0 0 0
Z 1 Z 1
=− g(s) cos nπ sin nπs ds = (−1)n+1 g(s) sin nπs ds = (−1)n+1 hg, Xn i.
0 0

It follows that hg, Xn i = −hg, Xn i when n is even. Consequently g, Xn = 0, and so An = 0


when n is even.
8.6
Looking for a separable solution u(x, t) = X(x)T (t), when subsituted into the PDE gives

−X ′′ (x) + 2X ′ (x) T ′ (t)


X(t)T ′ (t) − X ′′ (x)T (t) + 2X ′ (x)T (t) = 0 ⇒ =− .
X(x) T (t)
The left hand side is a function of x only and the right hand side a function of t only. Hence
both sides must be constant, equal to λ, say. Thus

−X ′′ (x) + 2X ′ (x) = λX(x), T ′ (t) = −λT (t).

The ODE for X has the general solution is X = Aeσ1 x + Beσ2 x , where σ1 and σ2 are the roots
of the quadratic √
σ 2 − 2σ + λ = 0 ⇒ σ1,2 = 1 ± 1 − λ.
1. λ < 1: The roots are real and distinct and only the trivial solution X ≡ 0 can satisfy the
BCs.

52
2. λ = 1: There is a double root σ = 1 so the general solution is X = (Ax + B)ex and the
BCs again lead to the trivial solution.
3. λ = 1 + µ2 > 1: the roots are σ1,2 = 1 ± iµ so the general solution is X = ex (A sin µx +
B cos µx). The BC X(0) = 0 gives B = 0 and X(1) = 0 gives A sin µ = 0. Thus, to avoid
a trivial solution, µ = nπ, n = 1, 2, . . . and

λn = 1 + n2 π 2 , Xn = ex sin nπx, Tn (t) = e−λn t


2 2
leading to fundamental solutions un = ex−n π t sin nπx, n = 1, 2, . . .. These are of the form
u(x, t) = exp(x − αt) sin βx with α = λn and β = nπ. The general solution takes the form

X 2
π2 t
u(x, t) = ex An e−n sin nπx
n=1

for arbitrary constants {An }.

At t = 0 we require u(x, 0) = 1, that is



X ∞
X
1 = ex An sin nπx ⇒ e−x = An sin nπx
n=1 n=1

where the functions {sin nπx}∞ n=1 are mutually orthogonal with respect to the standard
inner product on (0, 1). Since
Z 1
1 − e−1 (−1)n
e−x , sin nπx = e−x sin nπx dx = nπ ,
0 1 + n2 π 2

(integration by parts twice) and sin nπx, sin nπx = 1/2 we have

X
x 1 − e−1 (−1)n −n2 π2 t
u(x, t) = 2e nπ e sin nπx.
n=1
1 + n2 π 2

8.7
From Exercise 4.20
1
ux = cos θ ur − sin θ uθ = cos θf ′ (r),
r
since u = f (r). Allowing x, y → 0 would lead to ux (x, y) being multivalued at the origin (because
it would depend on the angle at which the origin was approached) unless f ′ (0) = 0.
8.8
With x = r cos θ sin φ, y = r sin θ sin φ, z = r cos φ, the chain rule gives

ur = xr ux + yr uy + zr uz = cos θ sin φux + sin θ sin φuy + cos φuz



uθ = xθ ux + yθ uy + zθ uz = r − sin θ sin φux + cos θ sin φuy

uφ = xφ ux + yφ uy + zφ uz = r cos θ cos φux + sin θ cos φuy − sin φuz

Multiplying the first of these by r sin θ cos φ, the second by − sin θ/ sin φ and the third by
cos θ cos φ and adding the results together gives
1 sin θ 
ux = r sin θ cos φur − uθ + cos θ cos φuφ
r sin φ

53
and so ux = sin θ cos φf ′ (r) when u = f (r), a function of r alone. Thus, ux would be multivalued
at the origin (because it would depend on the angle at which the origin was approached) unless
f ′ (0) = 0.
8.9
When g(r) = 1 − (r/b)2 for 0 ≤ r ≤ b and g(r) = 0 for b < r ≤ a
Z a   Z b  
rξn 2 rξn
rg(r)J0 dr = r(1 − (r/b) )J0 dr
0 a 0 a

From Exercise D.4 and writing ω = bξn /a,


Z b   Z
rξn a 2 ω b2
rg(r)J0 dr = xJ0 (x) dx = J1 (ω)
0 a ξn 0 ω
R 3
and, using x J0 (x) dx = 2x2 J0 (x) + x(x2 − 4)J1 (x), we find
Z b   Z
r 2 rξn 1 a 4 ω 3 b2 
r J0 dr = 2 x J0 (x) dx = 4 2ω 2 J0 (ω) + ω(ω 2 − 4)J1 (ω) .
0 b a b ξ n 0 ω
These combine to give the required result.
8.10
The heat equation with spherical symmetry is given by (8.25) which can be written as ut =
1 2 2
r 2 (r ur )r . This is a special case of the generic form (8.13) with w = r and

Lu := −(r2 ur )r .

Looking for a separable solution u(r, t) = R(r)T (t) requires

T ′ (t) (r2 R′ (r))′


= = constant = −λ
T (t) r2 R(r)
by the standard argument. The eigenvalue problem for R reads

−(r2 R′ (r))′ = λr2 R(r), 0<r<a

with R(a) = 0. If R(r) = X(r)/r then


X ′ (r) X(r)
R′ (r) = − 2 , (r2 R′ (r)) = rX ′ (r) − X(r), (r2 R′ (r))′ = rX ′′ (r)
r r
and so X satisfies −X ′′ (r) = λX(r), 0 < r < a with X(0) = X(a) = 0. The argument
used in Example 8.1 can be adjusted to allow a different length of the interval from which the
eigenfunctions can be shown to be Xn = sin(nπx/a) corresponding to eigenvalues λn = (nπ/a)2 .
Thus, the fundamental solutions are
sin(nπx/a)
un (r, t) = e−λn t
r
and so the general solution is given by (8.26). The eigenfunctions are orthogonal with respect to
the weighted L2 (0, a) inner product with weight w = r2 :
Z a
hu, vi = r2 u(r)v(r) dr
0

54
so the coefficients are given by (8.17), that is, with Rn (r) = Xn (r)/r
Ra 2 Z a
hg, Rn iw r g(r)Rn (r) dr
An = = 0R a = (2/a) rg(r) sin(nπr/a) dr
hRn , Rm iw 2
0 (r Rn (r)) dr 0
Ra Ra
since 0 (r Rn (r))2 dr = 0 sin2 (nπr/a) dr = 12 a.
8.11
When a = 1/2, b = 1/4, and g(r) = 1 for 0 < r < b and is otherwise zero, we find on integration
by parts,
Z 1
4 1
An = 4 r sin(2nπr) dr = (sin 21 nπ − 21 nπ cos 12 nπ)
0 n2 π 2
Hence
 1 1

− cos mπ = (−1)m−1 , when n = 2m
An = 4mπ 4mπ
 1 1
 sin 21 (2m − 1)π = (−1)m−1 , when n = 2m − 1.
(2m − 1)2 π 2 (2m − 1)2 π 2

8.12
With g(r) = 1 − (r/b)2 , 0 ≤ r ≤ b and g(r) = 0 for b < r ≤ a in the expression for the coefficients
in Exercise 8.10, the change of variable r = bx gives
Z
2b2 1 nπb
An = x(1 − x2 ) sin ωx dx, ω= .
a 0 a
Integrating by parts three times, we find
Z  Z 1 
2b2 1 2b2
An = (1 − 3x2 ) cos ωx dx = −2sin ω + 6 xsin ωx dx
aω 0 aω 2 0
  Z 1    
2b2 6 2b2 6 sin ω
= −2sin ω + − cos ω + cos ωx dx = −2sin ω + − cos ω +
aω 2 ω 0 aω 2 ω ω
which simplifies to the required result.
8.13
The solution is given by (8.26) with the coefficients in Exercise 8.11 with a = 1 and g(r) = 1.
Thus,
Z 1
2 2
An = 2 r sin(nπr) dr = − cos(nπ) = (−1)n−1
0 nπ nπ
and the solution is
X∞
2 2 sin nπr
u(r, t) = 2 (−1)n−1 e−n π t .
n=1
nπr
sin x
The result follows by taking the limit r → 0 and using the fact that x → 1.
2
At large times the leading term dominates and u(0, t) ≈ 2e−π t .
8.14
Substituting u(x, t) = X(x)T (t) into the PDE gives, on dividing by X(x)T (t),
κX ′′ (x) T ′ (t)
= − 1 = −λ
X(x) T (t)

55
leading the the eigenvalue problem −X ′′ (x) = λ̃X(x), 0 < x < L with X(0) = X(L) = 0
and λ̃ = λ/κ. The procedure used in Example 8.1 can be readily adapted to show that this
has nontrivial eigenvalues λ̃n = (nπ/L)2 (and therefore λn = κ(nπ/L)2 ) with corresponding
eigenfunctions Xn (x) = sin(nπx/L) . The temporal behaviour is governed by T ′ (t) = (1−λn )T (t)
and so T (t) = A exp((1 − λn )t) for any constant A. The general solution is, therefore,

X nπx
u(x, t) = An e(1−λn )t sin . (8.14a)
n=1
L

This will match the initial condition u(x, 0) = sin(nπx/L) by choosing An = 1 as the only
nonzero coefficient so the required solution is
nπx nπ 2
u(x, t) = e(1−λn )t sin , λn = κ .
L L
This tends to zero as t → ∞ if, and only if, λn > 1, that is, L < L∗ , where L∗ is defined by

L∗ = κnπ.
If the domain length L is longer than this then λn < 1 the solution will grow exponentially.
The behaviour of the solution depends on the balance of diffusive forces (represented by κuxx )
that cause the solution to decay with time, and reactive forces (represented by u) that cause the
solution to grow with time. The tipping point is represented by the critical length L∗ .
The critical length increases√with wavenumber (n) so, for a given length L, the high wavenumber
terms—those with n > L/( κπ) in the general solution (8.14a)—will decay, leaving a growing
solution that becomes smoother in time.
8.15
When g0 is given by (8.43)

X ∞
X
g0 (x + ct) + g0 (x − ct) = An (sin nπ(x + ct) + sin nπ(x − ct)) = 2 An sin nπx cos nπct.
n=1 n=1

When g1 is given by (8.44)


Z x+ct ∞
X Z x+ct
g1 (z) dz = Bn cnπ sin nπz dz
x−ct n=1 x−ct

X ∞
X
= −c Bn (cos nπ(x + ct) − cos nπ(x − ct)) = 2c Bn sin nπx sin nπct.
n=1 n=1

Combining these in d’Alembert’s solution (4.20) leads to (8.42).


8.16
Substituting u(x, t) = X(x)T (t) into the PDE gives, on dividing by X(x)T (t),
X ′′ (x) T ′′ (t)
= = −λ
X(x) T (t)
leading the the eigenvalue problem −X ′′ (x) = λX(x), 0 < x < 1 with X(0) = X ′ (L) = 0. The
standard arguments can be used to show that only trivial solutions are possible when λ ≤ 0.
When λ = µ2 > 0, the general solution is
X(x) = A sin µx + B cos µx

56
and X(0) = 0 immediately requires B = 0. Then X ′ (1) = Aµ cos µ = 0 requires µ = (n− 21 )π (an
odd multiple of π/2) in order to avoid a trivial solution. Thus λn = (n− 12 )2 π 2 with corresponding
eigenfunctions Xn (x) = sin(n − 21 )πx.
The ODE T ′′ (t) + µ2 T (t) = 0 has the general solution T (t) = C sin(n − 12 )πt + D cos(n − 21 )πt,
for arbitrary constants C and D. This leads to the general solution

X 
u(x, t) = Cn sin(n − 12 )πt + Dn cos(n − 21 )πt sin(n − 12 )πx
n=1

that satisfies the PDE and all BCs. The initial condition u(x, 0) = 0 leads to

X
0= Dn sin(n − 21 )πx
n=1

from which Dn = 0 (this follows because the eigenfunctions {sin(n − 12 )πx} are mutually orthog-
onal). Therefore

X
u(x, t) = Cn sin(n − 12 )πt sin(n − 21 )πx
n=1

and the coefficients Cn could be determined by imposing an initial condition of the form ut (x, 0) =
g1 (x). Then,
hg1 , Xn i
Cn = .
hXn , Xn i

8.17
Substituting u(x, t) = X(x)T (t) into the PDE gives, on dividing by X(x)T (t),
X ′′ (x) T ′′ (t)
= = −λ
X(x) T (t)
leading the the eigenvalue problem −X ′′ (x) = λX(x), −a < x < a with X(−a) = X(a) = 0.
The standard arguments can be used to show that only trivial solutions are possible when λ ≤ 0.
When the origin is not one of the endpoints the calculations are simplified by writing the general
solution for λ = µ2 > 0 as
X(x) = A sin µ(x + β)
for arbitrary constants A and β. The BC X(−a) = 0 immediately sets β = a and X(a) = 0
leads to A sin 2µa = 0. Thus, to avoid trivial solutions we must choose µ = 12 nπ/a and the
eigenvalues are λn = ( 21 nπ)2 with corresponding eigenfunctions Xn (x) = sin( 12 nπ(x + a)/a).
These eigenfunctions are closely related to those in Example 8.1.
The ODE T ′′ (t) + µ2 T (t) = 0 has the general solution T (t) = C sin µt + D cos µt, for arbitrary
constants C and D. This leads to the general solution

X nπt nπt  nπ(x + a)
u(x, t) = Cn sin + Dn cos sin
n=1
2a 2a 2a

that satisfies the PDE and all BCs.


The initial conditions u(x, 0) = g0 (x) and ut (x, 0) = 0 give

X ∞
X
nπ(x + a) nπ nπ(x + a)
g0 (x) = Dn sin , 0= Cn sin .
n=1
2a n=1
2a 2a

57
Since the eigenfunctions are orthgonal on the interval (−a, a),

hg0 , Xn i
Dn = , Cn = 0.
hXn , Xn i

and hXn , Xn i = 12 a.
When g0 (x) = max(0, 1 − (x/b)2 ) (b < a) a change of variable x = bs and integrating by parts
twice gives
Z b Z 1
2 x 2b nπb a
Dn = (1 − ( )2 ) sin 21 nπ(x + a)/a dx = (1 − s2 ) sin ω(s + α) ds, ω= , α=
a −b b a −1 a b
1 sin αω sin ω 
=8 − cos ω .
ω αω ω
The solution is shown in Fig. 8.7 (dashed line) at time t = .75 with a = 1/2, b = 1/4 (see
Example 8.11).
8.18
Since utt + 2ut = uxx , we suppose that u(x, t) = X(x)T (t), then

T ′′ + 2T ′ X ′′
= .
T X
The left hand side is a function of t only while the right side is a function of x only, so both sides
must be constant (the separation constant). The BCs stipulate that u = 0 at x = 0 and x = 1
so, for nontrivial solutions, the separation constant must be negative, equal to −λ2 , say. Then
X ′′ + λ2 X = 0 which has general solution X = A sin λx + B cos λx. Applying the BCs: X(0)
leads to B = 0 and X(1) = 0 to A sin λ = 0. The choice A = 0 would lead to a trivial solution
so we must have sin λ = 0. i.e., λ = nπ (n = 1, 2, . . .).
Then
T ′′ + 2T ′ + λ2 T = 0

which has solutions T = eµt if µ satisfies µ2 + 2µ √ + λ2 = 0, that√is µ = −1 ± i λ2 − 1. These are
complex roots since λ ≥ π. Thus T = e−t (a sin λ2 − 1t + b cos λ2 − 1t) for arbitrary constants
a and b and p p
u(x, t) = e−t (a sin λ2 − 1t + b cos λ2 − 1t) sin λx.
At t = 0 we are given u(x, 0) = sin πx so n = 1, λ = π and b = 1. Since
p p p
ut = −u + λ2 − 1e−t (a cos λ2 − 1t − sin λ2 − 1t) sin λx

the initial condition ut (x, 0) = 0 gives a = 1/( π 2 − 1) and we have
1 p p
u(x, t) = e−t ( √ sin π 2 − 1t + cos π 2 − 1t) sin πx.
π2 − 1

8.19
Suppose u = Φ(x, y, a, b) represents the solution (8.56) of subproblem P1 in Example 8.12, so
that
X∞  nπx 
Φ(x, 0, a, b) = An sin
n=1
a

58
on E1 and Φ = 0 on the remaining edges. The PDE is unchanged under the linear change of
variable y 7→ b − y (x unchanged) and maps the rectangle into itself with the edges E1 being
interchanged E3 . This gives the solution

X sinh (nπy/(ab))  nπx  ∞
X  nπx 
u(x, y) = Φ(x, b − y, a, b) = Cn sin , u(x, b) = Cn sin
n=1
sinh (nπ/a) a n=1
a

and u = 0 on edges Ej , j = 1, 2, 4. This is the solution to P3 .


The PDE is unchanged under the interchange x ↔ y and the domain is also unaltered if we make
the interchange a ↔ b. Thus

X sinh (nπ(1 − x/a)/b)  nπy  ∞
X  nπy 
u(x, y) = Φ(y, x, b, a) = Dn sin , u(0, y) = Dn sin
n=1
sinh (nπ/b) b n=1
b

is the solution to P4 .
Finally, applying the linear change of variable x 7→ a − x (y unchanged) gives the solution to P2 :

X sinh (nπx/(ab))  nπy  ∞
X  nπy 
u(x, y) = Φ(y, a − x, b, a) = Bn sin , u(a, y) = Bn sin .
n=1
sinh (nπ/b) b n=1
b

8.20
Integrating by parts twice, we find
Z 1 Z 1 Z 1
2 4 2 1
An = 2 x2 sin(nπx) dx = − cos nπ + (x cos nπx) dx = (−1)n−1 + 4 (x cos nπx) dx
0 nπ nπ 0 nπ nπ 0
 Z 1 
2 4 sin nπ sin nπx 2 cos nπ − 1
= (−1)n−1 + − dx = (−1)n−1 + 4
nπ nπ nπ 0 nπ nπ n3 π 3
as required.
8.21
By virtue of Exercise 8.19 the solution to problem P2 is given by

X ∞
X
sinh(nπx)
u(x, y) = Bn sin(nπy), u(1, y) = Bn sin(nπy)
n=1
sinh nπ n=1

and, with u(1, y) = 1 − y,


Z 1 Z 1
2 1 2 sin nπ 2
Bn = 2 (1 − y) sin(nπy) dy = −2 cos nπy dy = −2 2 2 = .
0 nπ 0 nπ nπ n π nπ

8.22
Substituting u(x, y) = X(x)Y (y) into the PDE and dividing by X(x)Y (y) gives

X ′′ (x) Y ′′ (y)
− = −c
X(x) Y (y)
and, the left hand side being a function of x only, while the right hand side is a function of y only,
we deduce that both must be constant. The homogeneous BCs u(0, y) = u(2, y) = 0 imply that

59
X(0) = X(2) = 0. We therefore look for eigenfunctions in the x-variable and set the separation
constant to λ so that −X ′′ = λX.
(a) λ = −µ2 < 0, then −X ′′ = −µ2 X has general solution X = Aeµx + Be−µx . The only solution
satisfying X(0) = X(2) = 0 is the trivial solution.
(b) λ = 0, then −X ′′ = 0 has general solution X = A + Bx. Again, the only solution satisfying
X(0) = X(2) = 0 is the trivial solution.
(c) λ = µ2 > 0, then −X ′′ = µ2 X has general solution X = A sin µx + B cos µx. The BC
X(0) = 0 implies that B = 0 and the X(2) requires A sin 2µ = 0. Since A = 0 leads to the trivial
solution, we must have sin 2µ = 0, that is, µ = 12 nπ. The eigenvalues are therefore λn = ( 12 nπ)2
with corresponding eigenfunctions Xn = sin( 21 nπx), n = 1, 2, . . ..
Then Y must satisfy Y ′′ − (c + λn )Y = 0.
(d) c + λn = ν 2 > 0 then Y has general solution Y = Aeνy + Be−νy . The only solution satisfying
Y ′ (0) = Y ′ (1) = 0 is the trivial solution.
(e) c + λn = 0, then −Y ′′ = 0 has general solution Y = A + By. The only solution satisfying
Y ′ (0) = Y ′ (1) = 0 is the constant solution Y (y) = A. This leads to the nontrivial solution
u(x, y) = Xn (x) provided that c = −λn = −( 21 nπ)2 .
(f) c + λn = −ν 2 < 0, then −Y ′ = ν 2 X has general solution Y = A sin νx + B cos νx. The
BC Y ′ (0) = 0 implies that A = 0 and the Y ′ (1) requires Bν sin ν = 0. Since B = 0 leads to
the trivial solution, we must have sin ν = 0, that is, ν = mπ. The eigenvalues are therefore
c + λn = (mπ)2 with corresponding eigenfunctions Ym = cos(mπy), m = 0, 1, 2, . . . (when m = 0
this becomes case (e) above.)
Thus, we have the non-trivial solutions um,n (x, y) = sin 12 nπx cos mπy when c = −(m2 + 41 n2 )π 2 .
(These are in fact the eigenfunctions and eigenvalues of the Laplacian ∇2 on the rectangle with
the given BCs.)
8.23
Substituting u(x, y) = X(x)Y (y) into the PDE and dividing by X(x)Y (y) gives

−X ′′ (x) + 2X ′ (x) Y ′′ (y)


=
X(x) Y (y)

and, the left hand side being a function of x only, while the right hand side is a function of y only,
we deduce that both must be constant. The homogeneous BCs u(x, 0) = u(x, 1) = 0 imply that
Y (0) = Y (1) = 0. We therefore look for eigenfunctions in the y-variable and set the separation
constant to −λ so that −Y ′′ = λY .
This is the eigenvalue problem solved in Example 8.1 (for X(x)) and so the eigenvalues are
λn = (nπ)2 with corresponding eigenfunctions Yn = sin(nπy), n = 1, 2, . . .. The corresponding
ODE for X is −X ′′√+ 2X ′ + λX = 0. The general solution is a linear combination of ex+σx and
ex−σx , where σ = 1 + λ2 . This may be written in several equivalent ways but, in view of the
BC X ′ (1) = 0 being applied at x = 1, the most convenient form is

X(x) = ex C cosh σ(1 − x) + D sinh σ(1 − x)

which satisfies X ′ (1) = 0 if C = σD. Thus the fundamental solutions are


 p
un = ex σ cosh σ(1 − x) + sinh σ(1 − x) sin nπy, σ = 1 + λ2n ,

60
P∞
for n = 1, 2, . . . and the general solution is u(x, y) = n=1 Dn un (x, y).

To match the additional BC u(0, y) = y(1 − y), we have



X
y(1 − y) = An sin nπy, An = Dn (σ cosh σ + sinh σ),
n=1

so that (see the discussion from equation (8.7) to (8.8))


Z 1
4
An = 2 y(1 − y) sin nπy dy = (1 − (−1)n ).
0 (nπ)3
Hence,

X 4 σ cosh σ(1 − x) + sinh σ(1 − x)
u(x, y) = ex 3
(1 − (−1)n ) sin nπy
n=1
(nπ) σ cosh σ + sinh σ

X 8 σ cosh σ(1 − x) + sinh σ(1 − x)
= ex sin nπy.
n=1
(nπ)3 σ cosh σ + sinh σ
n odd

8.24
Using Exercise 4.20 we find that Laplace’s equation in polar coordinates becomes
1 1
urr + ur + 2 uθθ = 0
r r
and substituting u(r, θ) = R(r)Θ(θ) into the PDE leads to

r2 R′′ (r) + rR′ (r) Θ′′ (θ)


=− .
R(r) Θ(θ)
The left hand side is a function of r only, while the right hand side is a function of θ only so we
deduce that both must be constant. The periodic BCs u(r, θ) = u(r, θ + 2kπ) for any integer k
suggests that we look for eigenfunctions in the θ-variable and set the separation constant to λ
so that −Θ′′ = λΘ.
(a) λ = −µ2 < 0, then −Θ′′ = −µ2 Θ has general solution Θ = Aeµθ + Be−µθ . This cannot be a
periodic function of θ for any µ 6= 0.
(b) λ = 0, then −Θ′′ = 0 has general solution Θ = A + Bθ. The only solution that is periodic in
θ is the constant solution: Θ = A. Now R satisfies r2 R′′ (r) + rR′ (r) = 0 . This may be written
as
B
(rR′ (r))′ = 0 ⇒ rR′ (r) = B ⇒ R′ (r) = ⇒ R(r) = B ln r + Ca,
r
for arbitrary constants B and C. Thus u(r, θ) = B ln r + C is a solution of Laplace’s equation.
With B = 1 and C = 0 it is, in fact, the solution that featured in Example 1.4. If a bounded
solution is required at the origin then we must choose B = 0.
(c) λ = µ2 > 0, then −Θ′′ = µ2 Θ has general solution Θ = A sin µθ + B cos µθ. This is periodic
in θ of period 2π if µ = n, n = 1, 2, . . . leading to the eigenvalues λn = n2 and eigenfunctions
that can be written as Θn = sin(nθ + β) for any constant (phase) β. The corresponding solutions
for R satisfy
r2 R′′ (r) + rR′ (r) = n2 R.

61
Looking for solutions of the form R = Arα we find that r2 R′′ (r) + rR′ (r) = α2 Arα and so
α = ±n. There are two solutions and, by linearity of the ODE, a linear combination is also a
solution and therefore
R(r) = Drn + Er−n
for arbitrary constants D and E. Boundedness of the solution at the origin requires that we set
E = 0.
The fundamental solutions of Laplace’s equation in a circular domain are, therefore u0 = 1 and
un (r, θ) = rn sin(nθ + β), for n = 1, 2, . . . and the general solution is

X
u(r, θ) = D0 + Dn rn sin(nθ + β).
n=1

When r = a the BC gives u(a, θ) = g(θ) and integrating the series over one period gives D0 =
1
R 2π
2π 0 g(θ) dθ and so Z 2π
1
u(0, 0) = g(θ) dθ.
2π 0

8.25
Using Exercise 4.20 we find that Laplace’s equation in polar coordinates becomes
1 1
urr + ur + 2 uθθ = 0
r r
and substituting u(r, θ) = R(r)Θ(θ) into the PDE leads to

r2 R′′ (r) + rR′ (r) Θ′′ (θ)


=− .
R(r) Θ(θ)

The left hand side is a function of r only, while the right hand side is a function of θ only so
we deduce that both must be constant. The BCs u(r, 0) = u(r, π/4) suggest that we look for
eigenfunctions in the θ-variable and set the separation constant to λ so that −Θ′′ = λΘ.
(a) λ = −µ2 < 0, then −Θ′′ = −µ2 Θ has general solution Θ = Aeµθ + Be−µθ . This cannot
satisfy Θ(0) = Θ(π/4) = 0 for any µ 6= 0 unless A = B = 0.
(b) λ = 0, then −Θ′′ = 0 has general solution Θ = A+Bθ which cannot satisfy Θ(0) = Θ(π/4) =
0 unless A = B = 0.
(c) λ = µ2 > 0, then −Θ′′ = µ2 X has general solution Θ = A sin µθ +B cos µθ. The BC Θ(0) = 0
requires B = 0. Then Θ(π/4) = 0 requires A sin µπ/4 = 0. This will lead to the trivial solution
A = 0 unless µ = 4n, n = 1, 2, . . .. The eigenvalues are therefore given by λn = 16n2 and
corresponding eigenfunctions Θn = sin(4nθ) Then R satisfies

r2 R′′ (r) + rR′ (r) = 16n2 R.

Looking for solutions of the form R = Arα we find that r2 R′′ (r) + rR′ (r) = α2 Arα and so
α = ±4n. There are two solutions and, by linearity of the ODE, a linear combination is also a
solution and therefore
R(r) = Dr4n + Er−4n

62
for arbitrary constants D and E. The BC u(1, θ) implies that R(1) = 0 so that E = −D and
the general solution satisfying the PDE and the homogeneous BCs is

X 
u(r, θ) = Dn r4n − r−4n sin 4nθ.
n=1

The BC u(2, θ) = g(θ) then means that the coefficients are given by
Z π/4
8
Dn (24n − 2−4n ) = g(θ) sin 4nθ dθ.
π 0

due to the mutual orthogonality of the eigenfunctions over (0, π/4) and
Z π/4
sin2 4nθ dθ = 81 π.
0

8.26
Using Exercise 4.20 we find that Laplace’s equation in polar coordinates becomes
1 1
urr + ur + 2 uθθ = 0
r r
and substituting u(r, θ) = R(r)Θ(θ) into the PDE leads to

r2 R′′ (r) + rR′ (r) Θ′′ (θ)


=− .
R(r) Θ(θ)
The left hand side is a function of r only, while the right hand side is a function of θ only
so we deduce that both must be constant. The BCs u(1, θ) = u(2, θ) suggest that we look for
eigenfunctions in the r-variable and set the separation constant to −λ so that −r2 R′′ (r)−rR′ (r) =
λR. Following the hint, the change of variable s = log r means that, by the chain rule,
1
∂r = (∂r s)∂s = ∂s ⇒ r∂r = ∂s
r
then, since r2 R′′ (r) + rR′ (r) = r∂r (r∂r R) = ∂s2 R and the ODE for R becomes −∂s2 R = λR
(a) λ = −µ2 < 0, then we have general solution R = Aeµs + Be−µs = Arµ + Br−µ which cannot
satisfy R(1) = R(2) = 0 for any µ 6= 0 unless A = B = 0.
(b) λ = 0, then the general solution is R = A + Bs = A + B log r which cannot satisfy R(1) =
R(2) = 0 unless A = B = 0.
(c) λ = µ2 > 0, then the general solution is R = A sin µs + B cos µs. The BC R = 0 at r = 1
is applied at s = 0 and requires B = 0. Then R = 0 at r = 2 is applied at s = log 2 requires
A sin(µ log 2) = 0. This will lead to the trivial solution A = 0 unless µ = nπ/ log 2, n = 1, 2, . . ..
The eigenvalues are therefore given by λn = (nπ/ log 2)2 and corresponding eigenfunctions Rn =
sin log r
log 2 nπ.
Then Θ satisfies Θ′′ = λn Θ so that Θ = Ceµθ + De−µθ . The BC Θ(π/4) = 0 gives Ceµπ/4 +
De−µπ/4 = 0. The solution of this is conveniently written in terms of another arbitrary constant
γ as C = γe−µπ/4 , D = −γeµπ/4 giving

Θ = 2γ sinh µ(θ − 14 π), µ= .
log 2

63
Normalising this by choosing γ so that Θ(0) = 1 finally gives the general solution

X sinh µ( 14 π − θ) log r 
u(r, θ) = An 1 sin nπ ,
n=1
sinh 4 µπ log 2

which satisfies the PDE and the homogeneous BCs.


8.27
Written in polar coordinates, we require the eigenvalues λ and eigenfunctions u (not identically
zero) such that  
1 1
− urr + ur + 2 uθθ = λu.
r r
Substituting u(r, θ) = R(r)Θ(θ) into the PDE leads to
r2 R′′ (r) + rR′ (r) + λr2 R(r) Θ′′ (θ)
− = .
R(r) Θ(θ)
The left hand side is a function of r only, while the right hand side is a function of θ only so we
deduce that both must be constant. The periodic BCs u(r, θ) = u(r, θ + 2kπ) for any integer k
suggests that we look for eigenfunctions in the θ-variable and set the separation constant to α
so that −Θ′′ = αΘ.
It is readily shown that there are no periodic solutions for α < 0 so we set α = ν 2 ≥ 0, so that
Θ = A sin νθ + B cos νθ. This will be periodic of period 2π if ν = n, n = 0, 1, . . . (Note that
n = 0 is permissible). This being the case, then
r2 R′′ + rR′ (λr2 − n2 )R = 0.

The simple change of variable x = r λ converts this into Bessel’s equation (D.1) with ν = n.
The general solution that remains bounded at the centre of the circle is

Rn (r) = CJn (r λ),
where Jn is the Bessel function of the first kind of order n (see Appendix D). It is necessary to
have R(a) = 0 in order for u(a, θ) = 0.
√ Therefore, since C = 0 leads to the trivial solution, we
have to choose λ in such a way that a λ = ξn,m , the mth nonnegative zero of Jn , m = 1, 2, . . ..
Hence the eigenvalues are λn = (ξn,m /a)2 and the eigenfunctions are as given in the question.
8.28

We look for a solution in the form u(r, θ, t) = U (r, θ)T (t), in which case the PDE gives
T ′′ (t) ∇2 U
= .
c2 T (t) U (r, θ)
The left hand side is a function of t only, while the right hand side is a function of (r, θ) only
so we deduce that both must be constant. Setting the separation constant to −λ then U should
satisfy
−∇2 U = λU
inside the circle and U = 0 on the perimeter. This is the problem solved in the previous exercise
for which that eigenvalues λm,n and corresponding eigenfunctions are given. The associated
solution for T then satisfies T ′′ = −λc2 T . Thus, the general solution is of the form
∞ X
X ∞
cξn,m
u= (Am,n sin ωn,m t + Bm,n cos ωn,m t)Jn (ωn,m r), ωn,m = ,
n=0 m=1
a

64
for arbitrary constants Am,n and Bm,n which can be determined by the initial conditions.

65
Exercises 9 The method of characteristics
9.1 t
(a) ut + tux = u:

dt dx du dx du
= = ⇒ = t, =u
1 t u dt dt x
giving, in terms of (t, k): x = k + 21 t2 , u = A(k)et .
In terms of (x, t): u = A(x − 12 t2 )et .
t
(b) tut − ux = 1:

dt dx du dt du
= = ⇒ = −t, = −1
t −1 1 dx dx x
giving, in terms of (x, k): t = ke−x and u = A(k) − x.
In terms of (x, t): u = A(tex ) − x.
t
(c) ut + xux = −u:

dt dx du dx du
= = ⇒ = x, = −u
1 x −u dt dt x
giving, in terms of (t, k): x = ket and u = A(k)e−t .
In terms of (x, t): u = A(xe−t )e−t .
(d) xut − ux = t:

dt dx du dt du t
= = ⇒ = −x, = −t
x −1 t dx dx
du 1
giving, t = k − 12 x2 and so = −k + x2 . x
dx 2
Hence in terms of (x, k): u = A(k) − kx + 16 x3 .
In terms of (x, t): u = A(t + 21 x2 ) − (t + 21 x2 )x + 61 x3 .

(e) tut + xux = x: t


Z Z
dt dx du dt dx du
= = ⇒ = , =1
t x x t x dx x
giving, in terms of (x, k): t = kx and u = A(k) + x.
In terms of (x, t): u = A(t/x) + x.
t
(f) tut − xux = t:
Z Z
dt dx du dt dx du
= = ⇒ =− , =1
t −x t t x dt x
giving, in terms of (t, k): x = k/t and u = A(k) + t.
In terms of (x, t): u = A(tx) + t.

66
t
(g) xut − tux = xt:
Z Z
dt dx du du
= = ⇒ t dt = − x dx, =t
x −t xt dt x
2 2 1 2
giving, in terms of (t, k): x = k − t and u = A(k) + 2t .
In terms of (x, t): u = A(x2 + t2 ) + 12 t2 .
t
(h) xut + tux = −xu:
Z Z
dt dx du du
= = ⇒ t dt = x dx, = −u
x t −xu dt x
giving, in terms of (t, k): x2 = k + t2 and u = A(k)e−t .
In terms of (x, t): u = A(x2 − t2 )e−t .
9.2
Note that the solutions below are only valid for those values of (x, t) where characteristics passing
through (x, t) also pass through the given boundary data without either going through infinity or
crossing other characteristics. Check this against the sketches of the paths of the characteristics.
(a) u = A(x− 21 t2 )e−t with u(0, x) = sin(x) gives A(x) = sin(x).
Hence u = sin(x− 12 t2 )e−t , for all values of (x, t).
(b) u = A(tex ) − x with u(t, 0) = exp(−t2 ) gives A(t) = exp(−t2 ).
Hence u = exp(−t2 e2x ) − x, for all values of (x, t).
(c) u = A(xe−t )e−t with u(0, x) = x2 gives A(x) = x2 .
Hence u = x2 e−3t , for all values of (x, t).
(d) u = A(t+ 21 x2 ) − (t+ 12 x2 )x + 61 x3 with u(t, 0) = ln(1 + t2 ) gives A(t) = ln(1 + t2 ).
Hence u = ln[1 + (t+ 12 x2 )2 ] − (t+ 12 x2 )x + 61 x3 , for all values of (x, t).
(e) u = A(t/x) + x with u(1, x) = x3 gives A(1/x) + x = x3 or A(z) = z −3 − 1/z.
Hence u = (x/t)3 − x/t + x, for t > 0.
(f) u = A(tx) + t with u(1, x) = 1/(1 + x2 ) gives A(x) + 1 = 1/(1 + x2 ) or A(x) = −x2 /(1 + x2 ).
Hence u = −x2 t2 /(1 + x2 t2 ) + t, for t ≥ 0.

(g) u = A(x2 + t2 ) + 21 t2 with u(0, x) = 1 + x for x ≥ 0 gives A(x2 ) = 1 + x or A(z) = 1 + z.

Hence u = 1 + x2 + t2 + 21 t2 , for all values of (x, t).

(h) u = A(x2 − t2 )e−t
√ with u(0, x) = 1 − x for x ≥ 0 gives A(x2 ) = 1 − x or A(z) = 1 − z.
Hence u = (1 − x2 − t2 )e−t , for |x| ≥ |t|.

9.3
The nonzero component of f1 is equal to the first component of V T g(X − λ1 T ). Thus f1 =
D1 V T g(X − λ1 T ), where D1 is the d × d matrix zero matrix except that its (1, 1) entry is equal
to one. Hence,

u1 = V −T D1 V T g(X − λ1 T ) ⇒ ku1 k2 ≤ kV −T k2 kD1 k2 kV T k2 kg(X − λ1 T )k2 .

However, kV −T k2 = kV −1 k2 , kV T k2 = kV k2 , kD1 k2 = 1 and kg(X − λ1 T )k2 ≤ M2 so the result


follows.

67
A similar argument holds for V T uj = fj , where the only nonzero component of fj is its jth
component, which is vjT g(X − λj T ). This time we can write fj = Dj V T g(X − λj T ), where Dj
is the d × d matrix zero matrix except that its (j, j) entry is equal to one.
P
The bound on the solution of (9.6) follows by applying the triangle inequality to u = dj=1 uj :
Pd
kuk2 ≤ j=1 kuj k2 .
When A is symmetric its eigenvalues are mutually orthogonal and κ2 (V ) = 1.
9.4  
a b
Suppose that A = then its characteristic polynomial is
c d

a−λ b
= λ2 − (a + d)λ + (ad − bc)
c d−λ

and the result follows by observing that tr(A) = a + d and det(a) = ad − bc.
9.5
At P1 , where X1 > 2T1 , (see Fig. 9, Left)

(a) AP1 is a Γ1 -characteristic: x+t = X1 +T1 along which u+w = constant. Thus xA = X1 +T1
and
u(P) + w(P) = u(A) + w(A). (9.5a)

(b) BP1 is a Γ2 -characteristic: x−t = X1 −T1 along which v+w = constant. Thus xB = X1 −T1
and
v(P) + w(P) = v(B) + w(B). (9.5b)

(c) CP3 is a Γ3 -characteristic: x − 2t = X1 − 2T1 along which u + v = constant. Thus


x(C) = X1 − 2T1 and
u(P) + v(P) = u(C) + v(A). (9.5c)

t t P3 (X3 , T3 ) t x=t
P(X, T )
E
2t
t
x=

P1 (X1 , T1 )
=
x

D E

C B A x C B A x D C B A x
Figure 9: Left and Centre: The characteristics through points P1 , and P3 for Example 9.2 drawn
backwards in time, with reflections when they intersect the t-axis. The dashed lines show the
characteristics x − t = 0 and x − 2t = 0 that pass through the origin. Right: The characteristics
for Exercise 9.7.

Equations (9.5a-c) are clearly of the form (9.13), where the columns of V are the eigenvectors of
AT and
f = [v3T g(A), v2T g(B), v1T g(C)]T .
The initial-conditions provide values for u, v and w at A, B, and C and these equations may be
solved to give u, v and w at P1 .
At P3 , where X3 < T3 , (see Fig. 9, Centre)

68
(a) AP3 is a Γ1 -characteristic: x+t = X3 +T3 along which u+w = constant. Thus xA = X3 +T3
and
u(P) + w(P) = u(A) + w(A). (9.5A)

(b) The Γ2 -characteristic through P3 intersects the t-axis at D: x − t = X3 − T3 along which


v + w = constant. Thus tD = T3 − X3 and v(P) + w(P) = v(D) + w(D). One of the BCs on
x = 0 is w(0, t) = 0 and so v(P) + w(P) = v(D). Now CD is a Γ1 -characteristic so xC = tD ,
u + w is constant and, applying the BCs, gives u(C) + w(C) = v(D). Combining these
results leads to
v(P) + w(P) = u(C) + w(C). (9.5B)

(c) The Γ3 -characteristic through P3 intersects the t-axis at E: x − 2t = X3 − 2T3 along which
u + v = constant. Thus tE = T3 − 21 X3 and u(P) + v(P) = u(E) + v(E). On of the BCs
on x = 0 is u(0, t) = v(0, t) and so u(P) + v(P) = 2u(E). Now BE is a Γ1 -characteristic so
xB = tE , u + w is constant and, applying the BCs, gives u(B) + w(B) = u(E). Combining
these results leads to
u(P) + v(P) = 2u(B) + 2w(B). (9.5C)

Equations (9.5A-C) are clearly of the form (9.13), where the columns of V are the eigenvectors
of AT and the components of f are linear combinations of the values of u evaluated at the points
where the characteristics intersect the x-axis.
9.6
When u(x, 0) = w(x, 0) = 0, the condition u(A) + w(A) = u(B) + w(B) along BA leads to
u(B) + w(B) = 0 which is a constraint on the initial values of u and w which will not, in general,
be valid. The difficulty is caused by specifying the value (here u+w) on an outgoing characteristic
at A.
9.7
The three families of characteristics are:

Γ1 : λ1 = −2, x + 2t = constant, v1T u = u + w = constant,


Γ2 : λ2 = −1, x + t = constant, v2T u = v + w = constant,
Γ3 : λ3 = 1, x − t = constant, v3T u = u + v = constant.

In order to find the solution at P(X, T ) withX < T (see Fig. 9, Right) we follow the characteristics
through P backwards in time until they intersect the initial line t = 0 (x ≥ 0). When a
characteristic interests the t-axis (at E, for example), we also have to include the characteristics
through E as shown.
AP: This is a Γ1 characteristic x + 2t = X + 2T along which u + w is constant. Thus,

u(A) + w(A) = u(P) + w(P), x(A) = X + 2T. (9.7a)

BP: This is a Γ2 characteristic x + t = X + T along which v + w is constant. Thus,

v(B) + w(B) = v(P) + w(P), x(B) = X + T. (9.7b)

EP: This is a Γ3 characteristic x − t = X − T along which u + v is constant. Thus,

u(E) + v(E) = u(P) + v(P), t(E) = T − X. (9.7c)

69
CE: This is a Γ1 characteristic x + 2t = 2(T − X) along which u + w is constant. The BC
specifies w(0, t) = 0, and so,

u(E) = u(C) + w(C), x(C) = 2(T − X). (9.7d)

DE: This is a Γ2 characteristic x + t = (T − X) along which v + w is constant. The BC specifies


w(0, t) = 0, and so,

v(E) = v(D) + w(D), x(D) = (T − X). (9.7e)

Hence, from (9.7c-e),


u(P) + v(P) = u(C) + w(C) + v(D) + w(D).
This, together with (9.7a-b) constitute three linearly independent equations to determine u(P),
v(P) and w(P). The coefficient matrix of this system is V T whose rows are the eigenvectors of
AT .
9.8
With the given matrix A the system (9.3) becomes

uy + vx =0
vy + wx =0
aux + bvx + cwx + wy = 0.
We shall use the last two of these to eliminate w. Differentiating the third with respect to x and
substituting wx = −vy gives

uy + vx =0
auxx + bvxx − (cvxy + vyy ) = 0.
Differentiating the second with respect to x and then substituting vx = −uy gives, on rearranging,

uyyy + cuxyy − buxxy + auxxx = 0.

It can be shown that each component of u satisfies the same PDE. The connection with eigen-
values is that the characteristic polynomial of −A is λ3 + cλ2 − bλ + a = 0 whose coefficients are
the same as the PDE.
9.9
With u = [u, v]T and f = [f, g]T , the equations become
 
0 1
ut + Aux = f , A = .
1 0

The matrix A has eigenvalue λ = 1 with eigenvector v1 = [1, 1]T and eigenvalue λ = −1 with
eigenvector v1 = [1, −1]T .
Multiplying ut + Aux = f by v1T = [1, 1] and supposing that f = 0, g = Gt , we find that
U + = v1T u = u + v satisfies Ut+ + Ux+ = Gt for which the characteristic equation is (see (9.2))
dt dx dU +
= =
1 1 Gt
so that
dx dU +
= 1, = Gt ⇒ x = t + k, U + = G(x, t) + A(k), ⇒ u + v = G(x, t) + A(x − t),
dt dt

70
where k is an arbitrary constant and A(k) an arbitrary function. Similarly, multiplying ut +
Aux = f by v2T = [1, −1], we find that U − = v2T u = u − v satisfies Ut− + Ux− = −Gt for which
the characteristic equation is
dt dx dU −
= =
1 −1 −Gt
so that
dx dU −
= −1, = Gt ⇒ x = −t + k, U − = G(x, t) + B(k), ⇒ u − v = −G(x, t) + B(x + t)
dt dt
where B is an arbitrary function.
Combining these we have

u = 21 (A(x − t) + B(x + t)), v = G(x, t) + 21 (A(x − t) − B(x + t)).

The initial condition u(x, 0) = 0 gives B(x) = −A(x) and then v(x, 0) = 0 gives A(x) = −G(x, 0).
Hence the solution is

u(x, t) = 21 (G(x + t, 0) − G(x − t, 0)), v(x, t) = G(x, t) − 12 (G(x − t, 0) + G(x + t, 0)).

9.10
Comparing 2uxx + 3uxy + uyy = 0 with (4.12) we see that a = 2, b = 3/2 and c = 1 so that
b2 − ac = 41 > 0. Consequently the PDE is hyperbolic. The PDE may be factored:

2uxx + 3uxy + uyy = (2∂x + ∂y )(∂x + ∂y )u = 0.

The first factor has characteristic equations


dx dy dU
Γ1 : = = ⇒ x = 2y + k, U = ux + uy = A(k) = constant
2 1 0
and the second factor gives
dx dy dV
Γ2 : = = ⇒ x = y + k, V = 2ux + uy = B(k) = constant
1 1 0
so that ux + uy = A(x − 2y), 2ux + uy = B(x − y). Solving and integrating, we find

ux = B(x − y) − A(x − 2y) ⇒ u = F (x − y) + G(x − 2y) + C(y)


uy = 2A(x − 2y) − B(x − y) ⇒ u = G(x − 2y) + F (x − y) + D(x),
R R
where F (s) = B(s) ds, G(s) = − A(s) ds, C(y), D(x) are arbitrary functions. These equa-
tions are compatible if, and only if, C(y) = D(x) = constant—this constant can be absorbed
into either F or G. Thus the general solution is

u(x, y) = F (x − y) + G(x − 2y).

The BCs u(x, 0) = g0 (x) and uy (x, 0) = g1 (x) lead to


Z x
F (x) + G(x) = g0 (x), −F ′ (x) − 2G′ (x) = g2 (x) ⇒ −F (x) − 2G(x) = g1 (s) ds

71
which give Z Z
x x
G(x) = −g0 (x) − g2 (s) ds, F (x) = 2g0 (x) + g1 (s) ds

and, therefore,
Z x−y Z A
u(x, y) = 2g0 (x − y) − g0 (x − 2y) + g1 (s) ds ≡ 2g0 (A) − g0 (B) + g1 (s) ds
x−2y B

in the notation of Fig. 10. As a check we note that this reduces to u(x, 0) = g0 (x) as y → 0.
y x=y
x = 2y
P(X, Y )
Figure 10: The characteristics through a general point
P for Exercise 9.10.
B A
(X−2Y,0) (X−Y,0) x

9.11
Suppose that P has coordinates (X, Y ).
(a) For X > 2Y > 0 (see Fig. 11) both characteristics through P1 intersect the boundary on the
x-axis. Hence u(X, Y ) is determined by the initial conditions—the solution to Exercise 9.10
fulfils these conditions.

y
P3 (X, Y ) x=y

F(0, Y − 21 X) P2 (X, Y ) x = 2y
Q
E(0, Y − X) P1 (X, Y )

D(0, Y − 12 X)
R

O C B A x
(X − Y, 0) (X − 2Y, 0) (X − Y, 0)
Figure 11: The characteristics through three general points Pj (j = 1, 2, 3) for Exercise 9.11.

(b) For 0 < X < Y both characteristics through P3 intersect the boundary on the y-axis.
Hence u(X, Y ) is determined by the boundary conditions. We begin with the general
solution u(x, y) = F (x − y) + G(x − 2y) of the PDE derived in the solution to Exercise 9.10.
Applying the BCs leads to
Z y
′ ′ 1
F (−y)+G(−2y) = f0 (y), F (−y)+G (−2y) = f1 (y) ⇒ −F (−y)− 2 G(−2y) = f1 (s) ds

72
from which we obtain
Z y Z −t/2
G(−2y) = 2f0 (y) + 2 f1 (s) ds ⇒ G(t) = 2f0 (− 21 t)
+2 f1 (s) ds,
Z y Z −t
F (−y) = − f0 (y) − 2 f1 (s) ds ⇒ F (t) = −2f0 (−t) − 2 f1 (s) ds.

The solution satisfying the BCs is, therefore,


Z 1
y− 2 x
1
u(x, y) = 2f0 (y − 2 x) − f0 (y − x) + 2 f1 (s) ds.
y−x

(c) For 2Y > X > Y > 0 (see Fig. 11) one characteristic through P2 intersects the boundary
on each axis. Hence u(X, Y ) is determined by both the initial and boundary conditions.
Using u(x, y) = F (x − y) + G(x − 2y) we find that, along x = y, u(y, y) = F (0) + G(−y)
while, along x = 2y, u(2y, y) = F (y) + G(0). Hence

F (y) = u(2y, y) − G(0), G(y) = u(−y, −y) − F (0).

and
u(X, Y ) = u(2(X − Y ), X − Y ) + u(2Y − X, 2Y − X) − F (0) − G(0).
Setting X = Y = 0 shows that F (0) + G(0) = u(0, 0). The characteristics y = x + Y − X
and 2y = x + 2Y − X through P3 intersect the characteristics y = x and 2y = x through

the origin at Q and R whose coordinates are 2Y − X, 2Y − X and 2(X − Y ), X − Y ,
respectively. Hence, u(P) = u(Q) + u(R) − u(0, 0).

9.12
d 2 2
xe−x = (1 − 2x2 )e−x = 12 f (x, t).
dt
With c = 1
Z x+t−τ   x+t−τ
2 2 2
f (ξ, τ ) dξ = 2 xe−x = 2(x + t − τ )e−(x+t−τ ) − 2(x − t + τ )e−(x−t+τ )
x−t+τ x−t+τ

and
Z tZ x+t−τ   t   t
2 2
f (ξ, τ ) dξ dτ = e−(x+t−τ ) − e−(x−t+τ )
0 x−t+τ 0 0
−x2 −(x−t)2 −(x+t)2
= 2e −e −e

and (9.25) follows.


9.13
The operator associated with the PDE utt + utx − 2uxx = t factorizes:

utt + utx − 2uxx = (∂t − ∂x )(∂t + 2∂x )u

Hence, with v = (∂t + 2∂x )u we have (∂t − ∂x )v = t whose characteristic equations are
dt dx dv dx dv
= = ⇒ = −1, =t
1 −1 t dt dt

73
so the characteristics are x + t = k1 along which v = 21 t2 + a(k1 ), where a(·) is an arbitrary
function. Then u is the solution of (∂t + 2∂x )u = v whose characteristic equations are

dt dx du dx du
= = ⇒ = 2, =v
1 2 v dt dt
Rt
so the characteristics are x − 2t = k2 along which u = 16 t3 + a(x + s) ds + B(k2 ). This gives
the general solution
u(x, t) = 61 t3 + A(x + t) + B(x − 2t),
Rt
where A(x + t) = a(x + s) ds.
The initial conditions u(x, 0) = ut (x, 0) = 0 give

A(x) + B(x) = 0, A′ (x) − 2B ′ (x) = 0 ⇒ A(x) − 2B(x) = constant = C

and therefore A(x) = 31 C = −B. Hence u(x, t) = 16 t3 .


9.14
The operator associated with the PDE utt − uxx = 0 factorizes:

utt − uxx = (∂t − ∂x )(∂t + ∂x )u.

Hence, with v = (∂t + ∂x )u we have (∂t − ∂x )v = 0 whose characteristic equations are

dt dx dv dx dv
= = ⇒ = −1, =0
1 −1 0 dt dt
so the characteristics are x + t = k1 along which v = a(k1 ), where a(·) is an arbitrary function.
Then u is the solution of (∂t + ∂x )u = v whose characteristic equations are

dt dx du dx du
= = ⇒ = 1, =v
1 1 v dt dt
Rt
so the characteristics are x − t = k2 along which u = a(x + s) ds + B(k2 ). This gives the
general solution
u(x, t) = A(x + t) + B(x − t),
Rt
where A(x + t) = a(x + s) ds.
The boundary condition u(0, t) = 0 gives A(t) + B(−t) = 0 so B(s) = −A(−s) and u(x, t) =
A(x + t) − A(t − x),
(a) The boundary condition u(π, t) = 0 gives A(π − t) = A(t − π), that is A(s) = A(s + 2π),
which is the description of a 2π periodic function.
(b) The boundary condition ux (π, t) = 0 gives A′ (π − t) + A′ (t − π) = 0, that is, A′ (z) =
−A′ (z + 2π) from which we deduce that A(z + 2π) = C − A(z),where C is an arbitrary
constant. Thus,

A(z + 4π) = C − A(z + 2π) = C − (C − A(z)) = A(z)

which is the description of a 4π periodic function.

74
9.15

L1 L2 = (a∂t + b∂x )(c∂t + d∂x ) = a∂t (c∂t + d∂x ) + b∂x (c∂t + d∂x )
 
= a ct ∂t + c∂t2 + dt ∂x + d∂x ∂t + b cx ∂t + c∂t ∂x + dx ∂x + d∂x2 ∂t
= L + (act + bcx )∂t + (adt + bdx )∂x
and so L1 L2 = L if act + bcx = 0 and adt + bdx = 0.
Thus, Lu = 0 is equivalent to L1 v = 0 where L2 u = v.
For the given PDE, comparing coefficients we find ac = 1, ad+bc = t−1 and bd = −t. A solution
of these is a = c = 1, b = t, d = −1 so that L1 = ∂t + t∂x , L2 = ∂t − ∂x . The characteristic
equations of L1 v = 0 are
dt dx dv dx dv
= = ⇒ = t, = 0, ⇒ x = k1 + 12 t2 , v = A(k1 )
1 t 0 dt dt
and so v = ut − ux = A(k1 ) is constant along x − 21 t2 = k1 . The characteristic through the
point (x, t) cuts the x-axis at (x − 12 t2 , 0), at which point ut = g1 (x − 21 t2 ) and ux = g0′ (x − 12 t2 ).
Hence,
ut − ux = A(x − 12 t2 ), where A(z) = g1 (z) − g0′ (z).
This PDE L2 u = v has characteristic equations
dt dx du dx
= = ⇒ = −1, ⇒ x = k2 − t,
1 −1 v dt
Z t
du 1 2 1 2
= A(x − 2 t ) = A(k2 − t − 2 t ) ⇒ u = A(x + t − s − 21 s2 ) ds + g0 (x + t)
dt 0

using the initial condition u(x, 0) = g0 (x).


9.16
In each case we solve, in turn, L1 v = 0 and L2 u = v.
(a) L1 = ∂t + x∂x , L2 = ∂t + ∂x . The characteristic equations are
dt dx dv dx dv
L1 v =0 : = = ⇒ = x, = 0, ⇒ x = k1 et , v = a(k1 )
1 x 0 dt dt
dt dx du dx
L2 u =v : = = ⇒ = 1, ⇒ x = k2 + t,
1 1 v dt
du
= v = a(k1 ) = a(xe−t ) = a((t + k2 )e−t )
dt
Rt
so the general solution is u = a((k2 + s)e−s ) ds + B(k2 ).
For utt + (1 + x)utx + xuxx = 0, b2 − ac = 21 (1 + x)2 − x = 21 (1 − x)2 > 0 except at
x = 1 where both characteristics have speed x′ = 1 and are therefore parallel. The PDE is
therefore parabolic at x = 1.
(b) L1 = t∂t + x∂x , L2 = ∂t − ∂x . The characteristic equations are
Z Z
dt dx dv dt dx dv
L1 v =0 : = = ⇒ = , = 0, ⇒ x = k1 t, v = a(k1 )
t x 0 t x dt
dt dx du dx
L2 u =v : = = ⇒ = −1, ⇒ x = k2 − t,
1 −1 v dt
du x k2
= v = a(k1 ) = a( ) = a( − 1)
dt t t

75
Z t
k2
so the general solution is u = a(
− 1) ds + B(k2 ).
s
For tutt + (x − t)utx − xuxx = 0, b2 − ac = 21 (x − t)2 + xt = 21 (x + t)2 > 0 except at x = −t
where both characteristics have speed x′ = −1 and are therefore parallel. The PDE is
therefore parabolic along x + t = 0.
(c) L1 = x∂t − t∂x , L2 = ∂t + ∂x . The characteristic equations are
Z Z
dt dx dv dv
L1 v =0 : = = ⇒ t dt = − x dx, = 0, ⇒ t2 = k1 − x2 , v = a(k1 )
x −t 0 dt
dt dx du dx
L2 u =v : = = ⇒ = 1, ⇒ x = k2 + t,
1 1 v dt
du
= v = a(k1 ) = a(x2 + t2 ) = a((k2 + t)2 + t2 )
dt
Rt
so the general solution is u = a((k2 + s)2 + s2 ) ds + B(k2 ).
For xutt + (x − t)utx − tuxx = 0, b2 − ac = 21 (x − t)2 + xt = 21 (x + t)2 > 0 except at
x = −t where both characteristics have speed x′ = 1. The PDE is therefore parabolic
along x + t = 0.
(d) L1 = x∂t + ∂x , L2 = ∂t + t∂x . The characteristic equations are
dt dx dv dt dv
L1 v =0 : = = ⇒ = x, = 0, ⇒ t = k1 + 12 x2 , v = a(k1 )
x 1 0 dx dt
dt dx du dx
L2 u =v : = = ⇒ = t, ⇒ x = k2 + 21 t2 ,
1 t v dt
du
= v = a(k1 ) = a(t − 21 x2 ) = a(t − 12 (k2 + 21 t2 ))
dt
Rt
so the general solution is u = a(s − 21 (k2 + 12 s2 )) ds + B(k2 ).
For xutt + (1 + xt)utx + tuxx = 0, b2 − ac = 21 (1 + xt)2 − xt = 21 (1 − xt)2 > 0 except at
xt = 1 where both characteristics have speed x′ = 1/x at x = 1/t. The PDE is therefore
parabolic along xt = 1.
(e) This case is slightly different because L2 contains an undifferentiated term.
L1 = x∂t − t∂x , L2 = t∂t + x∂x − 1. The characteristic equations are
Z Z
dt dx dv dv
L1 v =0 : = = ⇒ t dt = − x dx, = 0, ⇒ t2 = k1 − x2 , v = a(k1 )
x −t 0 dt
Z Z Z
dt dx du dt dx du
L2 u =v : = = ⇒ = = , ⇒ x = k2 t,
t x u+v t x u+v
du u + a(k1 ) u + a(x2 + t2 ) u + a((k22 + 1)t2 )
= = = .
dt t t t
Seeking a solution of this ODE in the form u = tA(t) leads to the general solution
Z t
a((k22 + 1)s2 )
u=t ds + B(k2 ).
s

For xtutt + (x2 − t2 )uxt − xtuxx = 0, b2 − ac = 12 (x2 − t2 )2 − x2 t2 = 12 (x2 + t2 )2 > 0 except


at x = t = 0 where both characteristics have an undefined speed.

76
9.17
The PDE ut + uux = −2u has the characteristic equations
dt dx du
= =
1 u −2u
leading to
dx du
= u, = −2u.
dt dt
The second of these has general solution u = Ce−2t from which the first ODE gives x = k −
1 −2t
2 Ce , where k and C are related arbitrary constants—which we express by writing C = A(k).
Consider a characteristic emanating from a point on the boundary given by x = 0 and t = t∗ ,
say. We then have k = 21 A(k)e−2t and the BC u(0, t∗ ) = e−t = A(k)e−2t so that A(k) = et ,
∗ ∗ ∗

k = 12 e−t and therefore kA(k) = 12 . These results tie the arbitrary constants for a characteristic

to its point of intersection on the t-axis. Furthermore, u = et −2t and x = 12 (e−t − et −2t ).
∗ ∗ ∗

Eliminating t∗ shows that u is related to x and t via the quadratic equation

u2 + 2xu − e−2t = 0

whose roots are p


u = −x ± x2 + e−2t .
Since u > 0 for x = 0 the positive root is appropriate and, by rationalising the result, we obtain

e−2t
u= √ .
x + x2 + e−2t

9.18
When g(x) = σx in (9.27) we find

σxe−t
u = σke−t , x = k + σk(1 − e−t ) ⇒ u(x, t) = .
1 + σ(1 − e−t )

Clearly u is a linear function of x for each t. The denominator will remain positive for 0 ≤ t < ∞
provided σ > −1 in which case u(x, t) → 0 as t → ∞. The denominator is zero when t = t∗ ,
where
∗ 1+σ σ
e−t = ⇒ t∗ = log
σ 1+σ
which is real and finite for σ < −1. As t → t∗− , |u(x, t)| → ∞ for x 6= 0.
The situation is illustrated in Fig. 12.
g(x) σ>0
Figure 12: The arrows indicate how initial data g(x) = σx
(dashed lines) will evolve for Exercise 9.17 as t increases.
Initial data in the shaded wedge (σ < −1) give rise to solu-
tions that become unbounded in a finite time.
x

−1 < σ < 0

σ < −1

77
9.19
Under the change of variables s = −x, v(s, t) = −u(−s, t) the PDE becomes

−vt + (−v)(−v)−s = v ⇒ vt + vvs = −u

so remains invariant. The initial condition becomes v(s, 0) = −u(−s, 0) = −g(−s) for s ∈ R.
Thus v(s, 0) = g(s) when g is an odd function in which case v satisfies the same PDE and initial
condition as u so v(s, t) = u(s, t) = −u(−s, t) so that u must be an odd function of x.
With g(x) = x/(1 + |x|), which is an odd function, in (9.27) we have, for k ≥ 0,

k −t k
u= e , x=k+ (e−t − 1).
1+k 1+k
Defining U = uet and a(t) = e−t − 1 to simplify the notation, we find

k U U
U= , x = k + U a(t) ⇒k= , x= + U a(t)
1+k 1−U 1−U
which gives the relationship between U , x and t. On rearranging we obtain the quadratic equation

a(t)U 2 − (1 + x + a(t))U + x = 0

whose roots are


1 p
U= (1 + x + a(t)) ± (1 + x + a(t))2 − 4a(t)x.
2a(t)
Since a(t) → 0 as t → 0, we have to choose the root for which the numerator also vanishes at
t = 0—this is the negative root. Thus, since u = U e−t ,

e−t p 
u(x, t) = (1 + x + a(t)) − (1 + x + a(t))2 − 4a(t)x
2a(t)
2xe−t
= p
(1 + x + a(t)) + (1 + x + a(t))2 − 4a(t)x

which is valid for x ≥ 0. The solution for x < 0 follows since u must be an odd function of x.
9.20
With g(x) = σ(x − x0 ), the solution of Burgers’ equation is given by u = σ(k − x0 ) and the
characteristics by x = k + σ(k − x0 )t. Consider now two characteristics corresponding to the two
distinct parameters k1 and k2 . These will intersect at time t if

k1 + σ(k1 − x0 )t = k2 + σ(k2 − x0 )t, ⇒ (k1 − k2 )(1 + σt) = 0.

Therefore, since k1 6= k2 , they all intersect at the same time t = −1/σ at the location x = x0 .
9.21
The general solution of Burgers’ equation takes the form (9.30):

u = g(k), x = g(k)t + k.

The characteristics pass through the point x = k at t = 0 and u(x, 0) = g(x) and u = constant
along characteristics. When g(x) = max{0, 1 − |x|} the initial condition is u = 0 for |x| ≥ 1 and
the characteristics are therefore x = constant if there are no shocks present.

78
(a) Consider characteristics emanating from the points (x, t) = (k, 0) for 0 ≤ k ≤ 1. Here
g(x) = 1 − x and so
1−x
u = 1 − k, x = (1 − k)t + k ⇒ u(x, t) =
1−t
so this solution is valid only until t = 1 when the entire family of these characteristics
intersect at (1, 1) and a shock forms. Note that u(1, t) = 0 for 0 ≤ t < 1.
(b) Consider characteristics emanating from the points (x, t) = (k, 0) for −1 ≤ k ≤ 0. Here
g(x) = 1 + x and so
1+x
u = 1 + k, x = (1 + k)t + k ⇒ u(x, t) =
1+t
a solution that is valid for t > 0. Note that u(−1, t) = 0 for t ≥ 0.
(c) We have seen that the characteristics in case (a) intersect to form a shock at x = t =
1. However, the rightmost characteristic from case (b) (i.e., k = 0− ) also intersects the
characteristic x = 1 and the speed and location of the shock is determined by the interaction
of characteristics of case (b) with those for x > 1, which are vertical lines since u = 0 on
each (see Fig. 13). The appropriate Rankine-Hugoniot condition (see Example 9.11) is

s′ (t) = 21 (u+ + u− )

with u+ = 0 and u− = 1 + k. Along the (b)-characteristics we have k = (x − t)/(1 + t) and


therefore, when x = s(t),

1 1+s
s′ (t) = 2 , t > 1, s(1) = 1.
1+t

This has solution s(t) = 2 + 2t − 1. The solution for t > 1 is therefore given by


0, x ≤ −1
1+x
u(x, t) = 1+t , −1 < x < s(t)


0, x > s(t).

The solution at selected times is shown in Fig. 13.


The triangular profile persists for all time. Prior to shock formation it has a fixed base of length
2 and a constant height u = 1 so the area of the triangle is 1 for 0 ≤ t ≤ 1.
After shock formation the base of the triangle has length (1 + s(t)) and height u(s(t), t) =
(1 + s(t))/(1 + t) so the area is
1 1 + s(t)
2 (1 + s(t)) 1 + t = 1

since 1 + s(t) = 2 + 2t.
9.22

ut + u1/2 ux = 0 4 u0 (x)

 3
4 for x ≤ −1
2
u(0, x) = g(x) = (1 − x)2 for − 1 ≤ x ≤ 0

 1
1 for x ≥ 0.
−1 0 1 x

79
t
t = 3/2 √
u = 1/ 5

k
2

sho c
t=1

1 t = 1/2

t=0

−1 0 1 2 x −1 0 1 2 x

Figure 13: The characteristics (left) and solutions at selected times (right) for Exercise 9.21.

We have the characteristic equations


dt dx du du dx
= 1/2 = ⇒ = 0, = u1/2
1 u 0 dt dt
which show that p
u = A(k), x=k+t A(k)
for any constant k. From the initial condition, and the fact that x = k at t = 0, we see that
u(x, 0) = A(x) = g(x). It therefore follows that
p
u = g(k) and x = k + t g(k).

Characteristics cross when ∂k x = 0. Differentiating gives


d p
∂k x = 1 + t g(k)
dk
d p
from which we can see that characteristics cross when 1 + t g(k) = 0.
dk
p
 2 g(k)

2 for k ≤ −1
p
g(k) = 1 − k for − 1 ≤ k ≤ 0 1


1 for k ≥ 0.
−1 1 k
d p
 g(k)
 dk
d p  0 for k ≤ −1
g(k) = −1 for − 1 ≤ k ≤ 0 k
dk 
 −1 1
1 for k ≥ 0.
Hence characteristics cross, for −1 ≤ k ≤ 0, when
d p
1+t g(k) = 1 − t = 0,
dk
p
which is when t = 1. The characteristics meet where x = k + t g(k) = k + (1 − k) = 1, which
shows that all of these characteristics collide together at the position (x, t) = (1, 1). At this

80
moment we have (
4 for x < 1
u(x, 1) =
1 for x > 1.
A shock forms at the point (x, t) = (1, 1) and follows a path x = s(t). By writing the PDE in
“conservation form”  
ut + 32 u3/2 = 0
x
we see that, provided u is a conserved quantity across the shock, the shock will travel at the
speed  2 3/2 
ds u 2 8−1 14
= 3 = × =
dt [u] 3 4−1 9
14
so that the shock follows the path x = s(t) = 1 + 9 (t − 1) for t ≥ 1.
9.23
(
1
1 1+x , x≥0
g(x) = 1 − = 2x−1
1 + |x| x−1 x < 0.
Hence, for k = k + > 0, (9.41) leads to
t
s=k+ ⇒ k 2 − (s − 1)k + t − s = 0
1+k
and, therefore, p 
1
k= 2 s−1± (s − 1)2 − 4(t − s) .
Since k = k + > 0 we have to choose the positive square root (this is readily checked at t = 0).
Similarly, for k = k − < 0, (9.41) leads to
2k − 1
s=k+t ⇒ k 2 − (1 + s − 2t)k + s − t = 0
k−1
and, therefore, p 
1
k= 2 1 + s − 2t ± (1 + s − 2t)2 − 4(s − t) .
This time we have to choose the negative square root since k = k − < 0.
Clearly, when s(t) = t these give k + = k − = 0 = k ∗ for t ≥ 1.
9.24
The solution (9.45) is of the form (9.32) with σ = [u] and the constant σx0 replaced by σx0 −εuL .
It is therefore a solution of Burgers’ equation. Setting t = 0 in (9.45) gives u(x, 0) = gε (x), as
required.
9.25
x−x0
Differentiating the expression q ′ (u) = t with respect to x and t gives
1 x − x0
∂x q ′ (u) = q ′′ (u)ux = , ∂t q ′ (u) = q ′′ (u)ut = −
t t2
so that q ′′ (u)ut = −q ′ (u)q ′′ (u)ux , that is, ut + q ′ (u)ux = 0 provided that q ′′ (u) 6= 0.
9.26
The condition for a shock to be sustainable is given in Section 9.3.3 as
q(uL ) − q(uR )
q ′ (uL ) > > q ′ (uR ).
uL − uR

81
When q(u) = 2u1/2 this requires
1 1
q ′ (uL ) = √ > q ′ (uR ) = √
uL uR

which, in turn, requires uR > uL > 0. Hence the Riemann problem for this flux function cannot
sustain a shock if uL > uR .
To determine the associated expansion fan we need to solve q ′ (u) = x−x
t
0
for u:

1 x − x0
q ′ (u) = √ =
u t

so that
 u = uL


uL , x − x0 < t/ uL ,
√ √
u = t2 /(x − x0 )2 , t/ uL ≤ x − x0 ≤ t/ uR ,

 √ u = uR
uR , t/ uR < x − x0 .

x0 + √t x0 + √t x
uL uR
9.27
q(u) = log u so q ′ (u) = 1/u = (x − x0 )/t gives the expansion fan
u = uL
 u = uR

u L , x − x0 < t/uL ,
u = t/(x − x0 ), t/uL ≤ x − x0 ≤ t/uR ,


uR , t/uR < x − x0 .
x0 + t
x0 + t x
uL uR

9.28
For 0 < t < 2: an expansion fan forms at x0 = 0 and q ′ (u) = (x − x0 )/t with q(u) = 21 u2 leads
to (with uL = 0 and uR = 1) 

0, x < 0,
u = x/t, 0 ≤ x ≤ t,


1, t < x.
A shock is already present at x = 1, t = 0 with uL = 1, uR = 0. The shock speed is s′ (t) =
1 1 1
2 (uL + uR ) = 2 and its location is therefore x = s(t) = 1 + 2 t (since s(0) = 1).
The rightmost characteristic from the expansion fan meets the shock wave when x = t = 1 + 12 t,
i.e., t = 2 when x = 2.
9.29
The behaviour of the solution is broadly similar to that in the example—an expansion fan forms
at x = 0 and a shock at x = 1 and they will collide at some point in time.
The expansion fan with uL = 1 and uR = 2 is given by


1, x < t,
u = x/t, t ≤ x ≤ 2t,


2, 2t < x.

82
A shock is already present at x = 1, t = 0 with uL = 2, uR = 1. The shock speed is s′ (t) =
1 3 3
2 (uL + uR ) = 2 and its location is therefore x = s(t) = 1 + 2 t (since s(0) = 1).
The rightmost characteristic from the expansion fan meets the shock wave when x = 2t = 1 + 32 t,
i.e., when t = 2 and x = 4.
The solution is illustrated in Fig. 14 for t = 31 (left) and t = 2 (right).
u u
2 t = 1/3 2 t=2
1 1

x x
1 2 3 4 1 2 3 4

1
Figure 14: The solution of Exercise 9.29 when t = 3 (left) and t = 2 (right). The dashed lines
show the initial condition.
9.30

(a) The operator associated with the PDE 3utt + 10utx − 8uxx = 0 factorizes:
3utt + 10utx − 8uxx = (3∂t − 2∂x )(∂t + 4∂x )u
Hence, with v = (∂t + 4∂x )u we have (3∂t − 2∂x )v = 0 whose characteristic equations are
dt dx dv dx 2 dv
= = ⇒ =− , =0
3 −2 0 dt 3 dt
so the characteristics are2 3x + 2t = k1 along which v = a(k1 ), where a(·) is an arbitrary
function. Then u is the solution of (∂t + 4∂x )u = v whose characteristic equations are
dt dx du dx du
= = ⇒ = 4, = a(3x + 2t)
1 4 v dt dt
so the characteristics are x − 4t = k2 along which v = a(k1 ) = a(3x + 2t) = a(3k2 + 14t) so
Z t Z 3k2 +14t
1
u= a(3k2 + 14s) ds + B(k2 ) = 14 a(θ) dθ + B(k2 ) = A(k1 ) + B(k2 )

1
R 3k2 +14t 1
R 3x+2t
where A = 14 a(θ) dθ = 14 a(θ) dθ (depends only on 3x + 2t = k1 ). This
gives the general solution
u(x, t) = A(3x + 2t) + B(x − 4t).

(b) With the initial conditions u(x, 0) = g0 (x), ut (x, 0) = g1 (x) we have
Z x
A(3x) + B(x) = g0 (x), 2A′ (3x) − 4B ′ (x) = g1 (x) ⇒ 23 A(3x) − 4B(x) = g1 (s) ds.

Solving these gives


Z x Z z/3
3  3 1

A(3x) = 4g0 (x) + g1 (s) ds ⇒ A(z) = 4g0 ( 3 z) + g1 (s) ds
14 14
Z x
3 2 
B(x) = g0 (x) − g1 (s) ds
14 3
2 Written this way to avoid fractions.

83
so that

u(x, t) = A(3x + 2t) + B(x − 4t)


Z x+2t/3 Z
3 2 x−4t 
= 4g0 (x + 32 t) + g1 (s) ds + g0 (x − 4t) − g1 (s) ds
14 3
 Z x+2t/3 
3 2
= 4g0 (x + 32 t) + g0 (x − 4t) + g1 (s) ds
14 3 x−4t
Z 3
1 3
u(1, 3) = (12g0 (3) + 2g0 (−11)) + 14 g1 (s) ds.
14 −11

(c) The PDEs may be written as

(3∂t + 4∂x )u + 7∂x v = 0


7∂x u + (3∂t + 5∂x )v = 0

so, subtracting 7∂x × the 2nd from (3∂t + 5∂x ) × the 1st gives
 
(3∂t + 5∂x ) (3∂t + 4∂x )u + 7∂x v − 7∂x 7∂x u + (3∂t + 5∂x )v = 0
(3∂t + 5∂x )2 u − 49∂x2 u = 0
3utt + 10utx − 8uxx = 0

as required.
From part (b) we have u(x, 0) = g0 (x). To obtain an initial condition for v we observe that
7∂x v = −(3∂t + 4∂x )u so
1 
vx (x, 0) = − 3g1 (x) + 4g0′ (x)
7
which may be integrated over the interval to give
Z x
1 
v(x, 0) = 4g0 (0) − 4g0 (x) − 3 g1 (s) ds + v(0, 0),
7 0

where v(0, 0) is, in effect, an arbitrary constant, whose value has no effect on u.
(d) The coupled PDEs in part(c) can be written
         
ut 5ux + 7vx 0 1 5 7 u
3 + = ⇒ ut + Aux = 0, A= , u= .
vt 7ux + 5vx 0 3 7 5 v

Substituting u = cφ(x − λt), we find



ut + Aux = −λc + Ac φ′ (x − λt)

and the right hand side will vanish for any differentiable function φ if λ is an eigenvalue
of A with corresponding eigenvector c. A short calculation reveals that A has eigenvalues
λ = −2/3 and λ = 4 with corresponding eigenvectors c1 = [1, −1]T and c2 = [1, 1]T .
(e) The PDE is linear so a linear combination of solutions will also provide a solution. Thus
   
2 1 2 1
u(x, t) = c1 φ(x + 3 t) + c2 ψ(x − 4t) = φ(x + 3 t) + ψ(x − 4t)
−1 1

84
where φ and ψ are arbitrary scalar functions, and

u(x, t) = φ(x + 32 t) + ψ(x − 4t)

will coincide with the general solution in part (a) by choosing φ(z) = A(3z) and ψ(z) =
B(z).
(f) The calculation in part (c) reveals that3 L2 u = M2 u, where L := 3∂t +5∂x and M := −7∂x.
If v satisfies Mv = Lu then, because the differential operators have constant coefficients
they commute: LM = ML,

L2 u = LMv = M2 u ⇒ M(Mu − Lv) = 0

and the equations are satisfied by Mu = Lv. Now

Lu − Mv = 3ux + 5vx + 7vx = 0


Mu − Lv = −7ux − 3vt − 5vx = −(3vt + 7ux + 5vx ) = 0

leading to the coupled system in part (c). Just as there are families of 2 × 2 matrices each
having the same (quadratic) characteristic polynomial, there are families of coupled systems
all leading to the same second order PDE. Choosing M = +7∂x gives one alternative
member of the family.
(g) With the eigenvectors from part (d), if u = V v,

ut + Aux = V vt + AV vx = V vt + V −1 AV vx = 0.

Since V = [c1 , c2 ] diagonalizes A, V −1 AV = diag(λ1 , λ2 ) so,

wt + λ1 wx = 0 and zt + λ2 zx = 0

if v = [w, z]T . With λ1 = −2/3 and λ2 = −4 these have general solutions

w(x, t) = F (x + 23 t), z(x, t) = G(x − 4t)

for arbitrary functions F and G. Thus


    
1 1 −1 w 1 w−z
u = V −1 v = 2 = 2
1 1 z w+z

giving u(x, t) = F (x + 23 t) − G(x − 4t), in agreement with part (a) with F (s) = A(3s) and
G(s) = −B(s). Agreement with part (e) follows.

3 Note that (L2 − M2 )u = 3(3u + 10u


tt tx − 8uxx ) but the factor 3 is immaterial
√ since we are dealing with a
homogeneous PDE—otherwise L and M would need to be multiplied by 1/ 3.

85
Exercises 10 Finite difference methods for elliptic PDEs
10.1
2 1 2 4 4 −2 2 1 2 4 4
We use the replacements uxx = h−2
x δx u − 12 hx ∂x u + O(hx ) and uyy = hy δy u − 12 hy ∂y u + O(hy )
and so

∇2 u = uxx + uyy = h−2 2 −2 2 1 2 4 2 4 4
x δx u + hy δy u − 12 hx ∂x u + hy ∂y u + O(hx ) + O(hy ).
4

Hence the local truncation error for Poisson’s equation: −∇2 u = f is


2 −2 2

Rℓ,m = − h−2 x δx u + hy δy u − f

= −∇2 u − 12 1
h2x ∂x4 u + h2y ∂y4 u + O(h4x ) + O(h4y ) − f

1
= − 12 h2x ∂x4 u + h2y ∂y4 u + O(h4x ) + O(h4y ).

Our finite difference replacement is


2 −2 2

− h−2
x δx + hy δy Uℓ,m = fℓ,m

and, because δx2 Uℓ,m = Uℓ−1,m −2Uℓ,m +Uℓ+1,m , δy2 Uℓ,m = Uℓ,m−1 −2Uℓ,m +Uℓ,m+1 this becomes,
on multiplying by hx hy

hy hx
(Uℓ−1,m − 2Uℓ,m + Uℓ+1,m ) + (Uℓ,m−1 − 2Uℓ,m + Uℓ,m+1 ) = hx hy fℓ,m
hx hy
2(θ + θ−1 )Uℓ,m − θ (Uℓ−1,m + Uℓ+1,m ) − θ−1 (Uℓ,m−1 + Uℓ,m+1 ) = hx hy fℓ,m .

If we use this scheme to solve Poisson’s equation on the rectangle {0 < x < Lx , 0 < y < Ly } with
hx = Lx /Mx and hy = Ly /My (where Mx and My are specified integers indicating the number
of grid points in each direction) the totality of equations can me written in matrix vector form
by defining the My × My tridiagonal matrix
 
2(θ + θ−1 ) −θ−1
 −θ−1 2(θ + θ−1 ) −θ−1 
 
 . .. . .. . .. 
D= 
 
 −θ −1
2(θ + θ ) −1
−θ −1 
−θ−1 2(θ + θ−1 )

and the Mx × Mx block tridiagonal matrix


 
D −θI
 −θI D −θI 
 
 . .. .. .. 
A= . . 
 
 −θI D −θI 
−θI D

then, in the natural column ordering of points, Au = f . This reduces to the standard 5–point
formula (10.6) when θ = 1.
10.2
We say that a node (xℓ , ym ) is even if ℓ + m is even. The numbering on a grid with h = 1/M
and M = 4 is shown below. The numbers outside the box refer to the boundary nodes.

86
There are Neven = 5 even nodes (numbered 1–5) and Nodd = 4 odd
nodes (numbered 6–9).
4 5 6
T
u = [U1,1 , U1,3 , U2,2 , U3,1 , U3,3 , U1,2 , U2,1 , U2,3 , U3,2 ] 3 2 8 5 7
2 6 3 9 8
In terms of this ordering, we define 1 1 7 4 9

 12 11 10
T T ueven
ueven = [U1 , U2 , U3 , U4 , U5 ] , uodd = [U6 , U7 , U8 , U9 ] , , u = .
uodd
The boundary nodes are labelled 1–12 as shown (we do not use the corner values) and denote
the value of U at the boundary node number j by bj . The equations can be written in this new
numbering system as (we only give 3 examples)

Node 1: 4U1 − U6 − U7 = b1 + b12


Node 3: 4U3 − U6 − U7 − U8 − U9 = 0
Node 9: 4U9 − U3 − U4 − U5 = b8.

The key observation is that when Uℓ,m is an even node (it is a component of ueven) then the
other terms Uℓ−1,m , Uℓ+1,m , Uℓ,m−1 , Uℓ,m+1 in the 5–point replacement of the Laplacian all lie
at odd nodes. Hence, writing down all the equations at even nodes, 4Uℓ,m − Uℓ−1,m − Uℓ+1,m −
Uℓ,m−1− , Uℓ,m+1 = h2 fℓ,m gives rise to the system
 
−1 −1 0 0
 −1 0 −1 0 
 
4ueven + Buodd = feven , B =   −1 −1 −1 −1 

 0 −1 0 −1 
0 0 −1 −1

where feven contains not only the values of h2 fℓ,m at even nodes but also the contributions from
the boundary conditions. The matrix B has dimension Neven × Nodd and its entries are either
−1 or 0.
Similarly, writing down all the equations at odd nodes, 4Uℓ,m −Uℓ−1,m −Uℓ+1,m−Uℓ,m−1− , Uℓ,m+1 =
h2 fℓ,m gives rise to the system
 
−1 −1 −1 0 0
 −1 0 −1 −1 0 
4uodd + Cueven = fodd , C =   0 −1 −1
 = BT.
0 −1 
0 0 −1 −1 −1

and the matrix C is Nodd ×Nevenwhose entries are also either −1 or 0. Putting these two together
gives     
4Ie B ueven feven
=
B T 4Io uodd fodd
where the coefficient matrix is clearly symmetric since C = B T .
10.3

We use the standard finite difference operators

δx2 Uℓ,m = Uℓ+1,m − 2Uℓ,m + Uℓ−1,m , δy2 Uℓ,m = Uℓ,m+1 − 2Uℓ,m + Uℓ,m−1

87
so
   
δx2 δy2 Uℓ,m = δx2 δy2 U ℓ,m
= δy2 U ℓ+1,m
− 2 δy2 U ℓ,m
+ δy2 U ℓ−1,m
= (Uℓ+1,m+1 − 2Uℓ+1,m + Uℓ+1,m−1 ) − 2 (Uℓ,m+1 − 2Uℓ,m + Uℓ,m−1 )
+ (Uℓ−1,m+1 − 2Uℓ−1,m + Uℓ−1,m−1 ) .

The stencil of this result may be visualized as the “outer” product of a column and a row vector:
   
1 1 −2 1
−2 [1, −2, 1] = −2 4 −2 .
1 1 −2 1
Then
    
−2 1 −2 1 −1 −1
2h2 L+ 2 2  8 −2 − −2 4 −2 =   = 2h2 L×
h − δx δy = −2 4 h
−2 1 −2 1 −1 −1

We know from equation (10.13) that

L+ 2 +
h uℓ,m = −∇ uℓ,m + Rℓ,m ,

where 
R+ 1 2
ℓ,m = − 12 h ∂x4 u + ∂y4 u + O(h4 )
+ 1 −2 2 2
so it then follows from L×
h Uℓ,m = Lh Uℓ,m − 2 h δx δy Uℓ,m that
+


h uℓ,m = Lh uℓ,m − 2 h δx δy uℓ,m = L+
1 −2 2 2 1 2
h uℓ,m − 2 h h−4 δx2 δy2 uℓ,m
 
= −∇2 u − 12 h ∂x4 u + ∂y4 u + O(h4 ) − 21 h2 ∂x2 ∂y2 uℓ,m + O(h2 )
1 2

= −∇2 u − 12 h ∂x4 u + 6∂x2 ∂y2 u + ∂y4 u + O(h4 ).
1 2

10.4
Continuing from the previous exercise
+
Lh uℓ,m = λL×h uℓ,m + (1 − λ) Lh uℓ,m
   
= λ −∇2 u − 12 h ∂x4 u + 6∂x2 ∂y2 u + ∂y4 u + (1 − λ) −∇2 u − 12
1 2
h ∂x4 u + ∂y4 u + O(h4 )
1 2
  
= −∇2 u − 12 h λ ∂x4 u + 6∂x2 ∂y2 u + ∂y4 u + (1 − λ) ∂x4 u + ∂y4 u + O(h4 )
1 2
 
= −∇2 u − 12 h ∂x4 u + 6λ∂x2 ∂y2 u + ∂y4 u + O(h4 )
1 2
 
= −∇2 u − 12 h ∂x4 u + 2∂x2 ∂y2 u + ∂y4 u + O(h4 ) = −∇2 u − 12
1 2 1 2 4
h ∇ u + O(h4 )

by choosing λ = 13 . Since −∇2 u = f we have −∇4 u = ∇2 f which gives


1 2 2
Lh uℓ,m = f + 12 h ∇ f + O(h4 )

and therefore the local truncation error of the scheme


1 2 2
Lh Uℓ,m = fℓ,m + 12 h ∇ fℓ,m

88
will be O(h4 ). Since it can be inconvenient to calculate the derivatives in ∇2 fℓ,m , we may use the
the further approximation ∇2 fℓ,m = −L+ 2
h f + O(h ) without impairing the order of consistency.
This leads to the scheme
1
Lh Uℓ,m = fℓ,m + 12 (fℓ−1,m + fℓ−1,m + fℓ,m−1 + fℓ,m+1 − 4fℓ,m )
1
= 12 (fℓ−1,m + fℓ−1,m + fℓ,m−1 + fℓ,m+1 + 8fℓ,m)
2 +
where Lh Uℓ,m := 31 L× 1
h Uℓ,m + 3 Lh Uℓ,m (since λ = 3 ), that is,

1
Lh Uℓ,m := (20Uℓ,m − 4Uℓ−1,m − 4Uℓ−1,m − 4Uℓ,m−1 − 4Uℓ,m+1
6h2
− Uℓ−1,m+1 − Uℓ+1,m+1 − Uℓ−1,m−1 − Uℓ+1,m+1 )

In stencil format we see that we have a 9–point formula:


   
−1 −4 −1 1
1  1
−4 20 −4 Uℓ,m = 1 8 1 fℓ,m .
6h2 12
−1 −4 −1 1

Note: Suppose that both U and f are functions of x only: Uℓ,m ≡ Uℓ for every m. The method
becomes (sum the columns in the 3 × 3 stencil)
1 1 1
2
[−1, 2, −1]Uℓ = [1, 10, 1]fℓ ⇒ −h−2 δx2 Uℓ = fℓ + δx2 fℓ
h 12 12
which is Numerov’s method for solving the ode −u′′ = f (x) (see Section 6.4.2).
10.5
In standard column-wise order, the equations L×h U = F are
   
4 −1 b0 + b2 + b14
 4 −1 −1   b1 + b3 
   
 4 −1   b2 + b4 + b6 
   
 −1 4 −1   b13 + b15 
   
 −1 −1 4 −1 −1   0 
 u =  
 −1 4 −1   b + b 
   5 7 
 −1 4   
  b10 + b12 + b14 
 −1 −1 4   b9 + b11 
−1 4 b6 + b8 + b10

where bj denotes the boundary value at the jth boundary node and these have been numbered
clockwise from 0–15 starting at the origin. For general M , the coefficient matrix has the block
tridiagonal structure:
   
4I T −1
 T 4I T   −1 −1 
   
 . .. . .. . ..   . .. . .. . .. 
A=  , where T =  .
   
 T 4I T   −1 −1 
T 4I −1

The diagonal blocks of A are a multiple of the identity I and the nonzero off-diagonal blocks T
are themselves tridiagonal.

89
Switching to an odd-even numbering system where a node (xℓ , ym ) is even if ℓ + m is even.
The numbering on a grid with h = 1/M and M = 4 is shown below. The numbers outside the
box refer to the boundary nodes where, unlike Exercise 10.2, the corner nodes are now involved.
There are Neven = 5 even nodes (numbered 1–5) and Nodd = 4 odd
nodes (numbered 6–9).
4 5 6 7 8
T
u = [U1,1 , U1,3 , U2,2 , U3,1 , U3,3 , U1,2 , U2,1 , U2,3 , U3,2 ] 3 2 8 5 9
2 6 3 9 10
In terms of this ordering, we define 1 1 7 4 11
  0
15 14 13 12
T T ueven
ueven = [U1 , U2 , U3 , U4 , U5 ] , uodd = [U6 , U7 , U8 , U9 ] , , u = .
uodd
With this numbering system the equations L× h U = F become, in matrix-vector form,
   
4 −1 b0 + b2 + b14
 4 −1   b2 + b4 + b6 
   
 −1 −1 4 −1 −1  uodd = 
 
  
 −1 4   b10 + b12 + b14 
−1 4 b6 + b8 + b10
   
4 −1 −1 b1 + b3
 −1 4 −1   
  uodd = b13 + b15  .
 −1 4 −1   b5 + b7 
−1 −1 4 b9 + b9

The general pattern is difficult to detect with such a small value of M but, for even nodes (say),
the structure is
   
4I1 B −1
B T 4I2 B  −1 −1 
   
 B T 4I1 B , B= −1 −1 ,
   
.. .. .. .. ..
. . . . .

where I1 and I2 are identity matrices whose dimensions are the number of even nodes in odd and
even numbered columns, respectively. The matrix B is square when there are the same number
of nodes in consecutive columns, otherwise it is rectangular. The structure is similar for odd
nodes with the roles of the pairs I1 , B and I2 , B T being interchanged.
One reason for studying different orderings of unknowns is the profound effect these can have on
the time taken to solve the finite difference equations.
10.6
If Lh U ≤ 0 it follows that Lh (−U ) ≥ 0 and, from Theorem 10.2, that either −U is constant
on Ωh —in which case U is constant—or else −U achieves its minimum value on ∂Ω h . If −U
achieves a minimum it means that U must achieve a maximum and the required result follows.
To establish inverse monotonicity we have to show that Lh U ≥ 0 implies that U ≥ 0. If U is
constant then, because Lh Uℓ,m = Uℓ,m ≥ 0 for nodes (xℓ , ym ) on the boundary, this constant
must be non-negative. Otherwise, U achieves its minimum value on the boundary which is
non-negative for the same reason.
10.7
If Q(0) = Q(h) + Ch2 + O(h3 ) for some constant C, then Q(0) = Q(h/2) + C(h/2)2 + O(h3 ).

90
Subtracting these gives Ch2 = 4(Q(h/2) − Q(h))/3 + O(h3 ) and so

Q(h) = Q(0) + 34 (Q(h) − Q(h/2)) + O(h3 ).


h/2
Thus 4(Q(h) − Q(h/2))/3 ≡ 4(UPh − UP )/3 gives an estimate of the leading term in the error
in Q(h) ≡ UPh .
10.8
We construct a table analogous to Table 10.2 with Q(h) := UPh .

M Q(h) Q(h/2) − Q(h) EOC Q(0) Q(0) − Q(h)


8 0.31413 — — — 0.0295
16 0.33203 0.01790 — — 0.0116
32 0.33943 0.00740 1.27 0.34465 0.00424
64 0.34206 0.00263 1.49 0.34351 0.00161
128 0.34305 0.00099 1.41 0.34365 0.000617
256 0.34343 0.00038 1.38 0.34367 0.000237

The experimental order of convergence (EOC) is about 1.4 and the estimate Q(0) of uP with
M = 256 is 0.34367 suggesting that the numerical solution is in error by approximately 0.000237.
10.9
Suppose that the Neumann BC −ux = g(0, y) is approximated at y = ym by the second-order
central difference formula

−△x U0,m = g(0, mh) ⇒ −U1,m + U−1,m = 2hg(0, mh)

while (10.6) with ℓ = 0 gives

4U0,m − U0,m+1 − U1,m − U0,m−1 − U−1,m = h2 f0,m

and adding these two equations gives

4U0,m − U0,m+1 − 2U1,m − U0,m−1 − U−1,m = 2hg0,m + h2 f0,m

which is (10.22b), as required.


10.10
Using (10.22a) the local truncation error corresponding to the discrete version of the Neumann
BC −ux(0, y) = g(0, y) at y = mh is given by

Rh 0,m
= −h−1 △+x u0,m − 21 h−1 δy2 u0,m − g0,m − 12 hf0,m .

The Taylor expansion

u(x + h, y) = u(x, 0) + hux (x, y) + 12 h2 uxx (x, y) + 61 h3 uxxx(ξ, y), 0 < ξ < x,

with x = 0 and y = mh gives

h−1 △+x u0,m = ux (0, mh) + 21 huxx (0, mh) + 61 h2 uxxx (ξ, mh).

and, using Exercise 6.1, we deduce that

uyy (0, ym ) = h−2 δy2 u0,m − 1 2


12 h uyyyy (0, mh + η), −h < η < h.

91
Putting these together we find
 
Rh 0,m = − ux (0, mh) + 12 huxx (0, mh) + 61 h3 uxxx (ξ, mh)
 
1 2
− 12 h uyy (xℓ , ym ) + 12 h uyyyy (xℓ , mh + η) − g0,m − 12 hf0,m
 
= −ux (0, mh) − g0,m + 21 h −∇2 u(0, mh) − f0,m
− 16 h3 uxxx(ξ, mh) − 1 2
12 h uyyyy (xℓ , mh + η)

from which the result follows since −ux = g and −∇2 u = f .


10.11
The local truncation error associated with (10.24) is

Rh 0,M
= −h−1 △+x u0,M + h−1 △−y u0,M − 12 hf0,M − g(1+ , 0) − g(0− , 1).

We have, from the previous exercise,

h−1 △+x u0,M = ux (0, 1) + 12 huxx (0, 1) + 61 h2 uxxx(ξ, 1)

and by making the change of variables x 7→ 1−y, y 7→ 1−x, h 7→ −h (so that h−1 △+ 7→ −h−1 △− ),

h−1 △−y u0,M = uy (0, 1) − 12 huyy (0, 1) + 16 h2 uyyy (0, 1 − η), 0 < η < h.

Hence,
 
Rh 0,M
= − ux (0, 1) + 21 huxx (0, 1) + 61 h2 uxxx (ξ, 1)
 
+ uy (0, 1) − 12 huyy (0, 1) + 16 h2 uyyy (0, 1 − η)
− 21 hf0,M − g(1+ , 0) − g(0− , 1)
  
= −ux (0, 1) − g(1+ , 0) + uy (0, 1) − g(0− , 1) − 21 h − ∇2 u(0, 1) − f0,M

− 61 h2 uxxx (ξ, 1) + uyyy (0, 1 − η)

and therefore Rh 0,M = O(h2 ) if the third partial derivatives of u are bounded in the neighbour-
hood of the corner (0, 1).
10.12
If the domain in Fig. 10.6 (left) occupies −1 < x < 1, 0 < y < 1 with a grid size h = 1/M , then
it contains N = (2M − 1)(M − 1) grid points in its interior. The subdomain x ≥ 0 contains
N+ = M (M − 1) and N+ ≈ 12 N when M is large.
The time taken to produce an LR factorization of the coefficient matrix is proportional to the
product of the number of grid points and the square of the bandwidth. If the unknowns are
ordered by columns the bandwidth in the two situations are the same (M ) so the time taken
is proportional to the dimension. Thus, taking account of symmetry is expected to halve the
computation time.
Note that, were the unknowns in the rectangular domain to be ordered by rows rather than
columns, the bandwidth would increase to about 2M and the cost of factorization to 8M 2 .
For the full square domain −1 ≤ x, y ≤ 1, the number of nodes is about 4M 2 and the bandwidth
2M so the factorization cost is proportional to 16M 3. These results are summarized in the table
shown below, the leftmost column indicating the shape of the domain and the ordering of the
unknowns within it.

92
Domain # nodes bandwidth cost
2
4M 2M 16M 3
2M 2 M 2M 3
2M 2 2M 8M 3
M2 M M3

10.13

The factors are:


Geometry The domain 0 < x, y < 1 is unaffected by the interchange x ↔ y.
Boundary values u(x, y) = x2 + y 2 is unaffected by the interchange x ↔ y.
PDE Neither the source term f (x, y) = xy nor the differential operator
−∇2 ≡ ∂x2 + ∂y2 is affected by the interchange x ↔ y.
Thus u(x, y) = u(y, x).
Since the finite difference grid is also unaffected by the interchange x ↔ y, the numerical solution
U must also share the same symmetry, that is Uℓ,m = Um,ℓ . It follows that Uℓ,ℓ+1 = Uℓ+1,ℓ and
Uℓ−1,ℓ = Uℓ,ℓ−1 so the 5–point formula (10.6) applied at the grid point (ℓh, ℓh) gives

Lh Uℓ,ℓ = h−2 4Uℓ,ℓ − Uℓ+1,ℓ − Uℓ,ℓ+1 − Uℓ−1,ℓ − Uℓ,ℓ−1

= h−2 4Uℓ,ℓ − Uℓ+1,ℓ − Uℓ+1,ℓ − Uℓ,ℓ−1 − Uℓ,ℓ−1

= h−2 4Uℓ,ℓ − 2Uℓ+1,ℓ − 2Uℓ,ℓ−1

and fℓ,ℓ = xℓ yℓ = ℓ2 h2 .
When M = 4 then symmetry reduces the number of unknowns to
N = 21 M (M − 1) = 6 and these, together with the boundary nodes,
are numbered as shown. 4 5 6 7 8
T 3 4 5 6 7
u = [U1,1 , U2,1 , U2,2 , U3,1 , U3,2 , U3,3 ]
2 2 3 5 6
1 T
f= 16 [1, 2, 4, 2, 6, 9] 1 1 2 4 5
g = [2g1 , g2 , 0, g3 + g5 , g6 , 2g7 ]T = 1 T 0 1 2 3 4
16 [2, 4, 0, 27, 20, 50] ,

where gj is the value of U at the jth boundary node.


The numerical solution is then found by solving Au = f + g, where
   
4 −2 2 −1
−1 4 −1 −1  −1 4 −1 −1 
   
 −2 4 −2   −1 2 −1 
A = 16 
 = 16D 
 
,

 −1 4 −1   −1 4 −1 
 −1 −1 4 −1   −1 −1 4 −1
−2 4 −1 2

where the diagonal matrix D is equal to the identity matrix except for entries corresponding to
nodes on the diagonal of the grid, where Dℓ,ℓ = 2. The purpose of introducing D being that A is
the product of a diagonal matrix and a symmetric matrix. When M is large the cost of solving
(D−1 A)u = D−1 (g + f ) is approximately half the cost of solving the original system.

93
10.14
Symmetry about x = 0 implies that u(−x, y) = u(x, y). The change of variables s = −x, t =
y, v(s, t) = u(−s, t) should leave the problem unchanged. It is necessary to check:
(a) The domain: −1 ≤ x, y ≤ 1 becomes −1 ≤ s, t ≤ 1.
(b) The boundary values: u(±1, y) = 0 becomes v(±1, t) = 0 and u(x, ±1) = 0 for x ∈ (−1, 1)
becomes v(s, ±1) = 0 for s ∈ (−1, 1).
(c) The PDE: ∂x = −∂s so ∂x2 = (−∂s )2 = ∂s2 , ∂y = ∂t and −uxx − uyy = 1 becomes
−vss − vtt = 1.
Thus the boundary value problem in v is identical to that in u so that v(s, t) = u(s, t). But v
was defined by v(s, t) = u(−s, t) so we conclude that u(s, t) = u(−s, t) and so u is symmetric
about s = 0.
Symmetry about y = 0 implies that u(x, −y) = u(x, y) and the change of variables is s = x, t =
−y, v(s, t) = u(s, −t).
Symmetry about x = y implies that u(y, x) = u(x, y) and the change of variables is s = y, t =
x, v(s, t) = u(t, s).
Symmetry about x = −y implies that u(−y, x) = u(x, y) and the change of variables is s =
−y, t = x, v(s, t) = u(−t, s).
Following the steps (a)-(c) above reveals the boundary value problems to be unchanged in each
case.
With h = 1/3 the domain contains 25 grid points in its interior but the 6 unknown grid values
in the heavily shaded triangle 0 ≤ x < 1, 0 ≤ y ≤ x can be solved for independently and then
the remaining grid values may be deduced by symmetry as shown in the figure.
y

6 5 4 5 6     
4 −4 U1 1
5 3 2 3 5 −1 4 −2 −1  U2  1
    
 −2 4 −2  U3  1
4 2 1 2 4
x 9

  =  .
 U4  1
 −1 4 −2    
5 3 2 3 5  −1 −1 4 −1 U5  1
6 5 4 5 6 −2 4 U6 1

The coefficient matrix becomes symmetric when both sides of this system are multiplied by the
diagonal matrix
D = diag( 14 , 12 , 12 , 21 , 1, 21 ).

10.15
y
With M = 5 (h = 2/5) the implications of sym-
metry are shown in the figure and reveal that
3 2 2 3
there are only 3 independent unknowns. Ap-
2 1 1 2 plying the 5–point approximation of the Poisson
x equation at nodes 1, 2 & 3 leads to the system:
2 1 1 2     
2 −2 U1 1
3 2 2 3 25 
−1 3 −1 U2  = 1 .
4
−2 4 U3 1

94
For general odd values of M , there are (M − 1)2 unknowns (1 per grid point) of which only about
one eighth are independent. We therefore have to solve for 81 (M − 1)2 unknowns.
10.16
With the Robin BC −ux + σu = g(y) along x = 0, the analogue of (10.22a) becomes
−h−1 △+x U0,m + σU0,m − 12 h−1 δy2 U0,m = g0,m + 21 hf0,m ,

(m = 1, 2, . . . , M − 1) which can also be written in the explicit form

(4 + 2σh)U0,m − 2U1,m − U0,m−1 − U0,m+1 = 2hg0,m + h2 f0,m .

10.17

y
B

bc
7
18 bc
+× 8 bc Node h+ k+
3 3 1/32 1/36
9
bc
5 2/32 2/36
17 bc b
+× bc 10
7 3/32 3/36
2 5
bc
11
16 bc b b
+× bc 12
1 4 6

bc bc bc

A 15 14 13 C x
The 6 internal grid points and the 12 active boundary nodes are numbered as shown. The
standard 5–point finite difference equations

−h−2 δx2 + δy2 Uℓ,m + Uℓ,m = 0.
can only be deployed at points 1, 2 and 4 where there is a uniform grid in both directions. These
give:
P1 : 65U1 − 16U2 − 16U4 = 16(U15 + U16 ) = 16 [4x(9 − 8x)]x=1/4 = 112,
P2 : −16U1 + 65U2 − 16U3 − 16U5 = 16U17 = 0,
P4 : −16U1 + 65U4 − 16U5 − 16U6 = 16U14 = 16 [4x(9 − 8x)]x=1/2 = 160.

We focus first on the approximation of uxx at the points 3, 5 and 6. At points 3, 5 and 6 we use
equation (10.26) to give
1

P3 : h+ = 32 , h− = h = 14 : (uxx )3 ≈ 64
9
32
1 (u8 − u3 ) − 4(u3 − u18 ) ,
2

P5 : h+ = 32 , h− = h = 14 : (uxx )5 ≈ 10
64 32
2 (u10 − u5 ) − 4(u5 − u2 ) ,
3

P6 : h+ = 32 , h− = h = 14 : (uxx )6 ≈ 11
64 32
3 (u12 − u6 ) − 4(u6 − u4 ) .

The uyy derivatives are treated similarly.


1 1 72 36

P3 : k+ = 36 , k− = k = 4 : (uyy )3 ≈ 10 1 (u7 − u3 ) − 4(u3 − u2 ) ,
2 1 72 36

P5 : k+ = 36 , k− = k = 4 : (uyy )5 ≈ 11 2 (u9 − u5 ) − 4(u5 − u4 ) ,
3 1 72 36

P6 : k+ = 36 , k− = k = 4 : (uyy )6 ≈ 12 1 (u11 − u6 ) − 4(u6 − u13 ) .

95
Putting these together we find the following finite difference expressions for the approximations
to −∇2 u + u = 0 at the 3 grid points closest to the hypotenuse.
 72 36 
P3 : − 64
9
32
1 (U8 − U3 ) − 4(U3 − U18 ) − 10 1 (U7 − U3 ) − 4(U3 − U2 ) + U3 = 0

 545U3 −144
5 U2 =0
64 32 72 36
P5 : − 10 2 (U10 − U5 ) − 4(U5 − U2 ) − 11 2 (U9 − U5 ) − 4(U5 − U4 ) + U5 =0

 273U5 − 128 288


5 U2 − 11 U 4 = 0
64 32 72 36
P6 : − 11 3 (U12 − U6 ) − 4(U6 − U4 ) − 12 1 (U11 − U6 ) − 4(U6 − U13 ) = 0
979 256
3 U6 − 11 U4 = 24U13 ,

where U13 = [4x(9 − 8x)]x=3/4 = 9. These provide 6 equations in the 6 unknowns.


10.18
The forward difference operator △+y (see Table 6.1) gives

△+y uℓ,0 = uℓ,1 − uℓ,0 = huy |ℓ,0 + 12 h2 uyy ℓ,0


+ O(h3 )

and rearranging this we get

−uy (ℓh, 0) = −h−1 △+y uℓ,0 − 21 huyy ℓ,0


+ O(h2 ).

In order to remove the first order term in h, we use the PDE uyy = −uxx so that, at the point
(ℓh, 0)
−uy |ℓ,0 = uxx |ℓ,0 = −h−2 δx2 uℓ,0 + O(h2 ).
Combining these results gives

−uy (ℓh, 0) = −h−1 △+y uℓ,0 − 21 h−1 δx2 uℓ,0 + O(h2 )

so that the Neumann BC −uy (ℓh, 0) = 0 is approximated by the numerical boundary condition

−h−1 △+y Uℓ,0 − 12 h−1 δx2 Uℓ,0 = 0 (3)

(ℓ = 1, 2, . . . , M − 1). It can also be written in the explicit form

4Uℓ,0 − 2Uℓ,1 − Uℓ−1,m − Uℓ+1,m = 0

which, on division by 2 gives the formula (10.29).


The alternative derivation described in Exercise 10.9 would combine the second order approxi-
mation −h−2 △Uℓ,0 = 0 of −uy (ℓh, 0) = 0, that is

Uℓ,1 − Uℓ,−1 = 0

with the 5–point approximation of the Laplacian (10.6) at (ℓh, 0):

4Uℓ,0 − Uℓ+1,0 − Uℓ,1 − Uℓ−1,0 − Uℓ,−1 = 0

to give the same result. The local truncation error in boundary condition (3) is given by

Rh ℓ,0
= −h−1 △+y uℓ,0 − 12 h−1 δx2 uℓ,0
= −h−1 [huy + 21 h2 uyy + O(h3 )]ℓ,0 − 21 h−1 [h2 uxx + O(h4 )]ℓ,0
 
= − uy + h(uxx + uyy ) ℓ,0 + O(h2 )

96
and it is therefore consistent of second order since uy = 0 and uxx + uyy = 0.
10.19
In view if the identity
2(Uℓ,1 − Uℓ,0 ) = (Uℓ,1 − 2Uℓ,0 + Uℓ,−1 ) + (Uℓ,1 − Uℓ,−1 ) = δθ2 Uℓ,0 + 2△θ Uℓ,0
equation (10.33b) may be written
Bh Uℓ,0 := −∆θ−1 △θ Uℓ,0 − 21 rℓ2 ∆θLh Uℓ,0 ,
where Lh (defined by (10.33)) is an approximation of Lu = (1/r)(rur )r + uθθ /r2 . The local
truncation error of the BC Bh Uℓ,0 = 0 is
Rh ℓ,0
:=Bh uℓ,0 = ∆θ−1 △θ uℓ,0 − 12 rℓ2 ∆θLh uℓ,0
   
= − uθ + O(∆θ2 ) ℓ,0 − 21 rℓ2 ∆θ Lu + O(h2 ) ℓ,0
 
= − uθ − 12 rℓ2 ∆θLu ℓ,0 + O(∆θ2 ) + O(h2 ) = O(∆θ2 ) + O(h2 )

as required (since uθ = 0 and Lu = 0 at (ℓh, 0)).


10.20
Part (a): Consistency of Lh proved in the text and consistency of Bh established in Exercise 10.19.
Part (b) From (10.33a) we find

1 
− Lh Uℓ,m = − rℓ+1/2 (Uℓ+1,m − Uℓ,m ) − rℓ−1/2 (Uℓ,m − Uℓ−1,m )
h2 rℓ
1
− 2 2 (Uℓ,m+1 − 2Uℓ,m + Uℓ,m−1 ) ,
rℓ ∆θ
which is of the form (10.30) with ν = 4. The coefficient of Uℓ,m is positive and those of its
neighbours are negative, thus satisfying the first of conditions (10.31). The sum of coefficients
is zero since Lh 1 = 0, consequently −Lh satisfies the definition of a positive type operator
(Definition 10.8).
To establish a maximum principle we mirror the proof of Theorem 10.2. The inequality −Lh Uℓ,m ≤ 0
gives (note that rℓ+1/2 + rℓ−1/2 = 2rℓ )
h−2 1
2(h−2 + (rℓ ∆θ)−2 )Uℓ,m ≤ (rℓ+1/2 Uℓ+1,m + rℓ−1/2 Uℓ−1,m ) + 2 2 (Uℓ,m+1 + Uℓ,m−1 )
rℓ rℓ ∆θ
h −2
2 
≤ (rℓ+1/2 + rℓ−1/2 ) + 2 2 max Uℓ+i,m+j
rℓ rℓ ∆θ i=±1,j=±1
= 2(h−2 + (rℓ ∆θ)−2 ) max Uℓ+i,m+j .
i=±1,j=±1

Consequently, Uℓ,m ≤ max{Uℓ+1,m , Uℓ,m+1 , Uℓ−1,m , Uℓ,m−1 } and the proof proceeds exactly as
in Theorem 10.2.
Part (c) Φ = 1 − 14 r2 > 0 on the unit circle r = 1 and, since −Lh Φ = −LΦ = 1 this is a
possible comparison function. Then, since Φ is bounded on the domain, Lh must be stable
(Corollary 10.3).
Part (d) This is a consequence of Theorem 6.7.
10.21
With 1 1 π  π 2
u(r, θ) = r2 log( ) sin 2θ + ( − θ)r2 cos 2θ − r
π r 4 4

97
we find that u(r, 0) = 0, u(r, 21 π) = 0 and u(1, θ) = 14 (1 − 4θ/π) cos 2θ− 41 .
Consider the functions f (r, θ) = r2 log( 1r ) sin 2θ, g(r, θ) = ( π4 − θ)r2 cos 2θ and h(r, θ) = 14 r2 .
1
fr = −r(2r log(r) + 1) sin(2θ), fθ = 2r2 log( ) cos 2θ
r
frr = −(2r log(r) + 3) sin(2θ), fθθ = 4r2 log(r) sin 2θ

so that ∇2 f := frr + 1r ur + 1
r 2 fθθ = −4 sin 2θ. Similarly
π 
gr = 2( − θ)r cos 2θ, gθ = −r2 cos(2θ) − 2 1
4π − θ r2 sin 2θ
4
π
grr = 2( − θ) cos 2θ, gθθ = 4r2 sin 2θ − 4( 41 π − θ)r2 cos 2θ
4
and so ∇2 g = 4 sin 2θ. Hence L(f + g) = 0: f + g is a harmonic function. Also ∇2 h = −1. Thus
−∇2 u = 1 since u = f + g + h.
Also,
urr = −2 log(r) sin 2θ + terms involving θ only
so that |urr | → 0 as r → 0 so long as sin 2θ 6= 0.
10.22
Suppose that the eight neighbours of the grid point Q4 Q3 Q2
P(xℓ , ym ) are labelled as shown so that their coordinates Q5 P Q1
are Q1 (xℓ+1 , ym ), Q2 (xℓ+1 , ym+1 ), etc. Q6 Q7 Q8
Defining the operator Lh to be
8
X
Lh u P
:= α0 u P
− αj u Qj
,
j=1

then Taylor expanding each of the terms u(xℓ±h , ym±h ) around the point (xℓ , ym ), we find on
collecting terms, that
 8
X 
Rh P
= Lu P
− α0 u P
− αj u Qj
j=1

= C0 u + h(C1 ux + C2 uy ) + (a − 21 h2 C3 )uxx + (2b − h2 C4 )uxy + (c − 21 h2 C5 )uyy


− 16 h3 (C6 uxxx + 3C7 uxxy + 3C8 uxyy + C9 uyyy ) + O(h4 ),
where u and its derivatives on the right hand side are evaluated at P and Ck (k = 0, 1, . . . , 9)
are linear expressions in the coefficients αj (j = 0, 1, . . . , 8). In order that Rh = O(h2 ), we find
that the 9 α’s should satisfy the 10 linear equations, here presented in matrix-vector form (all
equations have been multiplied by −1 for convenience):
   
1 1 1 1 1 1 1 1 1   0
 0 1 1 0 −1 −1 −1 α
 0 1  0
  α1 
0 
 
 0 0 1 1 1 0 −1 −1 −1    0 
   α2   
 0 1 1 0 1 1 1 0 1    a
 α3   
 0 0 1 0 −1 0 1 0 −1     2 b
Cα =  α4  = 2 
  =: a, say.
  h  c
 0 0 1 1 1 0 1 1 1    
 0 1 1 0 −1 −1 −1 0 1   α5  0 
   α6   
 0 0 1 0 1 0 −1 0 −1    0 
   α7   
 0 0 1 0 −1 0 −1 0 1  0 
α8
0 0 1 1 1 0 −1 −1 −1 0

98
The second and seventh rows of the coefficient matrix, C, are identical, as are the third and
eighth. Thus the rank of C cannot exceed 8 (the cause of this reduction in rank will be explained
below). By performing elementary row operations on the augmented matrix [C|a] (where a
denotes the right hand side vector) it can be shown that the reduced row echelon form is
 
1 0 0 0 0 0 0 0 −4 (2b − 2a − 2c)/h2
 0 1 0 0 0 0 0 0 2 (a − b)/h2 
 
 0 0 1 0 0 0 0 0 −1 b/h 2 
 
 0 0 0 1 0 0 0 0 2 (−b + c)/h 2 
 
 0 0 0 0 1 0 0 0 −1 0 
  α = 0.
 0 0 0 0 0 1 0 0 2 (a − b)/h 2 
 
 0 0 0 0 0 0 1 0 −1 b/h 2 
 
 0 0 0 0 0 0 0 1 2 (−b + c)/h 2 
 
 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0

from which we deduce that the rank of C is exactly 8; there is a one-parameter family of solutions
given by

α0 = −2(a + b + c)/h2 + 4α8 , α1 = α5 = (a − b)/h2 − 2α8 ,


α2 = α6 = b/h2 + α8 α3 = α7 = (−b + c)/h2 − 2α8 ,

α4 = α8 , in which α8 is an arbitrary parameter. This will match the solution (10.39) if α8 =


1 2
2 (γ − b)/h .
In order to explain the reduction in rank, we first observe that Lh vℓ,m = 0 when vℓ,m = (x −
xℓ−1 )(x − xℓ )(x − xℓ+1 ) simply because v = 0 at each of the points P, {Qj }8j=1 . We also note
that x − xℓ±1 = (x − xℓ ) ± h and so

vℓ,m = (x − xℓ ) (x − xℓ )2 − h2 = (x − xℓ )3 − h2 (x − xℓ )

and Lh v = 0 implies that Lh (x − xℓ )3 = h2 Lh (x − xℓ ).


The second observation is that, when u is expanded in a Taylor series about the point (xℓ , ym ):

u(x, y) = u + (x− xℓ )ux + (y − ym )uy + 12 (x− xℓ )2 uxx + 2(x− xℓ )(y − ym )uxy + (y − ym )2 uyy + · · ·

where u := u(xℓ , ym ), ux := ux (xℓ , ym ), etc., and, applying Lh term by term to this expansion,
we find  
Lh u = u(Lh 1) + ux Lh (x − xℓ ) + uy Lh (y − ym ) + · · · .
Therefore C1 = hLh (x − xℓ ) and C6 = h3 Lh (x − xℓ )3 and so C1 = C6 —the 2nd and 7th rows of
C are identical.
A similar calculation with vℓ,m = (y − ym−1 )(y − ym )(y − ym+1 ) shows that Lh (y − ym )3 =
h2 Lh (y − ym ) and therefore C2 = C9 —the 3rd and 10th rows of C are identical.
10.23
We rewrite (10.41) as
1
Lh Uℓ,m = −h−1 −1
x hy a(Uℓ−1,m −2Uℓ,m+Uℓ+1,m )+ 12 b(Uℓ+1,m+1 −Uℓ−1,m+1 +Uℓ−1,m−1 −Uℓ+1,m−1 )
ρ
+ cρ(Uℓ,m−1 − 2Uℓ,m + Uℓ,m+1 )

− 21 γ(4Uℓ,m−2Uℓ+1,m +Uℓ+1,m+1 −2Uℓ,m−1+Uℓ−1,m−1 −2Uℓ−1,m+Uℓ−1,m−1 −2Uℓ,m−1+Uℓ+1,m−1 ) .

99
This is of the form
 8
X 
Lh u P
= h−1
x h −1
y α0 U P
− αj U Qj
j=1

with (these are easiest to calculate by adjusting the coefficients in Fig. 10.15)
α0 = 2a/ρ + 2cρ − 2γ, α1 = a/ρ − γ, α2 = − 21 b + 21 γ
α3 = cρ − γ, α4 = 21 b + 12 γ, α5 = α1
α6 = − 21 b + 1
2 γ, α7 = α3 , α8 = 12 b + 21 γ.
These coefficients
p will be non-negative if γ is chosen such that |b| ≤ γ, γ ≤ a/ρ and γ ≤ cρ.
When ρ = a/c these become √
|b| ≤ γ ≤ ac
which can always be achieved when b2 ≤ ac.
10.24
The operator L−
h defined by (10.51) becomes, when the finite difference operators are expanded,

L−
h Uℓ,m = (4εh
−2
+ h−1 )Uℓ,m − εh−2 Uℓ+1,m + Uℓ,m+1 + Uℓ,m−1 − (h−1 + εh−2 )Uℓ−1,m
is of the form (10.30) with ν = 4 and clearly has the properties of a positive type operator from
Definition 10.8 (the correct sign pattern is evident and the coefficients sum to zero).
10.25
Using △−x = △− 12 δx2 , then the analogue of the operator L−
h defined by (10.51) that is appropriate
for the PDE −ε∇2 u + pux = 0 with p > 0 may be written as
L−
h Uℓ,m = −εh (δx + δy2 )Uℓ,m + ph−1 △−x Uℓ,m
−2 2

= −(εh−2 + 21 ph−1 )δx2 − εh−2 δy2 Uℓ,m + ph−1 △x Uℓ,m


= −εh−2 (1 + Peh )δx2 − εh−2 δy2 Uℓ,m + ph−1 △x Uℓ,m ,
where Peh = ph/(2ε).
When p < 0, the backward difference △−x should be replaced by a forward difference △+x and,
with the identity △+x = △ + 12 δx2 , the corresponding manipulations are

L+
h Uℓ,m = −εh (δx + δy2 )Uℓ,m + ph−1 △+x Uℓ,m
−2 2

= −(εh−2 − 21 ph−1 )δx2 − εh−2 δy2 Uℓ,m + ph−1 △x Uℓ,m


= −εh−2 (1 − Peh )δx2 − εh−2 δy2 Uℓ,m + ph−1 △x Uℓ,m .
Here Peh < 0 so that Peh = −|Peh | and therefore both cases are accommodated in the single
formula
L±h Uℓ,m := −εh
−2
(1 + |Peh |)δx2 Uℓ,m − εh−2 δy2 Uℓ,m + h−1 p△x Uℓ,m .
The generalization to the PDE −ε(uxx + uyy ) + pux + quy = 0, is
−εh−2 (1 + |Peh ,x |)δx2 Uℓ,m − εh−2 (1 + |Peh ,y |)δy2 Uℓ,m + h−1 p△x Uℓ,m + h−1 q△y Uℓ,m = 0,
where Peh,x := ph/(2ε) and Peh,y := qh/(2ε).
10.26
From Exercise 4.20 we find that, in polar coordinates,
1 1
uxx + uyy = (rur )r + 2 uθθ
r r

100
and
1 1
−yux + xuy = −r sin θ(cos θur − sin θuθ ) + r cos θ(sin θur + cos θuθ )
r r
= (cos2 θ + sin2 θ)uθ = uθ .

Hence the PDE −ε(uxx + uyy ) − yux + xuy = 0 becomes

1 1 
−ε (rur )r + 2 uθθ + uθ = 0.
r r
A finite difference scheme that is consistent of second order may be constructed using the ap-
proximation (10.33) of the Laplacian and a central difference replacement of the first derivative
term. This leads to the scheme Lh Uℓ,m = 0, where

1 1 
Lh Uℓ,m := −ε δr (rℓ δr Uℓ,m ) + δ 2 Uℓ,m + ∆θ−1 △θ Uℓ,m
h2 rℓ rℓ2 ∆θ2 θ

which is valid for rℓ > 0. It was pointed out in Example 10.14 that u(0, θ) must be independent
of θ—and therefore uθ (0, θ) = 0)—if u(r, θ) is to be single-valued as r → 0. Thus a possible finite
difference scheme for ℓ = 0 is (see (10.35))
M−1
1 X
U0 = U0,m .
M m=0

Using (10.33a) we find that

Lh Uℓ,m = α0 Uℓ,m − α1 Uℓ+1,m − α2 Uℓ,m+1 − α3 Uℓ−1,m − α2 Uℓ,m−1 ,

where
εrℓ+1/2 1  εrℓ−1/2 1 
α1 = , α2 = ε − 12 rℓ2 ∆θ , α3 = , α4 = ε + 21 rℓ2 ∆θ
rℓ h2 rℓ2 ∆θ2 rℓ h2 rℓ2 ∆θ2
P4 1 2
and α0 = j=0 αj . The coefficients will clearly be non-negative provided ε ≥ 2 rℓ ∆θ. This
means that if the motion takes place in a circle of radius a, the azimuthal grid size ∆θ must be
chosen such that ∆θ ≤ 2ε/a2 . The quantity u is advected by a rigid body rotational flow and so
the speed increases with distance from the origin.

101
Exercises 11 Finite difference methods for parabolic PDEs
11.1
Differentiating ut = uxx with respect to t we find utt = uxxt while differentiating twice with
respect to x leads to uxxxx = uxxt . Hence (11.12) becomes
n n
Rnm = 12 kutt m
− 1 2 2 4
12 h uxxxx m + O(k ) + O(h )
n
= 12 h2 (r − 1 2 4
6 )uxxt m + O(k ) + O(h ).

When r = 1/6 the order of consistency is O(k 2 ) + O(h4 ).


11.2
(a) An FTCS approximation of ut = uxx + f (x, t) is given by (11.10):
n+1 n
Um = Um + rδx2 Um
n n
+ kfm .

for which the local truncation error is


n n
Rnm = 12 kutt m
− 1 2
12 h uxxxx m + O(k 2 ) + O(h4 ).

Differentiating ut = uxx + f with respect to t we find utt = uxxt + ft while differentiating twice
with respect to x leads to uxxxx = uxxt + fxx . Hence the LTE becomes
n n n
Rnm = 12 kft m
− 1 2
12 h fxx m + 21 h2 (r − 16 )uxxt m
+ O(k 2 ) + O(h4 ).

and there is no increase in order of consistency when r = 1/6 unless f itself satisfies the heat
equation: ft = fxx .
(b) An FTCS approximation of ut = uxx − u is given in Example 11.9 (with γ = −1) as
n+1 n n n
Um = rUm−1 + (1 − 2r − k)Um + rUm+1

for which the local truncation error is


n n
Rnm = 21 kutt m
− 1 2
12 h uxxxx m + O(k 2 ) + O(h4 ).

Differentiating ut = uxx − u with respect to t we find utt = uxxt − ut while differentiating twice
with respect to x leads to uxxxx = uxxt + uxx = uxxt + ut + u. Hence the LTE becomes
n n
1 2
Rnm = − 12 h ((1 + 6r)ut + u) m
+ 12 h2 (r − 61 )uxxt m
+ O(k 2 ) + O(h4 ).

and there is no increase in order of consistency when r = 1/6.


11.3
Equations (11.8b) give, for m = 1, 2, . . . , M − 1,

U1n+1 = rg0 (nk) + (1 − 2r)U1n + rU2n


U2n+1 = rU1n + (1 − 2r)U2n + rU3n
.. .. .. ..
. . . .
n+1 n n n
UM−2 = rUM−3 + (1 − 2r)UM−2 + rUM−1
n+1 n n
UM−1 = rUM−2 + (1 − 2r)UM−1 + rg1 (nk)

102
which, in matrix-vector form, become
   
1 − 2r r 0 ··· 0 g0 (nk)
 r 1 − 2r r   0 
   
 .. ..  n  .. 
un+1 = . . u + r . 
 0 r  
 0 

 ..   
 . r   0 
0 r 1 − 2r g1 (nk)

where un = [U1n , U2n , . . . , UM−1


n
]T . The coefficient matrix is clearly the same as that in the BTCS
scheme (11.25) with r replaced by −r.
11.4
For any j with m − n < j < m + n
0
Uj1 = rUj−1 1
+ (1 − 2r)Uj1 + rUj+1 = (−1)j [−r + (1 − 2r) − r] = (1 − 4r)(−1)j .

A similar calculation with m − n + 1 < j < m + n − 1 gives

Uj2 = rUj−1
1
+ (1 − 2r)Uj1 + rUj+1
1
= (1 − 4r)(−1)j [−r + (1 − 2r) − r] = (1 − 4r)2 (−1)j

and, with m − n + ℓ < j < m + n − ℓ,

Ujℓ+1 = rUj−1

+ (1 − 2r)Ujℓ + rUj+1

= (1 − 4r)ℓ (−1)j [−r + (1 − 2r) − r] = (1 − 4r)ℓ+1 (−1)j ,
1
for ℓ = 0, 1, . . . , m − 1. At ℓ = m − 1 we find Unm = (1 − 4r)m (−1)n so, for r = 2 + ε,
n
|Um | = |1 + 4ε|n → ∞
n
as P(X, T ) is a fixed point, n = T /k → ∞ as k → 0 and the sequence |Um | is unbounded. The
1
scheme is therefore unstable when r > 2 .
11.5
The finite difference scheme Umn+1
= 13 rUm−2
n n
+ (1 − r)Um + 23 rUm+1
n
can be written in the form
(11.10) with
n n n n
Lh Um = − 31 h−2 (Um−2 − 3Um + 2Um+1 ).
Using the Taylor expansions of unm−2 and unm+1 about the point (xm , tn ), we find that (all the
terms on the right hand side are evaluated at (xm , tn ))

t P(X, T )

bc
b b b

A B
Interval of dependence

Figure 15: Stencil (left) and domain of dependence (right) for Exercise 11.5.

103
1 1
Lh unm = − 13 h−2 u − 2hux + (2h)2 uxx − (2h)3 uxxx + O(h4 )
2! 3!
− 3u
1 2 1 
+ 2u + 2hux + 2 h uxx + h3 uxxx + O(h4 )
2! 3!
= −uxx + O(h).
Since Lh u = Lu + O(h), Lh is first order consistent with L and, from (11.11), the given method
is therefore consistent with the heat equation. The stencil and domain of dependence are shown
in Fig. 15.
11.6
n+1 n n n n
The finite difference scheme Um = Um + r(Um−2 − 2Um−1 + Um ) can be written in the form
(11.10) with
n
Lh Um n
= −h−2 δx2 Um−1 .
Consistency could be addressed in a manner similar to the previous exercise but a rather more
elegant approach is to observe that
n n
Lh unm = −h−2 δx2 unm−1 = −uxx m−1
+ O(h2 ) = −uxx m
+ O(h)
so that Lh is consistent of order 1 with L.

t P(X, T )

bc
b b b

A B
Interval of dependence

Figure 16: Stencil (left) and domain of dependence PAB (right) for Exercise 11.6.

The stencil and domain of dependence are shown in Fig. 16. Because the numerical solution at
P uses no information along the initial line for x > X it cannot converge to the true solution by
virtue of the CFL condition.
11.7
Replacing U by −U in Theorem 11.5 we have

−h−2 δx2 (−Um
n n+1
) + k −1 (−Um n
) − (−Um ) ≤0
i.e., − h−2 δx2 Um
n n+1
+ k −1 (Um n
− Um )≥0
for (xm , tn+1 ) ∈ Ωτ . Thus, if r = k/h2 ≤ 1/2 then U is either constant or else attains its minimum
(−U attains its maximum) value on Γτ .
If −h−2 δx2 Um
n
+ k −1 (Umn+1
− Um n
) = 0 then U is either constant or else attains its maximum and
minimum value on Γτ . The case when U is constant can only occur if U is the same constant on
Γτ . So, when U0n = UM n
= 0, the maximum absolute value must occur at t = 0.
11.8
To establish inverse monotonicity we have to show that Lh U ≥ 0 implies that U ≥ 0.

104
In view of the discrete minimum principle (replacing U by −U in Theorem 11.5—see also Exer-
cise 11.7), U is either constant or else attains its minimum value on Γτ . If U is constant then,
because Lh Uℓ,m = Uℓ,m ≥ 0 for nodes (xℓ , tn ) on the boundary, this constant must be non-
negative. Otherwise, U achieves its minimum value on the boundary which is non-negative for
the same reason.
11.9
The local truncation error of the BTCS approximation (11.22) is, by definition,
n 1 n+1  1 n+1
Rh := u − unm − rδx2 un+1 = (um − unm ) − h−2 δx2 un+1
m k m m
k m

and, using unm = un+1 m − kut |n+1


m + 12 k 2 utt |n+1
m + O(k 3 ) together with δx2 un+1
m = uxx |n+1
m +
1 2 n+1 4
12 h u xxxx | m + O(h ), we find
n  
Rh m = ut |n+1m − 12 kutt |n+1
m + O(k 2 ) − uxx |n+1m
1 2
+ 12 h uxxxx|n+1
m + O(h4 )
 n+1  n+1 
= ut − uxx m − 21 h2 rutt + 61 uxxxx m + O(k 2 ) + O(h4 )

and so Rh = O(k) + O(h2 ). Since utt = utxx = ∂x2 ut = uxxxx , this becomes
n  n+1 
Rh m = − 21 h2 r + 61 utxx m + O(k 2 ) + O(h4 ).

11.10
Since A = I + kT , where T is given in (6.26), and

v T Av = v T v + kv T T v
then v T Av ≥ 0 follows from the positive definiteness of T : v T T v ≥ 0.
11.11
Replacing U by −U in Theorem 11.11 we deduce that

−h−2 δx2 (−Um
n+1 n+1
) + k −1 (−Um n
) − (−Um ) ≤0
i.e., − h−2 δx2 Um
n+1 n+1
+ k −1 (Um n
− Um )≥0
and so U is either constant or else attains its minimum value on Γτ when r = k/h2 ≤ 1/2. Thus,
if −h−2 δx2 Um
n+1
+ k −1 (Umn+1 n
− Um ) = 0 then U is either constant or else attains its maximum and
minimum value on Γτ . The case when U is constant can only occur if U is the same constant on
Γτ . So, when U0n = UM n
= 0, the maximum absolute value must occur at t = 0.
11.12
The local truncation error of the finite difference scheme is, by definition,
n 1 n+1 
Rh m
:= um − unm − rδx2 unm + 12 γk(unm−1 + unm+1 )
k
1 
= (un+1
m − unm ) − h−2 δx2 unm + 12 γ(unm−1 + unm+1
k
The first two terms on the right and side are the same as the FTCS method and lead to (11.12).
The final term on the right and side could be dealt with using the Taylor expansions of unm±1
about the point (xm , tn ), but it is rather more elegant to observe that
n
unm−1 + unm+1 = 2unm + δx2 unm = 2unm + h2 uxx m
+ O(h4 )

105
and so unm−1 + unm+1 = 2unm + O(h2 ). Thus, combined with (11.12), the LTE is
n n n
Rnm = 12 kutt m
− 1 2
12 h uxxxx m − 12 γh2 uxx m
+ O(k 2 ) + O(h4 ).

11.13
With Lh U = −h−2 δx2 U , the defining equation (11.30) of the θ–method becomes
n+1
Um − θrδx2 Um
n+1 n
= Um + (1 − θ)rδx2 Um
n

i.e.,
n+1 n+1 n+1 n n n
−rθUm−1 + (1 + 2rθ)Um − rθUm+1 = r(1 − θ)Um−1 + (1 − 2(1 − θ)r)Um + r(1 − θ)Um+1
so, with the given BCs, these give, for m = 1 and m = M − 1,

(1 + 2rθ)U1n+1 − rθU2n+1 = (1 − (1 − 2θ)r)U1n + r(1 − θ)U2n + r (1 − θ)g0 (tn ) + θg0 (tn+1 )
n+1 n+1 n n

−rθUM−2 + (1 + 2rθ)UM−1 = r(1 − θ)UM−2 + (1 − (1 − 2θ)r)UM−1 + r (1 − θ)g1 (tn ) + θg1 (tn+1 ) .
Thus, for (M − 1) × (M − 1) matrices B and C:
Bun+1 = Cun + f n
where
 
1 + 2rθ −rθ 0 ··· 0
 −rθ 1 + 2rθ −rθ 
 
 . . . . 

B= 0 −rθ . .  = A(θr)

 .. 
 . −rθ 
0 −rθ 1 + 2rθ
 
1 − 2r(1 − θ) r(1 − θ) 0 ··· 0
 r(1 − θ) 1 − 2r(1 − θ) r(1 − θ) 
 
 .. ..  
C =
 0 r(1 − θ) . .  = A (θ − 1)r ,

 .. 
 . rθ 
0 r(1 − θ) 1 − 2r(1 − θ)
where A ≡ A(r) is the coefficient matrix appearing in (11.25). Also,
f n = r[(1 − θ)g0 (tn ) + θg0 (tn+1 ), 0, . . . , 0, (1 − θ)g1 (tn ) + θg1 (tn+1 )]T .

11.14
In the context of the matrix A(θr), the parameters a, b and c appearing in (B.11) are
a = c = −θr, b = 1 + 2rθ
and so the eigenvalues of A(r) are given by (with dimension n = M − 1)

λj = 1 + 2rθ + (1 + 2rθ) cos ,
 M
jπ jπ
= (1 + 2rθ) 1 + cos = 2(1 + 2rθ) cos2
M 2M

106
which is clearly positive when θ ≥ 0 for all j = 1, 2, . . . , M − 1. Thus A is positive definite since
it is symmetric with positive eigenvalues.
11.15
Replacing U by −U in Theorem 11.16 we deduce that
 
n+1
− 21 h−2 δx2 (−Um n
) + (−Um n+1
)) + k −1 (−Um n
) − (−Um )) ≤ 0
i.e., − 21 h−2 δx2 (Um
n+1 n
+ Um n+1
) + k −1 (Um n
− Um )≥0

for (xm , tn+1 ) ∈ Ωτ . If r = k/h2 ≤ 1 then, from Theorem 11.16, −U is either constant or else
attains its maximum value—therefore U attains its minimum value, on Γτ .
Thus, if − 12 h−2 δx2 (Um
n+1 n
+ Um n+1
) + k −1 (Um − Umn
) = 0 then U is either constant or else attains
both its maximum and minimum value on Γτ . The case when U is constant can only occur if U
is the same constant on Γτ . So, when U0n = UM n
= 0, the maximum absolute value must occur
at t = 0.
11.16
1
With h = 2 and homogeneous Dirichlet BCs are applied the Crank–Nicolson scheme (11.34b)
gives  n
n+1 1−r n n 1−r
Um = U ⇒ Um =
1+r m 1+r
n
and so Um is negative on odd-numbered time steps if r > 1, thus violating inverse monotonicity.
Hence r ≤ 1 is a necessary condition of inverse monotonicity.
11.17
We use two properties of a sum of non-negative terms: it is always smaller than the (largest
term) × (the number of terms) and it is always larger than the largest single term. The norm

M
!1/2 M
!1/2
X ′′
X ′′
2
kU· kh,2 = h |Um | ≤ h 1 max |Um | = kU·kh,∞ .
0≤m≤M
m=0 m=0

n M
If the largest term among {Um }m=0 occurs at m = 0 or m = M , then kU· kh,∞ = |U0 | or |UM |
1

and kU·kh,2 ≥ 2 hkU·kh,∞ .

If kU· kh,∞ = |Um | with 0 < m < M , then kU· kh,2 ≥ hkU· kh,∞ . Thus, in general,

1
2 hkU· kh,∞ ≤ kU· kh,2 ≤ kU· kh,2 .

For the two possible grid functions a simple calculation reveals

Case kU·kh,∞ kU· kh,2


(a) 1 1
√ Right hand bound attained
1
(b) 1 2 h Left hand bound attained

These examples show that the bounds are attained so they cannot be improved upon.
11.18
n
We substitute Um = ξ n eiκmh into [1 − rδx2 ]Um
n+1 n
= Um n+1
and use the relationships Um n
= ξUm
and (11.47b) to give
1
n
[1 + 4r sin2 ( 21 κh)]ξUm n
= Um ⇒ ξ= .
1 + 4r sin2 ( 12 κh)

107
Clearly ξ is real and positive for all wavenumbers κ and, since 1 + 4r sin2 ( 12 κh) ≥ 1, it follows
that 0 ≤ ξ ≤ 1 for all mesh ratios r > 0—it is unconditionally ℓ2 -stable.
11.19
From the solution to Exercise 11.13, the θ-method applied to the heat equation gives
n+1
Um − θrδx2 Um
n+1 n
= Um + (1 − θ)rδx2 Um
n
.
n
We now substitute Um = ξ n eiκmh and use the relationships Um
n+1 n
= ξUm and (11.47b) to give
2 1
(we define s = sin ( 2 κh) as a convenient abbreviation)

n n 1 − 4r(1 − θ)s
[1 + 4rθs]ξUm = [1 − 4r(1 − θ)s]Um ⇒ ξ= .
1 + 4rθs
We can rewrite this as
4rs
ξ =1−
1 + 4rθs
so ξ ≤ 1 for all r > 0 and θ ≥ 0. In order that ξ ≥ −1 we require

1 − 4r(1 − θ)s ≥ −1 − 4rθs ⇒ 2r(1 − 2θ)s ≤ 1.


1
This holds for all r > 0 when θ ≥ 2 otherwise, it will hold for all s ∈ [0, 1] only when r is
restricted by
1
r≤ .
2(1 − 2θ)
1
This reduces, as it should, to r ≤ 2 when θ = 0 and the method becomes the FTCS scheme.
11.20
n n
Since Um−1 + Um+1 = δx2 Um
n
+ 2Umn
, substituting Umn
= ξ n eiκmh and use the relationships
n+1 n 2 1
Um = ξUm and (11.47b) give (we define s = sin ( 2 κh) as a convenient abbreviation)

ξ = 1 − k − (4r − 2k)s.

Thus ξ(s) is a linear function of s ∈ [0, 1] and will achieve its maximum an minimum values
at either s = 0 or s = 1. At s = 0, −1 ≤ ξ(0) = 1 − k ≤ 1 for 0 < k ≤ 2 while, at s = 1,
−1 ≤ ξ(1) = 1 − 4r + k ≤ 1 requires k ≤ 4r (i.e., h ≤ 2) and 4r − k ≤ 2. In terms of h and k,
the conditions for |ξ| ≤ 1 for all wavenumbers κ are

2h2
k ≤ 2, h ≤ 2, k≤ .
4 − h2
The standard method (11.18) with γ = 1 has the amplification factor

ξ = 1 − k − 4rs.

At s = 0, −1 ≤ ξ(0) = 1 − k ≤ 1 for 0 < k ≤ 2 while, at s = 1, −1 ≤ ξ(1) = 1 − 4r − k ≤ 1


requires 4r + k ≤ 2. Thus, in terms of h and k, the conditions for |ξ| ≤ 1 for all wavenumbers κ
are
2h2
k ≤ 2, k ≤ .
4 + h2
This limit on k is stricter than for the first method which will therefore allow larger time steps
while maintaining stability (the order of consistency is O(h2 ) + O(k) for both schemes).

108
11.21
The FTCS scheme (11.53)
n+1 n
Um = Um + rδx2 Um
n n
+ c△x Um
n n n
= (r − 12 ρ)Um−1 + (1 − 2r)Um + (r + 21 ρ)Um+1

is of the form
n+1 n n n
Um = α−1 Um−1 + α0 Um + α1 Um+1
with α−1 = r − 21 ρ, α0 = 1 − 2r, α1 = r + 12 ρ. Non-negativity of the coefficients requires
1 1
2 ρ ≤ r ≤ 2 . The left inequality simplifies to h ≤ 2ε (so that stability is only possible if the
spatial grid size is sufficiently small compared to ε), that is, Peh ≤ 1, where Peh := h/(2ε) is the
mesh Peclet number. The right inequality leads to k ≤ h2 /2ε—the stability region is shown in
Fig. 17 (Left).
The conditions 12 ρ2 ≤ r ≤ 21 for ℓ2 -stability require k ≤ 2ε and k ≤ h2 /2ε, both coinciding when
Peh = 1. The corresponding stability region is shown in Fig. 17 (Right). Thus the scheme is
ℓ2 -stable for any spatial grid size.

k k
ℓ∞ stability region ℓ2 stability region
2ε 2ε

2ε h 2ε h
(Peh = 1) (Peh = 1)
Figure 17: The stability regions for Exercise 11.21.

The proof of Theorem 11.5 may be used to establish a maximum principle under the conditions
1 1 j+1
2 ρ ≤ r ≤ 2 . The only change necessary is the derivation of an upper bound on Um : This now
reads
j+1 j j j
Um ≤ α−1 Um−1 + α0 Um + α1 Um+1
j j j
and, because Um−1 , Um , Um+1 ≤ Kτ and the non-negativity of the coefficients
j+1

Um ≤ α−1 + α0 + α1 Kτ = Kτ

since α−1 + α0 + α1 = 1.
11.22
n
We substitute Um = ξ n eiκmh into the finite difference scheme
n+1
Um − rδx2 Um
n+1 n
= Um n
− 2c△Um ,
n+1 n
and use the relationships Um = ξUm , (11.47b) and (11.47c) to give
1 − 2ic sin κh
ξ= .
1 + 4r sin2 21 κh
Then
1 + 4c sin2 κh (r − 2c2 ) + 2s(r2 + c2 )
|ξ|2 − 1 = 2 1 − 1 = −8s ,
(1 + 4r sin 2 κh)2 (1 + 4r sin2 21 κh)2

109
where we have written s = sin2 21 κh. Clearly |ξ|2 − 1 ≤ 0 if the numerator of this expression is
non-negative for s ∈ [0, 1]. Since it is linear in s we need only check the end points: s = 0 leads
to r ≥ 2c2 and s = 1 imposes no restriction. Thus, |ξ|2 ≤ 1 if r ≥ 2c2 , that is, k ≤ 21 .
11.23
n
We substitute Um = ξ n eiκmh into the finite difference scheme
n+1 n n n
Um = 13 rUm−2 + (1 − r)Um + 32 rUm+1
n+1 n n n n
and use the relationships Um = ξUm , Um−2 = e−2iκmh Um and Um+1 = eiκmh Um
n
to give
n n n
ξUm = 31 re−2iκh Um + (1 − r)Um + 23 reiκh Um
n
⇒ ξ = 1 − r + 13 r(2eiκh + e−2iκh ).

Extracting real and imaginary parts of the right hand side we have

ξ = (1 − r − r cos κh) + 31 ir sin κh = (1 − 2r sin2 12 κh) + 13 ir sin κh

so that, after expressing sin κh in terms of half-angles,


 
|ξ|2 − 1 = −4rs 1 − r + 91 r(1 − s) , s = sin2 12 κh.

Hence |ξ|2 − 1 ≤ 0 if the bracketed term on the right hand side is positive for s ∈ [0, 1], Since it
is a linear expression in s, only its end-points need to be examined. It is non-negative at s = 0
if r ≤ 9/8 and at s = 1 if r ≤ 1. The method is therefore ℓ2 stable for r ≤ 1.
11.24
In these types of calculations it is convenient to define θ = κh ∈ [−π, π].
(a) ξ(θ) = 1 − 4r sin2 ( 12 θ) and so ξ(0) = 1 (no information), ξ(π) = 1 − 4r so −1 ≤ ξ ≤ 1 if
r < 12 .
For small values of θ we have sin2 ( 21 θ) ≈ 41 θ2 so ξ = 1 − kκ 2 + O(κ 3 ). This gives no new
conditions.
(b) ξ = 1 − 4r sin2 ( 12 θ) + i ρ sin θ. The conditions for κh = 0, π are the same as part (a).
For small values of θ (bearing in mind that r = εk/h2 ),

ξ = 1 + ikκ − εk 2 κ 2 + · · · ⇒ |ξ|2 = 1 − (2ε − k)kκ + O(k 2 ).

Hence |ξ|2 > 1 for small wavenumbers unless k ≤ 2ε. This is one of the conditions found
in Example 11.24
(c) Little useful information is gained by sampling ξ so we expand numerator and denominator
in powers to h (leading to powers of k)

1 − 2ic sin κh 1 − 2ikκ 1 + 4k 2 κ 2 1 + 4k 2 κ 2


ξ= 2 1 ≈ ⇒ |ξ|2 ≈ ≈
1 + 4r sin 2 κh 1 + kκ 2 (1 + kκ 2 )2 1 + 2kκ 2

and the final expression will exceed 1 unless 4k 2 κ 2 ≤ 2kκ 2 , i.e., k ≤ 12 . This condition is
also sufficient for stability—see Exercise 11.22.

11.25
With the Robin end condition −ux (0, t) + σu(0, t) = g0 (t), the numerical boundary condition
(11.57) is replaced by
n
− 21 h−1 (−U−1 + U1n ) + σU0n = g0 (nk).

110
n
Using (11.59) to eliminate U−1 leads to
1 
U n+1 − (1 − 2r − 2hrσ)U0n − 2rU1n = g0 (nk).
2hr 0
or, for computational purposes,

U0n+1 = (1 − 2r − 2hrσ)U0n + 2rU1n + 2rhg0 (nk).

However, it is the former version that is correctly scaled for determining the local truncation
error (all the terms involving u on the right hand side in the following expansions are evaluated
at (0, nk)):
n 1 
Rh 0
= un+1
0 − (1 − 2r − 2hrσ)un0 − 2run1 − g0 (nk)
2hr
1
= u + kut + 21 k 2 utt + O(k 3 )
2hr
− (1 − 2r − 2hrσ)u

− 2r(u + hux + 12 h2 uxx + 61 h3 uxxx + O(h4 )) − g0 (nk)
1 
= (1 − (1 − 2r − 2hrσ) − 2r)u + kut − 2hrux + 12 k 2 utt − kuxx + · · · − g0 (nk)
2hr 
= (σu − ux − g0 (nk)) + 12 h ut − uxx + 61 h(3kutt − 2huxxx) + · · · .

Hence Rh = O(hk) + O(h2 ) is consistent of second order in h since k = O(h), u(0, t) − ux(0, t) =
g0 (t) and ut = uxx .
11.26
Condition (11.57) with n + 1 replaced n gives
n+1
− 12 h−1 (−U−1 + U1n+1 ) = g0 ((n + 1)k)

and the BTCS scheme (11.22b) with m = 0 gives


n+1
−rU−1 + (1 + 2r)U0n+1 − rU1n+1 = U0n .
n+1
Multiplying the first of these by 2hr and adding to the second eliminates U−1 and gives

(1 + 2r)U0n+1 − 2rU1n+1 = U0n + 2hrg0 ((n + 1)k).

11.27
The Crank–Nicolson scheme (11.34b) for the heat equation at m = 0 is
n+1
− 21 rU−1 + (1 + r) U0n+1 − 12 rU1n+1 = 21 rU−1
n
+ (1 − r) U0n + 21 rU1n .

and using (11.57) at t = nk and also with n replaced by n + 1 gives


n n
− 21 h−1 (−U−1 + U1n ) = g0 (nk) ⇒ U−1 = U1n + 2hg0 (nk)
n+1
− 21 h−1 (−U−1 + U1n+1 ) = g0 ((n + 1)k) ⇒ n+1
U−1 = U1n+1 + 2hg0 ((n + 1)k).
n n+1
On substituting for U−1 and U−1 the Crank–Nicolson scheme then becomes

(1 + r) U0n+1 − rU1n+1 = (1 − r) U0n + rU1n + hr g0 (nk) + g0 ((n + 1)k) .

111
11.28
n
With Uℓ,m = ξ n ei(κx ℓ+κy m)h (from (11.62)) we find, using (11.47b),
n
(1 + rδy2 )Uℓ,m = (1 − 4r sin2 21 κy h)Uℓ,m
n

(1 + rδx2 )(1 + rδy2 )Uℓ,m


n
= (1 − 4r sin2 12 κy h)(1 + rδx2 )Uℓ,m
n

= (1 − 4r sin2 12 κy h)(1 − 4r sin2 21 κx h)Uℓ,m


n

n+1 n
which, together with Uℓ,m = ξUℓ,m gives the amplification factor

ξ = (1 − 4r sin2 12 κy h)(1 − 4r sin2 21 κx h).

The expression (1 − 4r sin2 21 κx h) is the amplification factor of the FTCS method for solving the
one-dimensional heat ut = uxx and its modulus was shown in Example 11.21 to lie in the interval
[−1, 1] if, and only if, r ≤ 12 . The same argument applies to the expression (1 − 4r sin2 21 κy h).
Since κ x and κ y are independent variables, it follows that |ξ| ≤ 1 requires r ≤ 21 .
11.29
We prove the result by induction on n. Let K0 = kU 0 kh,∞ , then the induction hypothesis
kU n kh,∞ ≤ kU 0 kh,∞ is satisfied at n = 0. Let us suppose that it holds up until n = j so that
kU j kh,∞ ≤ K0 . We need to prove that kU j+1 kh,∞ ≤ K0 when r ≤ 21 . This is done in a two
step process, exploiting the one-dimensional nature of the factors constituting the scheme. Let
j+1 j
Vℓ,m = (1 + rδy2 )Uℓ,m then
j+1 j j j
|Vℓ,m | = rUℓ,m−1 + (1 − 2r)Uℓ,m + rUℓ,m+1

≤ r + |1 − 2r| + r K0 = K0
j+1 j+1
since 1 − 2r ≥ 0. A similar argument with Uℓ,m = (1 + rδy2 )Vℓ,m gives
j+1 j j j
|Uℓ,m | = rVℓ−1,m + (1 − 2r)Vℓ,m + rVℓ+1,m

≤ r + |1 − 2r| + r K0 = K0

and so the induction hypothesis holds with n = j + 1. Thus kU n kh,∞ ≤ K0 holds for n = 0, 1, . . .
provided that r ≤ 12 .
11.30
The local truncation error of the first of formulae (11.70) is
n n+1/2 
Rh ℓ,m
= k −1 (1 − 21 rδy2 )uℓ,m − (1 + 12 rδx2 )unℓ,m

n+1/2
where the factor k −1 has been included to give the correct scaling and Vℓ,m has been replaced
n+1/2
by uℓ,m . This can be reorganised to give
n n+1/2 n+1/2 
Rh ℓ,m
= k −1 (uℓ,m − unℓ,m ) − 12 h−2 δy2 uℓ,m + δx2 unℓ,m
n n
= 12 ut ℓ,m
+ O(k) − 21 (uyy + uxx ) ℓ,m
+ O(h2 )

so that it is a consistent approximation of ut = uxx + uyy .

112
The argument for the second step of (11.70) is entirely similar.
11.31
(a) The given finite difference scheme may be written

n+1 n k n n n n

Um = Um + rm+1/2 (Um+1 − Um ) − rm−1/2 (Um − Um−1 ) ,
h2 rm
Since rm±1/2 = rm ± h/2, this may be written as

n+1 n k n n n n n

Um = Um + rm (Um+1 − 2Um + Um−1 ) + 12 h(Um+1 − Um−1 )
h2 rm
n+1 n 1 −1
k −1 (Um − Um ) = h−2 δr2 Um
n
+ h △r U mn
rm
which is the same as the scheme obtained by replacing the spatial dervatives in urr + r1 ur with
second order accurate differences and the time derivative by a forward difference k −1 △+t .
(b) We may also write the scheme as

n+1 k h k k h
Um = (1 − )U n + (1 − 2 2 )Um
n
+ 2 (1 + )U n
h2 2rm m−1 h h 2rm m+1
which is of positive type provided that k ≤ h2 /2 (the formula is valid only for m ≥ 1 so
h/(2rm ) = 1/(2m) ≤ 21 ).
It was shown in Exercise 8.7 that ur → 0 as r → 0 when u possesses circular symmetry. Hence
ur /r is of the form 0/0 at the origin and, by l’Hôpital’s rule:
ur ∂r ur
lim = lim = urr (0, t)
r→0 r r→0 ∂r r

so that the PDE becomes ut = 2urr at r = 0. The standard FTCS approximation of this
equation is
k k 
U0n+1 = U0n + 2 2 δr2 U0n = U0n + 2 2 U−1
n
− 2U0n + U1n
h h
n
but, because of symmetry, U−1 = U1n and so
k k k
U0n+1 = U0n + 4 (U n − U0n ) = (1 − 4 2 )U0n + 4 2 U1n
h2 1 h h
which is of positive type for k ≤ h2 /4.
11.32
Using (10.33a) and the solution to Exercise 11.31 the finite difference scheme can be written as
n+1 n n n n n
Uℓ,m = α0 Uℓ,m + α1 Uℓ+1,m + α2 Uℓ,m+1 + α3 Uℓ−1,m + α4 Uℓ,m−1 ,
where
4
X
h h −2
α1 = ρ(1 + ), α3 = ρ(1 − ), α2 = α4 = σrm , αj = 1,
2rm 2rm j=0

where ρ = k/h2 and σ = k/∆θ2 . The four coefficients αj , j = 1, 2, 3, 4 are nonnegative (since the
finite difference scheme is valid only for rm ≥ h) so the scheme will be of positive type if α0 ≥ 0.
Since
4
X
−2
α0 = 1 − αj = 1 − 2ρ − 2σrm
j=1

113
we require
h2 ∆θ2 rm
2
h2 ∆θ2
k≤ ⇒ k≤
2(h2 + ∆θ2 rm2 ) 2(1 + ∆θ2 )
when rm = h.
11.33
We use the expressions derived for Lh Uℓ,m derived in the solution to Exercise 10.17—the notation,
and numbering of nodes, is taken from that solution. Then

P1 : U1n+1 = U1n − k 65U1n − 16U2n − 16U4n − 112 ,

P2 : U2n+1 = U2n − k − 16U1n + 65U2n − 16U3n − 16U5n ,
144 n 
P3 : U3n+1 = U3n − k 545U3n − U ,
5 2 
P4 : U4n+1 = U4n − k − 16U1n + 65U4n − 16U5n − 16U6n − 160 ,
128 n 288 n 
P5 : U5n+1 = U5n − k 273U5n − U − U ,
5 2 11 4
979 n 256 n 
P6 : U6n+1 = U6n − k U − U −9 .
3 6 11 4
These equations will be of positive type if the coefficient of Ujn is non-negative at the point
Pj . The most restrictive condition occurs at P3 where it is required that k ≤ 1/545. The
corresponding limit for a regular grid is k ≤ 1/64 (as, for instance, at Pj , j = 1, 2, 4).
11.34
We build on the solution to the previous exercise. Using a backward difference in time at nodes
Pj , j = 3, 5, 6, leads to

144 n+1 
P3 : U3n+1 + k 545U3n+1 − U = U3n ,
5 2
128 n+1 288 n+1 
P5 : U5n+1 + k 273U5n+1 − U − U = U5n ,
5 2 11 4
979 n+1 256 n+1 
P6 : U6n+1 + k U − U = U6n + 9k.
3 6 11 4
If the computations are organised so that the numerical solution at points on the regular grid
(Pj , j = 1, 2, 4) at time level tn+1 are computed first, then the solution at the remaining points
is given by
1 144 n+1 
P3 : U3n+1 = U3n + U ,
1 + 545k 5 2
1 128 n+1 288 n+1 
P5 : U5n+1 = U5n + U − U ,
1 + 273k 5 2 11 4
3 256 n+1 
P6 : U6n+1 = U6n + U4 + 9k .
3 + 979k 11
Thus the entire set of equations is of explicit type and of positive type for k ≤ h2 /4 = 1/64.

114
Exercises 12 Finite difference methods for hyperbolic PDEs
12.1
Differentiating the PDE ut + aux = 0 with respect to t gives:
utt + autx = 0 ⇒ utt + a∂x ut = 0 ⇒ utt + a∂x (−aux ) = 0
and so utt = a2 uxx . Using this in (12.21) leads to
n n
Rh m
= 21 ah(c − 1)uxx m
+ O(h2 ) + O(k 2 ),
as required.
12.2
n+1 n n
The FTFS scheme Um = (1 + c)Um − cUm+1 is explicit and of positive type for −1 ≤ c < 0 and
is therefore inverse monotone (non-negative initial data leads to non-negative solutions). It will
therefore be stable in the maximum norm if we can find a suitable comparison function. Such a
function is Φnm := 1 + tn .
For ℓ2 -stability we first find the amplification factor: ξ = 1 + c − ceiκh so
|ξ|2 − 1 = (1 + c − c cos θ)2 − 1 + c2 sin2 θ = 2c(1 + c)(1 − cos θ),
where θ = κh ∈ [−π, π]. Since (1 − cos θ) ≥ 0, we shall have |ξ|2 ≤ 1 if, and only if, c(1 + c) ≤ 0,
that is, −1 ≤ c ≤ 1.
12.3
n
The product of the coefficients of Um±1 have opposite sign so it is not possible for both to be
non-negative.
The amplification factor of the scheme is
ξ = 1 − ic sin κh ⇒ |ξ|2 = 1 + c2 sin2 κh
thus ξ( 21 π) = 1 + c2 and it is not possible to find a constant C, independent of h and k such that
|ξ| ≤ 1 + Ck (see Definition 11.20).
12.4
We use the identities △+x = △x + 21 δx2 , △−x = △x − 12 δx2 (see Exercise 6.2) so, when c > 0,
n+1 n n
Um = Um − c△x Um + 21 |c| δx2 Umn n
= Um − c△x Umn
+ 12 c δx2 Um
n

n
= Um n
− c △x U m − 21 δx2 Um n n
= Um − c△−x Um
n

which is the FTBS scheme (12.20). Similarly, when c < 0, |c| = −c and
n+1 n n
Um = Um − c△x Um + 12 |c| δx2 Umn n
= Um − c△x Umn
− 12 c δx2 Um
n

n
= Um n
− c △x U m + 21 δx2 Um n n
= Um − c△+x Um
n

which is the FTFS scheme (12.25).


12.5

(a) The Lax–Friedrichs scheme can be written as4


n n n n
Um = 12 (1 + c)Um−1 + Um + 21 (1 − c)Um−1
so its stencil is the same as that of the Lax-Wendroff method (see Fig. 12.6 (left)).
4 Note n by the average 1 n n
that this can also be deduced from (12.26) by replacing Um 2
(Um−1 + Um+1 ).

115
(b) The local truncation error is (note the scaling), using the results from Table 6.1,
n 
Rh m : = k −1 un+1
m − unm + c△x unm − 12 δx2 unm
 
= ut + 12 kutt + O(k 2 ) + a ux + 61 h2 uxxx + O(h2 ) − 12 (h2 /k)uxx + O(h4 )
= (ut + aux ) + 21 kutt − 12 (h2 /k)uxx + O(k 2 ) + O(h2 ) + O(h4 /k)

so that Rh = O(h) + O(k) if c is fixed—the method is consistent of first order.


(c) We see from part (a) that the coefficients on the right hand side are non-negative for
−1 ≤ c ≤ 1 in whch case the scheme is of positive type.
(d) The amplification factor of the scheme is, writing θ = κh,

ξ = 1 − ic sin θ − 2 sin2 21 θ = cos θ − ic sin θ.

Therefore,
|ξ|2 − 1 = cos2 θ − 1 + c2 sin2 θ = −(1 − c2 ) sin2 θ
and |ξ|2 ≤ 1 for all θ ∈ [−π, π] if, and only if, −1 ≤ c ≤ 1.
(e) The Lax-Friedrichs method has the same order of consistency as the FTBS and FTFS
methods so holds no advantage in that department. One major advantage that is does
hold is that it is stable for |c| ≤ 1 regardless of the sign of the advection speed so that it
can be applied to systems of hyperbolic equations that have both right and left moving
characteristics.
(f) The end product of the calculation in part (b) may be reorganized to give

n h2 
Rh m
= ut + aux − 1
2 (1 + c2 )uxx + O(k 2 ) + O(h2 ) + O(h4 /k)
k
where we have used utt = a2 uxx . Thus the local truncation error is consistent of order
O(k 2 ) + O(h2 ) (provided that c = ak/h is fixed) with the PDE ut + aux = εuxx , where
ε = 21 h2 (1 + c2 )/k.
The scheme is consistent with an advection-diffusion equation which is of parabolic type.
The numerical solutions will therefore become smoother (damped) as time proceeds.

12.6
With a Courant number c = 21 , the Lax-Wendroff method becomes
n n n n
Um = 81 (3Um−1 + 6Um − Um+1 )

and, from the given data, we calculate

m 1 2 3 4
1
Um 1 1.125 .375 0

This is sketched in Fig. 18 as a solid line. The exact solution (shown shaded) moves a distance
ch during each time step so that discontinuity occurs at x = 3h.
12.7
n
We substitute Um = ξ n eiκmh into the Lax-Wendroff method scheme
n+1
Um = [1 − c△x + 12 c2 δx2 ] Um
n

116
1
Um b b
b

x
Figure 18: The solution at time level t = k to Exercise 12.6 by the Lax-Wendroff method (solid
line). The initial function g(x) is shown as a dashed line and the shaded area represents the
exact solution, which will have travelled a distance ch = 12 h in one time step.

n+1 n
and use the relationships Um = ξUm , (11.47b) and (11.47c) to give
n
ξUm n
= Um n
− ic sin(κh)Um − 2c2 sin2 ( 12 κh)Um
n
⇒ ξ = 1 − ic sin κh − 2c2 sin2 12 κh.
Then, writing s = sin2 21 κh
|ξ|2 − 1 = (1 − 2c2 s)2 − 1 + c2 sin2 (κh) = −4c2 s + 4c4 s2 + 4c2 s(1 − s)
= −4c2 s2 (1 − c2 ).
Clearly |ξ|2 − 1 ≤ 0 if c2 ≤ 1.
12.8
Referring to the stencil shown in Fig. 12.2:
FTBS: corresponds to µ = 1, ν = 0 and has, from (12.17), the coefficients
0
Y 0
Y
ℓ+c ℓ+c
α−1 = = c, α0 = =1−c
ℓ+1 ℓ
ℓ=−1 ℓ=−1
ℓ6=−1 ℓ6=0

n+1 n n
and Um = α−1 Um−1 + α0 Um gives the FTBS method (12.20).
Lax-Wendroff method: corresponds to µ = 1, ν = 1 and so
1
Y 1
Y 1
Y
ℓ+c ℓ+c ℓ+c
α−1 = = 21 c(1 + c), α0 = = 1 − c2 , α1 = = 12 c(c − 1)
ℓ+1 ℓ ℓ−1
ℓ=−1 ℓ=−1 ℓ=−1
ℓ6=−1 ℓ6=0 ℓ6=1

n+1 n n n
and Um = α−1 Um−1 + α0 Um + α1 Um+1 gives the Lax-Wendroff method (12.28).
3rd order upwind: corresponds to µ = 2, ν = 1 and so
1
Y 1
Y
ℓ+c ℓ+c
α−2 = = − 61 c(1 − c2 ), α−1 = = 21 c(1 + c)(2 − c),
ℓ+2 ℓ+1
ℓ=−2 ℓ=−2
ℓ6=−2 ℓ6=−1
1
Y 1
Y
ℓ+c ℓ+c
α0 = = 12 (1 − c2 )(2 − c), α1 = = 61 c(c − 1)(2 − c)
ℓ ℓ−1
ℓ=−2 ℓ=−2
ℓ6=0 ℓ6=1

n+1 n n n n
and Um = α−2 Um−2 +α−1 Um−1 +α0 Um +α1 Um+1 gives the 3rd order upwind method (12.33b).
12.9
With µ = 2, ν = 0 the formula (12.17) leads to the coefficients
0
Y 0
Y 0
Y
ℓ+c ℓ+c ℓ+c
α−2 = = − 21 c(1−c), α−1 = = c(2−c), α0 = = 21 (1−c)(2−c)
ℓ+2 ℓ+1 ℓ
ℓ=−2 ℓ=−2 ℓ=−2
ℓ6=−2 ℓ6=−1 ℓ6=0

117
n+1 n n n
Um = α−2 Um−2 + α−1 Um−1 + α0 Um gives the Warming–Beam scheme (12.64).
12.10
n+1
From (12.15) we have Um = Φ(xm − ch) so s = −c and we have
p 
X 
j −c−1 j n
n+1
Um n
= Um + △−x Um .
j=1
j

j−c−1

With p = 1 we find j = −c at j = 1 giving

n+1
Um n
= Um − c△−x Um
n

which is the FTBS scheme (12.20). 


j−c−1
With p = 2 an additional term is added to the right hand side of FTBS. Since j =
− 12 c(1 − c) at j = 2 this leads to
2 n
n+1
Um n
= Um − c△−x Um
n
− 12 c(1 − c) △−x Um
n n n n n n
= Um − c(−Um−1 + Um ) − 21 c(1 − c)(Um−2 − 2Um−1 + Um )
n n n
= − 21 c(1 − c)Um−2 + c(2 − c)Um−1 + 12 (1 − c)(2 − c)Um

which matches the Warming–Beam scheme (12.64).


12.11

(a) The local truncation error of Leith’s method is


n 
Rh m
: = k −1 (un+1
m − unm + c△x Um
n
− (r + 12 c2 )δx2 unm ,
 
= ut + 21 kutt + O(k 2 ) + a ux + 16 h2 uxxx + O(h2 ) − (ε + 21 a2 k) uxx + O(h2 )
 
= ut + aux − εuxx + 12 k(utt − a2 uxx + O(k 2 ) + O(h2 )

and so is consistent of order O(k) + O(h2 ) with the advection-diffusion equation ut + aux =
εuxx.
(b) Differentiating the PDE with respect to t and x gives

utt + auxt = εuxxt


uxt + auxx = εuxxx

so, subtracting a × second from the first equation leads to utt = a2 uxx + ε(uxxt − auxxx)
and, therefore,
n
Rh m = 21 kε(uxxt − auxxx) + O(k 2 ) + O(h2 ).
From the point of view of convergence as h, k → 0 the scheme is clearly consistent of order
O(k) + O(h2 ) with the advection-diffusion equation. However, the factor ε multiplying the
leading term in the local truncation error means that in computations where ε ≪ 1, the
method will, on coarser grids, effectively perform as a second order scheme.
(c) We observe that the amplification factor for Leith’s scheme

ξ = 1 − 4(r + 21 c2 ) sin2 ( 21 κh) + i ρ sin (κh)

118
is the same as the FTCS scheme (11.53) with r replaced by (r + 21 c2 ) and ρ replaced by
−c = −ak/h. The stability conditions (11.56) become
1 2
2c ≤ r + 12 c2 ≤ 21 ,

so the left inequality is always satisfied leaving 2r + c2 ≤ 1. Written in terms of h and k,


this requires
2εk + a2 k 2 ≤ h2 .
If both sides are multiplied by a2 /ε2 we find

ka2 ka2 2 ah 2
2 + ≤ ⇒ 2b
k+b
k2 ≤ b
h2 ,
ε ε ε
where the stability region is independent of any parameters when expressed in terms of
b
k := ka2 /ε and b
h := ha/ε (known as non-dimensional variables because their values are
independent of the units used to measure k, h, a and ε). Thus, in the b h-b
k plane the
boundary is a branch of the hyperbola

(1 + b
k)2 − b
h2 = 1

whose centre is at b k = −1, bh = 0 and has asymptotes b k = −1 ± bh. The region bounded
b
by this curve and the h-axis is shown shaded in Fig. 19 but the scales shown on the axes
are for the grid sizes h and k. Also shown for reference is the curve is k = εh2 /2 (dashed),
which is the corresponding stability limit for the FTCS approximation of the heat equation
ut = εuxx. We can see that this is the relevant limit when ε/a is large (when we should
focus on the stability region near the origin where h and k are small). On the other hand,
when ε/a is small—the advection dominated case—we enjoy a limit which is approximately
that for the FTCS approximation of the advection equation ut + aux = 0, i.e., k ≤ ah.

k
2ε/a2

ε/a2 ℓ2 stability region


Figure 19: The ℓ2 -stability region for Leith’s method.
The dashed curve shows k = εh2 /2 and the dashed
ε/a 2ε/a 3ε/a h line the asymptote k = (ah − ε)/a2 .

12.12
The LTE of the leapfrog scheme (12.31) is
n 
Rh m
: = k −1 un+1
m − um n−1
+ c(unm+1 − unm−1 ) = k −1 △t unm − ah−1 △x unm
 
= ut + 16 k 2 uttt + O(k 4 ) + a ux + 16 h2 uxxx + O(h4 )
 
= ut + aux + 61 k 2 uttt + 61 h2 uxxx + O(k 4 ) + O(h4 )

where we have used the expansion for △u from Table 6.1.


n
When Um = ξ n eiκmh we have △x Um
n n
= i sin(κh)Um (see (11.47c)) and

n n+1 n−1 1 n
△t U m = 12 (Um − Um ) = 12 (ξ − )Um
ξ

119
and so the amplification factor ξ satisfies
1
ξ− + 2ic sin(κh) = 0 ⇒ ξ 2 + 2icξ sin(κh) − 1 = 0.
ξ
Using the familiar “quadratic formula”, the roots are (writing θ = κh)
p
ξ = −ic sin θ ± 1 − c2 sin2 θ.
Case (a) c2 > 1. In this case there are values of θ such that 1 − c2 sin2 θ < 0 so that both roots are
imaginary. Their product is −1 so one must have a modulus exceeding 1 and the method
is unstable in this case.
Case(b) c2 ≤ 1. Now 1 − c2 sin2 θ ≥ 0 for all θ and
p
ℜξ = ± 1 − c2 sin2 θ, ℑξ = −c sin θ
so that
|ξ|2 = (ℜξ)2 + (ℑξ)2 = (1 − c2 sin2 θ) + (c sin θ)2 = 1
and the method is stable

12.13

(a) We evaluate the coefficients supplied in (12.33a) at the Courant numbers c = −1, 0, 1, 2
and display the results in the following table.

Coeffs. α−2 α−1 α0 α1


c − 61 c(1 − c2 ) 1
2 c(1 + c)(2 − c) 1
2 (1 − c2 )(2 − c) 1
6 c(c − 1)(2 − c)
2 1 0 0 0
1 0 1 0 0
0 0 0 1 0
−1 0 0 0 1
n+1 n
and so Um = Um−c for c = −1, 0, 1, 2.
(b) Using (12.33a), the LTE is given by
n 
Rh m
: = k −1 un+1
m − unm + c△x unm − 12 c2 δx2 unm − 16 c(1 − c2 )△−x δx2 unm
The expansion of all terms except the last on the right hand side are available in Table 6.1.
For the final term we proceed as follows (many other routes to the same destination are
possible): Since △−x vm n
= hvx − 21 h2 vxx + O(h3 ) (Table 6.1) then, with v = δx2 unm =
2 4
h uxx + O(h ),

△−x δx2 unm = h∂x h2 uxx + O(h4 ) + O(h4 ) = h3 uxxx − h4 uxxxx + O(h5 ).
Now
n
Rh m
= ut + 12 kutt + 61 k 2 uttt + 1 3
24 k utttt + O(k 4 )
1 2 4

+ a ux + 6 h uxxx + O(h )

− 12 ka2 uxx + 1 2
12 h uxxxx + O(h )
4

− 61 a(1 − c2 ) h2 uxxx − h3 uxxxx + O(h4 )

120
so that
n  
Rh m
= ut + aux + 21 k utt − a2 uxx + 16 k 2 uttt + a2 uxxx
1 3

+ 24 k utttt + a2 uxxxx + 24 1 4 3
a h (1 + c)(1 − c)(2 − c)uxxxx + O(h4 ).

But ∂tj u = (−a∂x )j u so that this reduces to


n 1 4 3
Rh m
= 24 a h (1 + c)(1 − c)(2 − c)uxxxx + O(h4 ).

Notice how the leading coefficient vanishes at c = −1, 1, 2 (as do all subsequent coefficients
in deference to part (a)).
(c) The CFL condition follows immediately from Example 12.3.
n
(d) We substitute Um = ξ n eiκmh into the finite difference scheme and use the relationships
n+1 n − n
Um = ξUm , △x Um = (1 − e−iκh , (11.47b) and (11.47c) to give

ξ = 1 − ic sin θ − 2c2 sin2 12 θ − 23 c(1 − c2 )(1 − e−iθ ) sin2 21 θ,

where θ = κh. We now write s = sin2 21 θ and then 1−e−iθ = (1−cos θ)+i sin θ = 2s+i sin θ
so that, collecting real and imaginary parts

ξ = 1 − 2c2 s − 43 c(1 − c2 )s2 − ic 1 + 23 c(1 − c2 )s sin θ.

Therefore, since sin2 θ = 4s(1 − s) and defining A = 2


3 c(1 − c2 )s in order to lighten the
complexity,

ξ = 1 − 2c2 s − 2As − i(A + c) sin θ.


2
|ξ|2 − 1 = 1 − 2s(A + c2 ) − 1 + 4(A + c)2 s(1 − s)
= −4s(A + c2 ) + 4s2 (A + c2 )2 + 4(A + c)2 s − 4(A + c)2 s2
 
= −4s (A + c2 ) − (A + c)2 + 4s2 (A + c2 )2 − (A + c2 )2
= −4sA(1 − 2c − A) + 4s2 (c2 − c)(c2 + c + 2A)
= −4sA(1 − 2c − A) −4s2 c2 (1 − c2 ) −8s2 Ac(1 − c)
| {z }
−6scA
 
= −4sA(1 − 1
2c |
−A + 2sc(1 − c)) = − 38 c(1 − c2 )(2 − c)s2 1 + 23 sc(1 − c) .
{z }
2
3 sc(1−c)(c−2)

(e) For ℓ2 -stability it is necessary to have |ξ|2 − 1 ≤ 0. Since F (s) := (|ξ|2 − 1)/s2 is linear in
s and, in order for it to be non-positive for 0 ≤ s ≤ 1, it must be non-positive at s = 0 and
s = 1. Now

F (0) = − 38 c(1 − c2 )(2 − c) ≤ 0 ⇒ c ∈ [−1, − 21 ] ∪ [0, 1] ∪ [ 23 , 2]


F (1) = − 98 c(1 − c2 )(2 − c)(1 + 2c)(3 − 2c) ⇒ c ∈ (−∞, −1] ∪ [0, 1] ∪ [2, ∞)

and the only interval held in common is c ∈ [0, 1].

121
12.14
It is more efficient to base the Taylor expansions about the point x = mh, t = nk + k:
n+1 n+1
unm = um
n+1
− kut m
+ 12 k 2 uxx m + O(k 3 )
n+1 n+1
so that un+1
m = unm + kut m − 21 k 2 uxx m + O(k 3 ).
n+1 n+1
Then, using the expansion △−x un+1
m = hux m
− 21 h2 uxx m
+ O(h3 ) (see Table 6.1), The local
truncation error is found to be
n 
Rh m
: = k −1 un+1
m − unm + c△−x un+1
m
 
= ut − 12 kutt + O(k 2 ) + a ux − 21 h2 uxx + O(h3 )

but, utt = −auxt and auxx = −uxt so that


n  n+1 n+1
Rh m = ut + aux m + 12 h(1 + c)uxx m
+ O(h2 ) + O(k 2 ),

as required.
12.15
The mth component of Cvj is
  
Cvj m = −c vj m−1 + (1 + c) vj m = −ce2πi(m−1)j/M + (1 + c)e2πim j/M

= 1 + c − ce−2πi j/M vj m .
 
this holds for all m = 1, 2, . . . , M (at M = 1 we need to recognise that vj M = vj M−1 because
of the periodic nature of its components). Thus Cvj = λj vj , where λj = 1 + c − ce−2πi j/M .
Comparing this with the amplification factor ξ(κh) given by (12.36), it is seen that

λj = 1/ξ(2πjh)

corresponding to the wavenumber κ = 2πj. This result generalises readily to all constant co-
efficient finite difference approximations of parabolic and hyperbolic PDEs with periodic BCs
because all circulant matrices of a given dimension share the same set of eigenvectors.
12.16
Replacing △−x by △+x in (12.34a) leads to the BTFS scheme
n+1
Um n
= Um − c△+x Um
n+1
⇒ n+1
(1 − c)Um n+1
+ c Um−1 n
= Um .

The local truncation error is given by


1 n+1 
Rnm = um − unm + c△+x un+1
m
k
n+1 n+1
= (ut + aux )|m − 21 (kutt − ahuxx )|m + O(k 2 ) + O(h2 )
= 21 h(1 − c) uxt |n+1
m + O(h2 ) + O(k 2 ).

There are no CFL restrictions when this scheme is used with periodic BCs for the same reasons
as for the BTBS scheme. With non-periodic BCs the BTFS scheme can be operated in two
explicit modes, from left to right on each time level, that is,
n+1 n n+1
Um+1 = (Um − (1 − c)Um )/c, m = . . . , 1, 2, 3, . . . .

122
n+1
This is illustrated in Fig. 20 (left) where the target point (Um+1 ) is denoted by ◦. The CFL
condition requires characteristics to lie in the shaded region—that is, c ≥ 1. The second mode
applies the scheme from right to left on each time level, that is,
n+1 n n+1
Um = (Um − c Um+1 )/(1 − c), m = . . . , 3, 2, 1, . . .
(see Fig. 20, right). The characteristics will lie in the shaded region as required by the CFL
condition if c ≤ 0.
The amplification factor for the scheme is given by ξ(θ) = 1/(1 − c + ceiθ ) so that (using half-
angle formulae for cos θ and sin θ)
1
|ξ|2 =
(1 − c + c cos θ)2 + c2 sin2 θ
1
= .
1 − 4c(1 − c) sin2 21 θ
Thus |ξ|2 ≤ 1 if the denominator satisfies 1 − 4c(1 − c) sin2 12 θ ≥ 1 for all θ. This will be the case
if either c ≤ 0 or c ≥ 1. These conditions coincide with the CFL conditions.

→ ← Figure 20: The two modes of operation of the


b bc bc b
BTFS scheme with target points (◦). Both are
b b stable provided that the characteristics lie in the
shaded regions.

There is no CFL limit for the BTFS scheme for the same reason is c ≥ 1. Its ℓ2 stability
conditions can be deduced from the corresponding condition for the BTBS
12.17

From (12.22) and Exercise 12.16 we find, respectively,


1 1
ξF (θ) = 1 − c + ce−iθ and ξB (θ) = iθ
= ∗
1 − c + ce ξF (θ)
(where ξF∗ (θ) is the complex conjugate of ξF (θ)) so that ξF∗ (θ)ξB (θ) = 1.
Since |ξF (θ)| |ξB (θ)| = 1 it follows that if |ξF (θ)| < 1 (the FTBS scheme is stable) for some scaled
wavenumber θ, then |ξB (θ)| > 1 (the BTFS scheme is unstable) at that wavenumber, and vice
versa. Their stability regions are therefore complements of each other. Since the FTBS scheme
is stable for 0 ≤ c ≤ 1 we deduce that the BTFS scheme is stable for c ≥ 1 and c ≤ 0.
12.18
The box scheme (12.38) involves four terms and each has to be expanded in Taylor series as a
function of two variables up to, and including, third derivatives. Since each expansion contains
10 terms, a total of 40 terms is involved. The high order of consistency is only possible because
of the cancellation that occurs when these expansions are combined. This is a consequence of
the high degree of symmetry/anti-symmetry in the formula and this has to be exploited in order
to avoid unnecessary algebraic complexity. This suggests that all expansions should be based on
the “centre” of the stencil which is X = (m − 12 )h, T = (n + 12 )k. Then, using ut = −aux we
have ∂tj u = (−a∂x )j u and we find
un+1
m = u + 21 (k∂t + h∂x )u + 18 (k∂t + h∂x )2 u +
1 3 4
48 (k∂t + h∂x ) u + O(h )
2 3
=u+ 1 1 1
2 (−ak∂x + h∂x )u + 8 (−ak∂x + h∂x ) u + 48 (−ak∂x + h∂x ) u + O(h4 )
1 1 2 2 1 3 3 4
=u+ 2 ah(1 − c)ux + 8 h (1 − c) uxx + 48 h (1 − c) uxxx + O(h ),

123
where we have assumed that c = ak/h is fixed, so that k = O(h) and the remainder terms can
then be expressed as O(h4 ). Treating the other terms in a similar fashion we find

un+1
m = u + 21 h(1 − c)ux + 18 h2 (1 − c)2 uxx + 1
48 (1 − c)3 uxxx + O(h4 ),
unm−1 = u − 12 h(1 − c)ux + 18 h2 (1 − c)2 uxx − 1
48 (1 − c)3 uxxx + O(h4 ),
un+1 1 1 2 2
m−1 = u − 2 h(1 + c)ux + 8 h (1 + c) uxx −
1
48 (1 + c)3 uxxx + O(h4 ),
unm = u + 12 h(1 + c)ux + 81 h2 (1 + c)2 uxx + 1
48 (1 + c)3 uxxx + O(h4 ).

Subtracting the second from the first and the fourth from the third then gives

un+1
m − unm−1 = (1 − c)hux + 1
24 (1 − c)3 h3 uxxx + O(h5 ),
un+1 n
m−1 − um = −(1 + c)hux −
1
24 (1 + c)3 h3 uxxx + O(h5 ).

The LTE may be expressed as (see (12.38))


   
Rh (X, T ) : = k −1 (1 + c) un+1
m − unm−1 + (1 − c) un+1m−1 − um
n
  
= k −1 (1 + c) (1 − c)hux + 24 1
(1 − c)3 h3 uxxx + O(h5 )
 
1
− (1 − c) (1 + c)hux + 24 (1 + c)3 h3 uxxx + O(h5 )
1 −1 3
= 24 k h (1 − c2 )[(1 − c)2 − (1 + c)2 ]uxxx + O(h4 ) = − 61 ah2 (1 − c2 )uxxx + O(h4 ),

where uxxx is evaluated at (X, T ). This point could be changed to any of the four points in the
stencil (for instance) without changing the leading term (but the O(h4 ) would drop to O(h3 )).
12.19
With η = (1 − c) + (1 + c)e−iκh , then

η ∗ = (1 − c) + (1 + c)eiκh = (1 − c)e−iκh + (1 + c) eiκh

so that (12.39) becomes ξ = e−iκh η/η ∗ . It follows that |ξ| = 1 (for all c) since |η| = |η ∗ | and
|e−iκh | = 1.
12.20
The discriminant of the quadratic polynomial (12.44) is −16c2s2 (1 − c2 s2 ), where s = sin 12 κh.
(i) When c2 ≤ 1 the discriminant is non-positive and the roots are
p
ξ = (1 − 2c2 s2 ) ± 2isc (1 − c2 s2 )

which form a complex conjugate pair ξ1 , ξ1∗ say. The product of roots, |ξ1 |2 = 1 (the
constant term in (12.44)) but it can also be verified from the formula given above for the
roots.
(ii) When c2 ≥ 1 there will be wavenumbers κ for which c2 s2 > 1 and the discriminant is
positive. The roots, ξ1 , ξ2 say, are real and distinct in such situations and, their product
being ξ1 ξ2 = 1, one root must have a magnitude greater than 1, so the scheme is unstable.

12.21
The amplification factor of the method (12.5) is
ν
X
ξ= αj eijκh
j=−µ

124
and its LTE is
ν
X
n 
Rh m
:= k −1 un+1
m − αj unm+j .
j=−µ

The solution of the advection equalion ut + aux = 0 with initial condition u(x, 0) = exp(iκx) is
u(x, t) = exp(iκ(x − at) so the LTE becomes
ν
X
n 
Rh m
= k −1 eiκ(xm −a(n+1)k) − αj eiκ(xm+j −ank)
j=−µ
 ν
X   
= k −1 e−aiκk − αj eijκh eiκ(xm −ank) = k −1 e−ciθ − ξ(θ) unm ,
j=−µ

where θ = κh. This shows that equation (12.50) holds more generally than just for the Lax-
Wendroff method.
Now hp+1 ∂xp+1 u = (iκh)p+1 u = (iθ)p+1 u with a similar expression for hp+2 ∂xp+2 u and the given
error expansion gives
n
kRh m
= Cp+1 (iθ)p+1 u + Cp+2 (iθ)p+2 u + O(hp+3 )

and, using (12.50), we obtain

ξ(θ) = e−icθ − Cp+1 (iθ)p+1 − Cp+2 (iθ)p+2 u + O(hp+3 )

showing that the amplification factor is an order (p + 1) approximation of e−icθ .

(a) p is odd: then (iθ)p+1 is real and (iθ)p+2 is imaginary. In fact, supposing that p = 2q − 1
(where q is a positive integer),

(iθ)p+1 = i2q θp+1 = (−1)q θp+1 = (−1)(p+1)/2 θp+1

and (iθ)p+2 = (−1)(p+1)/2 iθp+2 . Hence


 
ξ(θ) = cos cθ − (−1)(p+1)/2 Cp+1 θp+1 − i sin cθ + (−1)(p+1)/2 iθp+2 + O(θp+3 )

leading to
2 2
|ξ(θ)|2 = cos cθ − (−1)(p+1)/2 Cp+1 θp+1 + sin cθ + (−1)(p+1)/2 Cp+2 θp+2 + O(θp+3 )
= cos2 cθ + sin2 cθ − 2(−1)(p+1)/2 Cp+1 θp+1 cos cθ + O(θp+3 )
= 1 − 2(−1)(p+1)/2 Cp+1 θp+1 + O(θp+3 ),

where we have used θp+1 cos cθ = θp+1 + O(θp+3 ) and θp+2 sin cθ = O(θp+3 ).
(b) p is even: then (iθ)p+1 is imaginary and (iθ)p+2 is real. In fact, supposing that p = 2q
(where q is a positive integer),

(iθ)p+1 = i(i2q )θp+1 = (−1)q iθp+1 = (−1)p/2 iθp+1

and (iθ)p+2 = (−1)p/2+1 θp+2 . Hence


 
ξ(θ) = cos cθ − (−1)p/2+1 Cp+2 θp+2 − i sin cθ + (−1)p/2 Cp+1 θp+1 + O(θp+3 )

125
leading to
2 2
|ξ(θ)|2 = cos cθ − (−1)p/2+1 Cp+2 θp+2 + sin cθ + (−1)p/2 Cp+1 θp+1 + O(θp+3 )
= cos2 cθ + sin2 cθ − 2(−1)p/2+1 Cp+2 θp+2 cos cθ + 2(−1)p/2 Cp+1 θp+1 sin cθ + O(θp+3 )
= 1 − 2(−1)p/2+1 Cp+2 θp+2 + 2(−1)p/2 Cp+1 θp+2 + O(θp+3 )
= 1 − 2(−1)p/2+1 (cCp+1 + Cp+2 )θp+2 + O(θp+3 ),

where we have used θp+2 cos cθ = θp+2 + O(θp+4 ) and θp+1 sin cθ = cθp+2 + O(θp+4 ).

The bottom line is that for a method whose order of consistency p (odd), the order of dissipation
is (p + 1) but, if the order of consistency p (even), the order of dissipation is (p + 2).
12.22
We do not give a solution since this would depend on the specific computer algebra package used.
12.23
When c > 0, characteristics travel from left-to-right (see Fig. 21, left) and the domain of depen-
dence of the anchor point (shown as ◦) is shaded. The method must be used as
n+1 n n+1
Um = (Um + c Um−1 )/(1 + c), m = 1, 2, . . . , M

so the BC must be placed at x = 0.


The corresponding situation when c ≤ −1 is shown in Fig. 21 (right) and the BC needs to be at
x = 1.

→ ← Figure 21: The two modes of operation of the


b bc bc b
BTBS scheme in Exercise 12.23 with target
b b points (◦). Both modes are stable provided that
the characteristics lie in the shaded regions.

12.24
The situation is depicted in Fig. 22. The artificial BC implies
n n
(UM − UM−1 ) (U n n
− UM )
δx2 UM
n
=0 ⇒ n
(UM n
− UM−1 n
) = (UM+1 n
− UM ) ⇒ = M+1
h h
n n
so that the gradient of the line joining (xM−1 , UM−1 ) to (xM , UM ) is equal to that of the line
n n n
joining (xM , UM ) to (xM+1 , UM+1 ). The points (xm , Um ) (m = M − 1, M, M + 1) are therefore
collinear.

Figure 22: The application of the Lax-Wendroff method at a


bc
point (M h, nk) on the boundary x = 1 involves a grid point
b b × t = nk (marked ×) outside the domain.

x=1

With δx2 UM
n
= 0 and the identity △−x = △x − 21 δx2 , the Lax-Wendroff method at x = xM becomes
n+1
UM = [1 − c△x + 12 c2 δx2 ] UM
n n
= [1 − c△−x ]UM ,

which is the FTBS approximation (12.20) of the advection equation.

126
12.25
The Lax-Wendroff method is applied at the points (xm , nk), 0 < m < M , n ≥ 0. At these points
the LTE Rnm = 0 because the exact solution is a quadratic polynomial and the expression for
the LTE involves the 3rd derivatives of u (see (12.30)). So
1 n+1 
Rnm = um − unm + c△x unm − 21 c2 δx2 unm = 0,
k  n
n+1
Um = 1 − c△x + 12 c2 δx2 Um ,

and so the global error E = u − U itself is a solution of the Lax-Wendroff scheme:


n+1
 n
Em = 1 − c△x + 12 c2 δx2 Em
n
= 21 c(1 + c)Em−1 + (1 − c2 )Em
n n
+ 21 c(c − 1)Em+1
0
with starting condition Em = 0 and a homogeneous BC E0n = 0 at x = 0. Thus, by a domain of
n
dependence argument, Em = 0 for xm + tn ≤ 1.
The LTE of the FTBS scheme (see (12.21)) at x = 1 is, for u(x, t) = (x − t)2 and a = 1,

RnM = k −1 un+1 n n
M − cuM−1 − (1 − c)uM = −h(1 − c)

and so
n+1 n n
EM = cEM−1 − (1 − c)EM − hk(1 − c)
for n = 0, 1, 2, . . ..
n
Assuming now that Em → Am as n → ∞, the Lax-Wendroff equations reduce to

(1 + c)Am−1 − 2cAm + (c − 1)Am+1 = 0,

Setting
 1−M
1 2 2 1+c c+1
C= 2 (1 − c) h − , ρ=
1−c c−1
then the proposed solution is Am = Cρm . Substituting, we find,
1+c 
(1 + c)Am−1 − 2cAm + (c− 1)Am+1 = Cρm − 2c+ (c− 1)ρ = Cρm ((c− 1)− 2c+ (c+ 1)) = 0
ρ
so these equations are satisfied.
n
When Em → Am as n → ∞, the FTBS equations reduce to AM − AM−1 = −h2 (1 − c).
Substituting the putative solution into the left hand side of this, we find
2
AM − AM−1 = CρM−1 (ρ − 1) = CρM−1 = −h2 (1 − c)
c−1
as required.
12.26
The equations can be written as a first order system
 
2 1
ut + Aux = 0, A= , (4)
1 2

where u = [u, v]T . The matrix A has eigenvalues λ = 1, 3 which are the characteristic speeds.

127
n+1 n n
The FTCS method for systems is Um = ρAUm−1 + (I − ρA)Um , where ρ = k/h. This is stable
for λρ ≤ 1 and so the largest mesh ratio for which the solution is stable is k ≤ h/3.
At x = 5h = 0.5 we have m = 5 and U40 = [.4, .16]T , U50 = [.5, .25]T so, with ρ = 41 , the solution
at (5h, k) is
       
1 1 0 1 0 1 2 1 .4 1 2 −1 .5 .4275
U5 = 4 AU4 + (I − 4 A)U5 = 4 +4 = .
1 2 .16 −1 2 .25 .1800

12.27
The FTCS method is stable only for positive eigenvalues and the FTBS method is stable only
for negative eigenvalues but the matix A has eigenvalues ±a of both signs.
(a) Applying the FTBS method to (12.66a) and the FTBS method to (12.66b) leads to
n+1
(Um n
− Vmn+1 ) = (Um − Vmn ) − c△−x (Um
n n
− Vmn ) = c(Um−1 n
− Vm−1 n
) + (1 − c)(Um − Vmn )
n+1
(Um + Vmn+1 ) = (Um
n
+ Vmn ) + c△+x (Um
n
+ Vmn ) = (1 − c)(Um
n
+ Vmn ) + c(Um+1
n n
+ Vm+1 )

so, by adding and subtracting, we find


n+1 n n n n n
Um = (1 − c)Um + 21 c(Um−1 − Vm−1 ) + 21 c(Um+1 + Vm+1 )
= (1 + 12 cδx2 )Um
n
+ c△x Vmn
Vmn+1 = (1 − c)Vmn − c(Um−1
n n
− Vm−1 n
) + c(Um+1 n
+ Vm+1 )
= (1 + 12 cδx2 )Vmn + c△x Um
n
" #
n+1 1 2 n n
(1 + 21 cδx2 ) c△x n
Um = (1 + 2 cδx )Um − (k/h)A△x Um = Um .
c△x (1 + 12 cδx2 )
   
0 −a 1 1
(b) With A = the matrix of eigenvectors is V = and Λ = diag(−a, a).
−a 0 1 −1
Therefore |Λ| = |a|I (where I is the 2 × 2 identity matrix) and so |A| = V |Λ|V −1 =
|a|V V −1 = |a|I. The method now reads
n+1 n 1
Um = Um − (k/h)A△x Um + 21 |c| δx2 Um
n

which is identical to the method in part (a) provided a > 0.


(c) Following the steps in Example 12.18 the Lax–Friedrichs scheme is found to be
n+1
Um = [I − (k/h)A△x + 21 δx2 ]Um
n
,

which is identical to the method in part (b) when |c| = 1.

12.28
At the boundary x = 0 the outward characteristic equation is (12.66b): (u + v)t − a(u + v)x = 0.
Approximating this with the FTFS scheme (12.25) at m = 0
(U0n+1 + V0n+1 ) = (1 − c)(U0n + V0n ) + c(U1n + V1n ), c = ak/h,

where we have accounted for the fact that the advection speed is −a. But the BC specifies
u(0, t) = 0 so this reduces to
V0n+1 = (1 − c)V0n + c(U1n + V1n ).

128
12.29
Consider the critical factor in the final term on the right hand side of (12.77)

△−x ϕnm △+x Umn
= ϕnm △+x Um
n
− ϕnm−1 △+x Um−1
n

but △+x Um−1


n
= △−x Um
n
so that this becomes

△−x ϕnm △+x Um
n
= ϕnm △+x Um
n
− ϕnm−1 △−x Um
n

ϕ n 
= ( nm − ϕnm−1 △−x Um n
,
ρm

where ρnm = △−x Um


n
/△+x Um
n
, and the result follows.
12.30
When ϕ(ρ) = 1 it is immediate that (12.77) reduces to the Lax-Wendroff method (12.28).
When ϕ(ρ) = ρ
ϕnm △+x Um
n
= ρnm △+x Um
n
= △−x Um
n

and so (12.77) becomes


n+1 n n
Um = Um − c△−x Um − 12 c(1 − c)(△−x )2 Um
n
,
which, by Exercise 12.10, is the Warming-Beam method.
12.31
The minmod limiter is a special case of the Chakravarthy–Osher limiter.

ϕ(ρ) Superbee
2

ψ Chakravarthy–Osher

0
0 1 2 3 ρ

Figure 23: The flux limiters for Exercise 12.31.

Chakravarthy–Osher:
ρ≤0: max{0, min(ρ, ψ)} = max{0, ρ} = 0
0<ρ≤ψ: max{0, min(ρ, ψ)} = max{0, ρ} = ρ
ρ>ψ: max{0, min(ρ, ψ)} = max{0, ψ} = ψ.
Superbee:
ρ≤0: max{0, min(2ρ, 1), min(ρ, 2)} = max{0, ρ)} = 0
1
0<ρ≤ 2 : max{0, min(2ρ, 1), min(ρ, 2)} = max{0, 2ρ, ρ} = 2ρ
1
2<ρ≤1: max{0, min(2ρ, 1), min(ρ, 2)} = max{0, 1, ρ} = 1
1<ρ≤2: max{0, min(2ρ, 1), min(ρ, 2)} = max{0, 1, ρ} = ρ
ρ>2: max{0, min(2ρ, 1), min(ρ, 2)} = max{0, 1, 2} = 2.

129
12.32
First, since ut = −f (u)x

utt = −(f (u)x )t = −(f (u)t )x = −(f ′ (u)ut )x = (f ′ (u)f (u))x .


n
n
(a) When f (u) = au we have U m = Um − c△+x Um
n
, where c = ak/h. Hence
n n
n+1
Um n
= 12 (U m + Um ) − 21 c△−x U m ,
n
= Um − 21 c△+x Um
n
− 12 c△−x (Um
n
− c△+x Um
n
)
n n
= Um − c△x Um n
− 12 c2 δx2 Um

since 21 (△−x + △+x ) = △x and △−x △+x = δx2 (Exercise 6.2), which is the Lax-Wendroff method
(12.28).
(b) The LTE is, with unm = unm − (k/h)△+x f (unm ),

n+1
Rnm = k −1 um − 12 (unm + unm ) + 12 (k/h)△−x f (unm )

Since f (unm ) = f (unm ) − (k/h)△+x f (unm )f ′ (unm ) + O(h2 ) we find



Rnm = k −1 (un+1
m − unm ) − h−1 △+x f (unm ) + 21 h−1 △−x f (unm ) − (k/h)△+x f (unm )f ′ (unm ) + O(h2 )

= k −1 (un+1
m − unm ) − h−1 △x f (unm ) − 12 kh−2 △−x △+x f (unm )f ′ (unm ) + O(h2 )
n n
= (ut + f (u)x ) m
+ 12 k utt − (f (u)f ′ (u))x m
+ O(k 2 ) + O(h2 )

and so Rh = O(k 2 ) + O(h2 ).


In practice the operators △−x and △+x are interchanged on alternate time steps to give a more
symmetrical approach.

130
Exercises 13 Projects
These solutions are available only to instructors.
13.1
From Section 7.2 we have
Z 1 Z 1  2
d ∂u d
u2 dx = −2 dx ⇒ ku(·, t)k2 = −kux (·, t)k2
dt 0 0 ∂x dt

and, integrating over (0, t), we obtain


Z t
ku(·, t)k2 − ku(·, 0)k2 = − kux (·, s)k2 ds. (13.1a)
0

Differentiating under the integral sign, and then integrating by parts,


Z 1 Z 1 Z 1
d  1
(ux )2 dx = 2 ux uxt dx = 2uxut 0 − 2 uxx ut dx
dt 0 0 0
Z 1
d
kux (·, t)k2 = −2 (ut )2 dx = −2kut(·, t)k2 . (13.1b)
dt 0

We now integrate this over the interval s < t < τ :


Z τ
2 2
kux (·, τ )k − kux (·, s)k = −2 kut (·, t)k2 dt.
s

Thus kux (·, τ )k2 ≤ kux (·, s)k2 and integrating both sides over the interval 0 < s < τ :
Z τ
2
τ kux (·, τ )k ≤ kux (·, s)k2 ds ≤ ku(·, 0)k2
0

by (13.1a) and the result follows.


This result was suggested by “A short survey of parabolic Galerkin methods” by T. F. Dupont
(in “The Mathematical Basis of Finite Element Methods”, Ed. D. F. Griffiths, Clarendon Press,
1984, pages28–40). Although no details are given, this result is an instance of the more general
case
k∂xn u(·, τ )k ≤ Cτ −n/2 ku(·, 0)k, n = 1, 2, . . . ,
where C is a positive constant. The higher the derivative, the more rapidly it decays with time.
13.2
(5)
It is easily shown that Lh = Mh Lh with Lh := h−2 δ 2 . The LTE of the finite difference method
(5)
Lh U = f is
(5) (5) (5)
Rh := Lh u − f = Lh (u − U ) = Lh E
so that Mh Lh E = Rh . Hence, V := Lh E satisfies Mh V = Rh .
1
The operators Mh Um = 12 (−Um−1 + 14Um − Um+1 ) and Lh are of positive type (Definition 6.9).
Comparison functions are Mh Ψm = 1 for Ψ = 1 and Lh Φm = 1 for Φm = 12 xm (1 − xm ) (since
E0 = EM = 0 it is sufficient that Φ0 ≥ 0 and ΦM ≥ 0). Both operators are therefore inverse
monotone when accompanied by Dirichlet boundary conditions (Theorem 6.10). They are also
both stable (Lemma 6.8). Hence, |V • | and |E • | are both O(h4 ). (Theorem 6.7)

131
We now consider the solution of Mh V ∗ = R∗h under the assumption made in the question. Thus
V satisfies Mh V1 = V1 = R1 (shorthand for R∗h 1 ) and Mh Vm = 0 for m > 1. Substituting the
proposed solution Vm∗ = R1 z m−1 into the difference equation gives
1  1
Mh Vm = − Vm−1 + 14Vm − Vm+1 = − R1 (z 2 − 14z + 1)z m−1 = 0
12 12
2
if z is
√ a root of z − 14z + 1. In order for Vm → 0 as m → ∞ we need to choose the smaller root
z = 50 − 7.
With Em ∗
= A + Bm + Cz m we find

Lh Em = Lh (A + Bm) + Lh (Cz m ) = CLh zm = Ch−2 (z 2 − 2z + 1)zm−1 = 12Ch−2 zm
∗ 1 2
so that Lh Em = Vm∗ for m ≥ 2 if C = 12 h R1 and Em∗
→ 0 as m → ∞ if A = B = 0. Finally,
∗ ∗ ∗ ∗ 2
Lh E1 = V1 if 2E1 − E2 = h R1 which gives


0, m=0
∗ 1 2 1 2
Em = 2 h R1 (1 − 12 z ), m = 1

1 2 m
12 h R1 z , m≥2

and so E ∗ = O(h4 ) since R1 = O(h2 ). √


The other striking feature concerning E ∗ is its rapid decay to zero: z = 50 − 7 ≈ 0.07,
z 2 ≈ 0.005, z 3 ≈ 0.0004, z 4 ≈ 0.00003. Thus the less accurate approximations at at m = 1, M −1
do not reduce the 4th order rate of convergence and their effect is negligible for grid points
located more than a distance 5h or 6h from the boundaries. The small value of z also shows that
assumption made regarding the interaction between the effects of R1 and RM−1 is justified.
13.3

e−ax/ε − eah/ε e−ax/ε − e−ah/ε


v(x) = , w(x) = .
1 − eah/ε 1 − e−ah/ε
Z h Z 0 Z h
g(x) dx = v(x) dx + w(x) dx
−h −h 0
and, by making the change of variable t = x + h in the first integral, the resulting cancellations
Rh
give −h g(x) dx = h. The graph of g(x) is shown in Fig. 24 for Peh = 5 (solid) and Peh = 10
(dashed), where the mesh Peclet number Peh = ah/(2ε). After some simplification we find
ePeh e−Peh
v ′ (−h) = h−1 Peh , v ′ (0) = h−1 Peh
sinh Peh sinh Peh
ePeh e−Peh
w′ (0) = −h−1 Peh , w′ (h)= −h−1 Peh
sinh Peh sinh Peh

v(x) w(x)

−h h x

Figure 24: The function g(x) when ah = 10ε (solid) and ah = 20ε (dashed).

132
which lead to
Z xm+1
1 Peh

− 12 a e um−1 − 2 cosh(Peh )um + e −Peh
um+1 = h g(x)f (x) dx. (*)
sinh Peh xm−1

Equation (13.3a) follows from the identities

e±Peh = 12 (ePeh + e−Peh ) ± 21 (ePeh − e−Peh )


= cosh Peh ± sinh Peh .

The required limits are:


Peh
lim ε̂ = lim ε cosh Peh = ε,
h→0 Peh →0 sinh Peh
cosh Peh cosh Peh
lim ε̂ = lim εPeh = lim 21 ah = 12 ah.
ε→0 Peh →∞ sinh Peh Peh →∞ sinh Peh

For equation (13.3a), as h → 0 we find


Z xm+1
−εh−2 δ 2 um + ah−1 △um = h−1 g(x)f (x) dx
xm−1

in which the left hand side is a standard second order finite difference approximation of −εu′′ +au′
and the right hand side uses a weighted average of f (x) over the interval (xm−1 , xm+1 ) rather
Rh
than the “point value” f (xm ) (recall the earlier result which shows that h−1 −h g(x) dx = 1 and
the mean value theorem for integrals).
For the limit ε → 0, note that v(x) → 1 for x ∈ (−h, 0) and w(x) → 0 for x ∈ (0, h). Conse-
quently, equation (*) becomes
Z xm
ah−1 (um − um−1 ) = h−1 f (x) dx,
xm−1

which is an “upwind” approximation of the reduced equation au′ = f (Note: we have used the
identity △− = △ − 12 δ 2 ). This is consistent of second order because the right hand side is a
second order approximation of f (xm−1/2 ) (provided that f is a smooth function).
A construction of this method is also given in “Numerical Methods for Singularly Perturbed
Differential Equations, Convection Diffusion and Flow Problems” by H.–G. Roos, M. Stynes
and L. Tobiska (Springer Series in Computational Mathematics, vol. 24, Springer–Verlag, 1996,
pp.43–45. See also “Ten ways to generate the Il’in and related schemes” by H.-G. Roos (J. Comp.
Applied Maths., vol. 53, 1994, pp.43–59.
13.4
The stencils and domains of dependence of the individual methods are shown in Fig. 25. The
CFL condition requires that the point A move to −∞ and that B move to ∞ (along the x-axis)
as the grid is refined. This requires that k/h → 0 as h, k → 0. Note also that (13.4a) requires a
BC on the left side of the domain and that (13.4b) requires a BC on the right side—counter to
the requirements of a parabolic PDE.
The amplification factors of the two schemes are

1 − r + c/2 + (r − c/2)eiθ 1 − r − c/2 + (r + c/2)e−iθ


ξ1 = , ξ2 = ,
1 + r + c/2 − (r + c/2)e−iθ 1 + r − c/2 + (r − c/2)eiθ

133
b →bc ←bc b
b b b b

t P(X, T ) t P(X, T )

A B

Figure 25: The stencils of the Saul’Yev schemes in Project 13.4 (top) and their respective domains
of dependence (bottom).

where θ = κh.
The fractional part of the right hand side of |ξ|2 − 1 is composed of three factors that are linear
in s ∈ [0, 1]. All reduce to 1 at s = 0 while, at s = 1:

1 + (2r − c)(2r + c) = 1 + 4r2 − c2 , (1 + (2 + 2r ± c)(2r − c)) = (1 − 2r ± c)2 = (1 + 2r ± c)2 .

Therefore each of the factors maintains it sign for all s ∈ [0, 1] (so that the method is stable)
provided that c2 ≤ 1 + 4r2 .
Pure diffusion (c = 0): Then, from the given expression,

1 + 4r2 s
|ξ|2 − 1 = −16rs ,
(1 + 4r(1 + r)s)2

so that |ξ|2 − 1 ≤ 0 for all s ∈ [0, 1] and all r > 0—the combined method is unconditionally
stable.
Pure advection (r = 0) then |ξ|2 = 1 for all s ∈ [0, 1] so that the combined method is non-
dissipative.
When c = 0 the methods can be written in terms of finite difference operators as

(1 + r△−x )Um
n+1
= (1 + r△+x )Um
n
⇒ (1 − r△+x )(1 + r△−x )Um
n+2
= (1 − r△−x )(1 + r△+x )Um
n
.
(1 − r△+x )Um
n+2
= (1 − r△−x )Um
n+1

The LTE of this scheme is (we divide by 2k because it spans two time levels)
n 
Rh m
= (2k)−1 (1 − r△+x )(1 + r△−x )un+2
m − (1 − r△−x )(1 + r△+x )unm

and using the identities △+x − △−x = △+x △−x = δx2 , this becomes
n 
Rh m
= (2k)−1 (1 − rδx2 − r2 δx2 )un+2
m − (1 + rδx2 − r2 δx2 )unm

= (2k)−1 (1 − rδx2 )un+2
m − (1 + rδx2 )unm − (2k)−1 r2 δx2 (un+2
m − unm ).

The first term on the right (which we denote by R1 ) is the LTE of the Crank-Nicolson method
with a time step 2k, so that R1 = O(h2 ) + O(k 2 ). The second term is
k 2 −2 2 
R2 = −(2k)−1 r2 δx2 (un+2
m − unm ) = −ε2 h δx k−1 △un+1
m
h
k 2 
= −ε2 uxxt + O(h2 ) + O(k 2 )
h

134
so that R2 does not tend to zero with h and k unless k/h → 0. The method will not therefore
converge unless k = O(h).
n
This is a perilous situation because, in contrast with instability when |Um | → ∞ (at least for
some m), there is no signal from the numerical results that they are grossly inaccurate. For
instance, if the grid is refined with k = αh, the numerical method is consistent with the modified
PDE
ut = εuxx + ε2 α2 uxxt .
In the pure advection case the finite difference equations become

(1 + 12 c△−x )Um
n+1
= (1 − 21 c△+x )Um
n
⇒ (1+ 12 c△+x )(1+ 12 c△−x )Um
n+2
= (1− 12 c△−x )(1− 12 c△+x )Um
n
.
(1 + 12 c△+x )Um
n+2
= (1 − 21 c△−x )Um
n+1

and, using the identities △+x + △−x = △x , △+x △−x = δx2 , this becomes
n+2
(1 + 14 δx2 )(Um n
− Um n+2
) + 12 c△x (Um n
+ Um )=0
(1 + 41 δx2 )△t Um
n+1 n+1
+ c△x Um + 12 c△x δt2 Um
n+1
=0

which is consistent of order two with the advection equation ut + aux = 0 when k = O(h).
See “Modified AGE methods for the convection-diffusion equation” by Lu Jinfu, Zhang Baolin
and Zuo Fengli, (Commun. Applied. Numer. Methods, vol. 14, 1998, pp.65–76). (Note: AGE
is an acronym for Alternating Group Explicit).
13.5
Differentiating under the integral sign and then integrating by parts, we find
Z Z Z
d   
u2 + v 2 dΩ = 2 uut + vvt dΩ = 2 uuxx + εvvyy dΩ
dt Ω Ω Ω
Z 1 Z 1 Z
1 1 
= uux ) x=0 dy + ε vvy ) y=0 dx − (ux )2 + ε(vy )2 dΩ
0 0 Ω
Z
2 2

=− (ux ) + ε(vy ) dΩ ≤ 0

and so the “energy” integral is bounded below by 0 and is a strictly decreasing function of t if
either u 6= 0 or v 6= 0. Hence both u and v tend to zero with time.
 n  n+1   n
Um n i(κ 1 ℓ+κ 2 m)h Um U
=ξ e c⇒ =ξ m
Vmn Vmn+1 Vmn
and so the amplification factor of the coupled scheme satisfies
 
1 − 4rs1 k
ξc = c,
−k 1 − 4rεs2

where s1 = sin2 12 κ 1 h and s2 = sin2 12 κ 2 h. This is an eigenvalue problem with characteristic


polynomial

P (ξ) = ξ 2 + 2(2εs2 + 2s1 − 1)ξ + 16εs1 s2 − 4εs2 + k 2 − 4s1 + 1 .

The product of the roots is P (0) = det(A) = (1 − 4s1 )(1 − 4εs2 ) + k 2 and clearly P (0) > 1 when
s1 = s2 = 0 so the method is unstable.

135
For the method (13.5b) the amplification factor satisfies
   
1 − 4rs1 kξ 1 − ξ − 4rs1 kξ
ξc = c ⇒ A(ξ)c := c = 0.
−k 1 − 4rεs2 −k 1 − ξ − 4rεs2

This will have a nontrivial solution if, and only if, det(A(ξ)) = 0. This leads to the characteristic
polynomial P1 (ξ) = 0, where

P1 (ξ) := (1 − ξ − 4rs1 kξ)(1 − ξ − 4rεs2 ) + k 2 ξ.

Applying the Jury conditions, the roots will satisfy |ξ| ≤ 1 if, and only if,
(a) P1 (0) = (1 − 4rs1 kξ)(1 − 4rεs2 ) < 1 for all s1 , s2 ∈ [0, 1]: considering

P1 (0) − 1 = −4r(1 + ε − 4εr),

we conclude that P1 (0) < 1 if r < (1 + ε)/(4ε).


(b) P1 (1) = 16εr2 s21 s22 + k 2 > 0 is clearly true for all s1 , s2 ∈ [0, 1] and all r.
(c) P1 (−1) = 4(1 − 2rs1 )(1 − 2rεs2 ) − k 2 > 0. There are two cases:
(i) 0 < r < 21 : both the factors in the first term of P1 (−1) are positive and

(1 − 2rs1 ) ≥ 1 − 2r, (1 − 2rεs2 ) ≥ 1 − 2rε ⇒ P1 (−1) ≥ 4(1 − 2r)(1 − 2rε) − k 2

so we have the time step limit

k 2 < 4(1 − 2r)(1 − 2rε).

(ii) r > 12 . There is a value of s1 ∈ (0, 1) such that P1 (−1) = −k 2 < 0 and the process is
unstable.
The amplification factor of method (13.5c) satisfies
   
1 − 4rξs1 kξ 1 − ξ − 4rξs1 kξ
ξc = c ⇒ A(ξ)c := c = 0.
−k 1 − 4rεs2 −k 1 − ξ − 4rεs2

This will have a nontrivial solution if, and only if, det(A(ξ)) = 0. This leads to the characteristic
polynomial P1 (ξ) = 0, where

P2 (ξ) := (1 + 4rs1 )ξ − 1) (ξ + 4rεs2 − 1) + k 2 ξ.

Applying the Jury conditions, the roots will satisfy |ξ| ≤ 1 if, and only if,
(a) P2 (0) = (1 − 4rεs2 ) < 1 for all s1 , s2 ∈ [0, 1] and r > 0.
(b) P2 (1) = 16εr2 s21 s22 + k 2 > 0 is clearly true for all s1 , s2 ∈ [0, 1] and all r.
(c) P2 (−1) = 4(1 + 2rs1 )(1 − 2rεs2 ) − k 2 > 0. There are two cases:
(i) 0 < r < 1/(2ε): P2 (−1) ≥ 1 − 2εr − k 2 > 0 if r < (1 − 41 k 2 )/(2ε).
(ii) r > 1/(2ε). There is a value of s2 ∈ (0, 1) such that P2 (−1) = −k 2 < 0 and the
process is unstable.

136
r
1

1
2 Figure 26: The stability regions for method (13.5b) (light
shading) and (13.5c) (dark shading).
2 k

The stability regions for methods (13.5b) (light shading) and (13.5c) (dark shading) are shown
in Fig. 26. Clearly method (13.5c) has the largest stability region but this is offset by requiring
a set of tridiagonal equations to be solved at each time step.
The local truncation error of all three methods is O(k) + O(h2 ).
13.6
When u(x, t) = v(t) then v satisfies the ODE v ′ (t) = v(1 − v) and has solution
Aet v(0)
v(t) = , A= .
1 + Aet 1 − v(0)
When A > 0 (corresponding to 0 < v(0) < 1) then the denominator of v(t) is always positive
and v(t) → 1 as t → ∞. When A < 0, the denominator becomes zero at t = t∗ , where
∗ 1 1
et = − =1− .
A v(0)
It follows that t∗ > 0 if v(0) < 0.
(i) Substituting u(x, t) = φ(x − at) into the PDE gives
ϕ′′ (z) + aϕ′ (z) + ϕ(z) − ϕ2 (z) = 0, −∞ < z < ∞. (13.6a)
When ϕ(z) ≈ Ae−λz and z is sufficiently large that −ϕ2 (z) is negligible, then
ϕ′′ (z) + aϕ′ (z) + ϕ(z) = 0, ⇒ (λ2 − aλ + 1)Ae−λz = 0
so that λ2 − aλ + 1 = 0. That is
1
a=λ+≥2
λ
since the function λ + 1/λ has a minimum at λ = 1 for all positive values of λ.
(ii) When ϕ(z) ≈ 1 − Beµz we find
ϕ − ϕ2 = ϕ(1 − ϕ) = (1 − Beµz )Beµz ≈ Beµz as z → −∞.
Hence, for large negative values of z,
(−µ2 − aµ + 1)Aeµz = 0
so that µ2 + aµ − 1 = 0. That is
1
−µ
a=
µ
so that −∞ < a < ∞ for 0 < µ < ∞. If the wave speeds at +∞ and ∞ are to agree, then
λ and µ have to be related by
1 1
λ + = − µ. (13.6c)
λ µ

137
(iii) Z ∞
′ ∞
s (t) = −a ϕ′ (x − at) dx = −aϕ(x − at) x=L
= aϕ(L − at)
L

and s′ (t) → a since ϕ(L − at) → 1 as t → ∞ (part (ii)) and ϕ(x − at) → 0 as z → ∞ (part
(i)).

Substituting the expression (13.6b) into the ODE for ϕ leads to

C exp(bz) 
2(ab + b2 − 1) + C(2ab − 4b2 − 1) exp(bz) = 0
(1 + C exp(bz))4

which is satisfied if (ab + b2 − 1) = (2ab − 4b2 − 1) = 0. These lead to a = 5b = 5/ 6. Also,

1 exp(−2bz)
ϕ(z) = ≈ C −2 exp(−2bz) as z → ∞
(1 + C exp(bz))2 (exp(−bz) + C)2
1
≈ ≈ (1 − 2C exp(bz)) as z → −∞
(1 + 2C exp(bz))

so that λ = 2b and µ = b. These satisfy (13.6c) if b2 = 1/6.


For some further insights into Fisher’s equation see “An Introduction to Partial Differential
Equations” by J. David Logan, Section 4.4 (John Wiley & Sons, 1994).
13.7
Substituting u(x, t) = X(x)/T (t) into ut − u = u(uxx − u) leads to

XT ′ X XX ′′ X2
− 2
− = 2
− 2 ⇒ T ′ + T = X − X ′′
T T T T
and, using the standard separation of variables argument with separation constant C, we obtain
X = C + Aex + Be−x and T (t) = C + De−t . Hence

C + Aex + Be−x
u(x, t) = (13.7d)
C + De−t
solves the PDE for arbitrary constants A, B, C and D.
Now, with a similar argument to the derivation of (11.47b),

δx2 e±xm = (eh − 2 + e−h )e±xm = 4 sinh2 ( 12 h)e±xm

and so a2 δx2 Xm = Xm − C with a = 1/(2 sinh 12 h) and Xm = X(xm ). Also, with T n = T (tn )
and tn = nk,

T n − (1 + b)T n+1 = (C + De−tn ) − (1 + b)(C + De−tn+1 ) = −bC + De−tn (1 − (1 + b)e−k ) = −bC

if b = ek − 1. Hence, if we substitute Um n
= Xm /T n into the difference between left and right
hand sides of (13.7b), rearranged to read,
n+1 n n+1
 2 2 n n

Um − (1 + b)Um − bUm a δx U m − U m

we have
Xm Xm  
(T n − (1 + b)T n+1 ) − b a2 δx2 Xm − Xm
T T n+1
n T T n+1
n

which vanishes by virtue of the earlier results.

138
Consistency follows from the the expansions
1
a2 = = h−2 − 1
+ O(h2 ), b = ek − 1 = k + 12 k 2 + O(k 3 ).
4 sinh2 21 h 12

With U = 1 + εV we have
n+1 n
(1 − Um )Um = εVmn+1 (1 + εVmn ) = εVmn+1 + O(ε2 )

and
n+1 2 n
Um δx Um = εδx2 Vmn (1 + εVmn+1 ) = εδx2 Vmn + O(ε2 )
so that V satisfies
(1 − b)Vmn+1 = Vmn + a2 bδx2 Vmn .
Substituting Vmn = ξ n eiκmh it is readily show that the amplification factor is real and given by

1 − 4a2 bs
ξ= ,
1+b

where s = sin2 12 κh. Clearly ξ ≤ 1 and we shall have ξ ≥ −1 if b(1 + 4a2 s) ≤ 2. This will be
satisfied for all s ∈ [0, 1] if it is satisfied at s = 1, that is, b(1 + 4a2 ) ≤ 2. Using the identity
cosh2 x − sinh2 x = 1 we find the stability condition to be b ≤ 2 tanh2 12 h. This reduces to
k ≤ 21 h2 when k and h are sufficiently small.
Nonstandard finite difference schemes of this type were introduced by Ronald E. Mickens—
see his article “Nonstandard Finite Difference Schemes for Differential Equations” (Journal of
Difference Equations and Applications, vol. 8: pp. 823–847, 2002) for background material.
13.8
See the article “Discretization of a convection–diffusion equation” by K.W. Morton and I.J. Sobey
(IMA Journal of Numerical Analysis, vol.√ 13, pp. 141–160, 1993).
With the change of variable s = (ak − 2z εk)/h, the solution at (xm , tn+1 ) may be expressed as
Z ∞
n+1 1 −(s−c)2 /4r
Um = K(s) Φ(xm − sh) ds, K(s) = e . (13.8d)
−∞ 4πr

This is shown in Fig. 27 for r = 1/8, 1/4, 1/2, 1 and c = 0. Consider this in the context of Leith’s

K(s)
1 r = 1/8
r = 1/4
r = 1/2
r=1

−3 −2 −1 0 1 2 3
s

Figure 27: The kernel K(s) for Project 13.8 for r = 1/8, 1/4, 1/2, 1 and c = 0.

method (which is the FTCS method for the heat equation when c = 0). The interpolant is based
on data at the points s = −1, 0, 1 and would not be expected to give a good approximation of
the solution outwith an interval much larger than −2 ≤ s ≤ 2, say. When r is small (r = 1/8,
for example) the kernel K is very small outside the interval (−1.5, 1.5) and the formula (13.8d)

139
effectively forms a weighted average of the interpolant within its most accurate range. As r
increases, the interval over which the weighted average is taken effectively grows and the accuracy
of the method is expected to fall away.
13.9
For 0 < m < M the argument used in Example 11.9 may be used with γ = 0 to show that
n+1
|Um | ≤ kU·n kh,∞ provided that r ≤ 12 . At m = M and using UM+1
n
= 0,

n+1 2r n 2r n
|UM |= UM−1 + (1 − )UM
1+α α
2r 2r  n+1
≤ + 1− kU· kh,∞ .
1+α α
There are two cases to consider
(a) 0 < 2r ≤ α < 1 then
2r 2r  2r 1
0< + 1− =1− ≤1
1+α α α 1+α
n+1
and so |UM | ≤ kU·n kh,∞ .
(b) α < 2r ≤ 1 then
2r 2r  2r(1 + 2α)
0< + 1− =
1+α α α(1 + α)
n+1
and this time |UM | ≤ kU·n kh,∞ if r ≤ α(1 + α)/(1 + 2α). The right hand side of this

expression is bounded by 12 provided that α ≤ 1/ 2.
Combining the two results we find that the scheme is stable in the maximum norm, in the sense
that kU·n+1 kh,∞ ≤ kU·n kh,∞ , provided
( α(1+α)
, α ≤ √12 ,
r ≤ 11+2α
√1 ≤ α ≤ 1.
2, 2

The region of the α-r plane in which this holds is shaded in Fig. 28 (left).
r r
1
ℓ∞ stability region 1
ℓ2 stability region
2 2

√1 1 α √1 1 α
2 2

Figure 28: The stability regions for Project 13.9. The ℓ∞ –limit is shown as a dashed curve on
the right hand side for comparison.
n
To examine the ℓ2 –stability of the scheme we substitute Um = ξ n z m into equations (13.9) (with
n
UM+1 = 0) and find, after some simplification,

r(z 2 + 1) + (1 − 2r − ξ)z = 0 (13.9d)


2r 2r 
+ 1− − ξ z = 0. (13.9e)
1+α α

140
Subtracting the second of these from the first eliminates ξ so that z satisfies the quadratic
equation p(z) = 0, where
1−α 1−α
p(z) := z 2 + 2 z−
α 1+α
is independent of r. The discriminant of p(z) is
(1 − α)2 1−α 1−α
“b2 − 4ac” = 4 +4 =4 2 >0
α2 1+α α (1 + α)
and so the roots of p(z) are real and their product is negative for 0 < α < 1. Since
2(1 − 2α2 ) 2
p(−1) = , p(0) < 0, p(1) = >0
α(1 − α) α(1 + α)
and p(z) → +∞ as z → ±∞, it follows that the roots z1 , z2 of p(z) satisfy z1 < −1 < z2 < 1
(so that |z1 | > 1) for 2α2 < 1 and −1 < z1 < 0 < z2 < 1 for 2α2 > 1. There are no solutions
with |z| > 1 for 2α2 > 1 so the stability test imposes no restriction apart from the von Neumann
condition r ≤ 12 .
In the case 2α2 < 1, we solve (13.9e) for z and substitute into (13.9d) to give
4r2 2r
(ξ − 1)2 = ⇒ ξ =1± √
α2 (1 − α2 ) α 1 − α2
so there is clearly one root (ξ1 , say) with ξ1 > 1 and another root (ξ2 , say) that will satisfy
−1 ≤ ξ2 ≤ 1 if, and only if,
2r p
1− √ ≥ −1 ⇒ r ≤ α 1 − α2 .
α 1−α 2


Finally, we need to relate the ξ roots with the z roots when 0 < α < 1/ 2.
Substituting ξ = ξ2 into (13.9d) we find
1  α
1− √ z=
1 − α2 1+α

so that the corresponding z-root is negative, i.e., z = z1 . Hence, for √ 0 < α < 1/ 2, we have a
n
solution Um = ξ2n z1m with |z1 | > 1 and |ξ2 | ≤ 1 provided that r ≤ α 1 − α2 .
The overall stability region is shown on the right of Fig. 28.
If the finite difference approximation at x = xM is replaced by
2r n+1 2r n+1 2r
− UM−1 + (1 + )UM − U n+1 = UM
n
, (13.9c)
1+α α α(1 + α) M+1
n+1
(based on a backward difference in time) then, since the value of UM−1 is provided by an explicit
n+1
scheme, UM may be computed without the need to solve any linear equations (the BCs mean
n+1
that UM+1 = 0).
n+1
The argument used in Example 11.9 may again be used with γ = 0 to show that |Um | ≤
n 1 n+1
kU· kh,∞ for 0 < m < M provided that r ≤ 2 . Thus, with UM+1 = 0
2r n+1 2r
(1 + )|UM n
| ≤ |UM |+ |U n+1 |
α 1 + α M−1
2r  n
≤ 1+ kU· kh,∞
1+α

141
n+1
and so |UM | ≤ kU·n kh,∞ since
2r 2r
1+ ≤1+ .
α 1+α
1
Thus kU·n+1 kh,∞ ≤ kU·n kh,∞ for r ≤ 2 and so the scheme is stable in the maximum norm for
any α ∈ (0, 1].
13.10

Replacing n by n − 1 in (13.10b) gives


n n n n−1
(1 + 2r)Um = r[Um+1 + Um−1 ] + Um
n
and eliminating Um using this equation and (13.10a) leads to (13.10c). When m + n is odd
(say), the sum of the indices in each of the terms in (13.10c) is m + n ± 1 and is therefore
even. Consequently, the solution at all grid points where m + n ± 1 is even may be determined
independently of those where m + n ± 1 is odd, and vice versa.

(a) The domain of dependence of the Du Fort–Frankel (and therefore also the hopscotch)
scheme is the same as that of the FTCS method (shown in Fig. 11.4) and, as in Exam-
ple 11.2, the method cannot converge unless k/h → 0 as h, k → 0.
(b) The LTE of the scheme is (using the expansions given in Table 6.1)

n 1 
Rh m
:= (1 + 2r)un+1m − 2r(unm−1 + unm+1 ) + (1 − 2r)um
n−1
k
1 
= 2△t unm − 2r(δx2 − δt2 )unm
k
k 2 −2 2 n
=2k −1 △t unm − 2h−2 δx2 unm + 2 k δt )um
h
  k 2 
=2 ut + 61 k 2 uttt + O(k 4 ) − 2 uxx + 121 2
h uxxx + O(h4 ) + 2 utt + O(k 2 )
h
k 2 
=2 ut − uxx + utt + O(h2 ) + O(k 2 ).
h
Thus the method is consistent with the heat equation ut = uxx only if k/h → 0 as h, k → 0.
If k = rh2 and r is fixed as h → 0, the order of consistency is O(h2 ).
If there is a constant α such that k = αh as h → 0 (for example, halving k whenever h is
halved), then the Du Fort–Frankel method is consistent of second order with the PDE

ut − α2 utt = uxx

and the finite difference solution cannot therefore converge to a solution of the heat equa-
tion.
1
(c) The argument used in Example 11.9 may again be used with γ = 0 to show that |Um |≤
kU·0 kh,∞ for m = 2, 4, . . . provided that r ≤ 21 . Then, using (13.10b) with m = 1, 3, . . .

1 1 0 1 1

|Um |≤ |Um | + r|Um−1 | + r|Um+1 | ≤ kU·0 kh,∞ .
1 + 2r
Hence kU·1 kh,∞ ≤ kU·0 kh,∞ for r ≤ 21 . The same argument holds at all odd time levels and,
at even numbered time levels, the roles of the odd and even spatial grid points is reversed.

142
n
(d) To analyse the ℓ2 -stability of the scheme we substitute Um = ξ n eiκmh into (13.10c) which
leads to the quadratic equation

(1 + 2r)ξ 2 − 4r cos(κh)ξ − (1 − 2r) = 0

whose roots are


1 p 
ξ= 2r cos θ ± 1 − 4r2 sin2 θ , θ = κh.
1 + 2r
There are two cases
(i) Real roots: 1 − 4r2 sin2 θ ≥ 0 then 1 − 4r2 sin2 θ ≤ 1 and so
1
|ξ| ≤ (2r + 1) = 1.
1 + 2r

(ii) Complex roots: 1 − 4r2 sin2 θ < 0 then


1 p 
ξ= 2r cos θ ± i 4r2 sin2 θ − 1
1 + 2r
1 2 2  2r − 1
2
|ξ| = 4r (cos2 θ + sin2 θ) − 1 = ≤ 1.
1 + 2r 2r + 1
Thus |ξ| ≤ 1 for all θ and all r and the method is unconditionally ℓ2 stable. As in
Project 13.4, the time step is limited by consistency rather than stability.

One possible strategy in two space dimensions is to use the FTCS(BTCS) schemes at spatial
grid points where ℓ + m is even (odd) at even numbered time levels and to exchange the roles of
even/odd spatial grid points on alternate time levels.
13.11
The analysis of this scheme, along with its generalisation to d space dimensions and anisotropic
diffusion (which is necessary to study the generalisation of Leith’s scheme), is contained in the
article: “The Stability of Explicit Euler Time–Integration for Certain Finite Difference Approx-
imations of the Multi–Dimensional Advection–Diffusion Equation” by A. C. Hindmarsh, P. M.
Gresho and D. F. Griffiths (Int. J. Num. Meth. Fluids, vol., 4, 1984, pp.853–897).
13.12

(i) With f (u) = 0,


 n
U nm = Um
n
− c△−x 1 − c△+x Um n
= Um − c△−x Um
n
+ c2 δx2 Um
n

since △−x △+x = δx2 (Exercise 6.2). Hence


n+1 n n
Um = Um − c△x Um + 21 c2 δx2 Um
n

(using △−x + △+x = 2△x ) which is the Lax-Wendroff method (see Exercise 12.32).
n
(ii) With f (u) = αu and Um = ξ 2 eiκmh we have
n n
  n
U m = Um − c(eiθ − 1) − αk Um
  n
U nm = Um n
− c(1 − e−iθ ) − αk U m

143
which lead to
ξ = 1 + σ + 21 σ 2 − ic(1 + σ) sin θ − 2c2 sin2 21 θ,
where σ = −αk. Defining s = sin2 21 θ we find that |ξ|2 − 1 = 14 p(s), where

p(s) := 16(c2 − (1 − σ)2 )c2 s2 − 8σ(2 − σ)c2 s − σ(2 − σ)((1 − σ)2 + 3),

and so stability will follow if p(s) ≤ 0 for all s ∈ [0, 1]. Now p(0) ≤ 0 for 0 ≤ σ ≤ 2 and it
is readily shown that p(1) ≤ 0 for

c2 ≤ 41 (1 − σ)2 + 3 . (13.12c)

It may be shown (we omit the details) that p(s) may have a stationary point s = s∗ in the
region c2 ≥ (1 − σ)2 but, since p′′ (s∗ ) ≥ 0, this must be a local minimum. Hence p(s) ≤ 0
for all s ∈ [0, 1] provided that condition (13.12c) holds and 0 ≤ σ ≤ 2.

c
1
Figure 29: The stability region (13.12c) for MacCor-
mack’s method when f (u) = −αu and σ = αk.

2 σ

The stable region in the σ-c parameter space is √ shaded in Fig. 29. The dashed line shows
a refinement path as k → 0 with c fixed and 21 3 < c < 1. The method is unstable for
σ > 2 then, as k decreases in stabilizes briefly before becoming unstable again. It finally
restabilizes when k is sufficiently small. This illustrates the possibility that reducing the
times step may destabilise a numerical method.
n n+1
(iii) Substituting Um = Um = U ∗ into (13.12b) leads to
n ∗
U m = U ∗ + kf (U ∗ ) =: U , say

U nm = U ∗ + kf (U ) =: U ∗ , say,
n ∗
U ∗ = 12 (U m + U nm ) = U ∗ + 12 k(f (U ∗ ) + f (U ))

which will be satisfied if f (U ∗ ) + f (U ) = 0, as required. When f (u) = αu(1 − u), it may
be shown that the steady states U ∗ satisfy the quadratic equation

σ 2 U ∗ 2 − σ(2 + σ)U ∗ + 2 + σ = 0.

This has real roots for σ = αk ≥ 2. The method has spurious steady state solutions when
α ≫ 1 (otherwise, since k is small, we will have αk < 2). Other spurious behaviour may also
be possible and is one of the hazards faced when solving PDEs with strong nonlinearities.

13.13

The differential equation iv ′ (x) = λv(x) has general solution v = e−iλx and the periodicity
requirement v(x + 1) = v(x) necessitates e−iλ = 1 so that λ = ±2jπ for j = 0, 1, 2, . . .. The
eigenfunction corresponding to λ = 0 is v(x) = constant.

144
To investigate the rank of A1 and A2 it is sufficient to study (L − LT ) and (RL − R−1 LT ),
respectively (since D is nonsingular). So, using the notation A ∼ B to denote matrices that are
equivalent under elementary row operations,
 
0 1 −1
−1 0 1 
 
A1 ∼ L − LT =  . . .
 .. .. 
1 −1 0

It is easily shown that (L − LT )v1 = 0, where v1 = [1, 1, . . . , 1]T , and so rank (A1 ) ≤ M − 1.
When M is even, (L − LT )v2 = 0 , where v1 = [1, 0, 1, 0 . . . , 1, 0]T , and so rank (A1 ) ≤ M − 2.
Permuting the rows of L − LT so that the first becomes the last, we have, when M = 5,
   
−1 0 1 0 0 −1 0 1 0 0
 0 −1 0 1 0  0
   0 −1 0 1 
A1 ∼  0 0 −1 0 1 ∼ 0
  0 −1 0 1
 1 0 0 −1 0  0 0 0 −1 1
0 1 0 0 −1 0 0 0 0 0

having added row 1 to row 4, row 2 to row 5, row 3 to row 4 and then row 4 to row 5. Hence
rank (A1 ) = 4 when M = 5. When M = 6, similar calculations lead to
   
−1 0 1 0 0 0 −1 0 1 0 0 0
 0 −1 0 1 0 0  0
   0 −1 0 1 0 
 0 0 −1 0 1 
0  0 0 −1 0 1 0
A1 ∼ 
 0 ∼ 
 0 0 −1 0 1 
  0 0 0 −1 0 1
 1 0 0 0 −1 0  0 0 0 0 0 0
0 1 0 0 0 −1 0 0 0 0 0 0

in which there are two zero rows, therefore rank (A1 ) = 4 when M = 6.
Since A2 v1 = 0 it follows that rank (A2 ) ≤ M − 1. It is impractical to carry out row operations
on A2 in the general case, so we look at the special case hm = αh for m = 1, 2, . . . , M − 1 and
that hM = βh. When M = 6
 
0 1 0 0 0 −1
 
 −1 0 1 0 0 0 
 
 
 0 −1 0 1 0 0 
 
A2 ∼  
 0 0 −1 0 1 0 
 
 
 0 0 0 − αβ β
− α α 
 α β β 
β β
α 0 0 0 −α
β
α
β − α

Permuting the rows of this matrix so that the first becomes the last and then carrying out
elementary row operations (which involve adding rows together or adding β/α × one row to

145
another, we find
   
0 1 0 0 0 −1 −1 0 1 0 0 0
   
 −1 0 1 0 0 0   0 −1 0 1 0 0 
   
   
 0 −1 0 1 0 0   0 0 −1 0 1 0 
   
A2 ∼  ∼ 
  
2 2


0 0 −1 0 1 0
  0 0 0 − αβ − α β−β
α
α
β 
   
 0 0 0 β
−α β
− α α   2
− α β−β
2
α2 −β 2 
 α β β  
 0 0 0 0 α βα


β β
α 0 0 0 − βα α
β − α 0 0 0 0 0 0

so that rank (A2 ) = M − 1 = 5 unless α = β. However, the characteristic polynomial of A2 is


2  2
det(A2 − λI) = 16 λ6 α4 (α + β) − 4 11 α2 + 10 β α + 3 β 2 λ4 α2 + (5 α + β) λ2

from which we deduce that it has a double eigenvalue at λ = 0. Hence A2 is defective—it has
fewer than M linearly independent eigenvectors.
The eigenvalue problem A1 v = λv may be written as i(L − LT )v = λDv so that

v ∗ i(L − LT )v
λ=
v ∗ Dv
and the numerator and denominator are both real since i(L − LT) and D are Hermitian matrices.
Hence λ is real. Taking the complex conjugate of i(L − LT )v = λDv leads to

−i(L − LT )v = λDv

so that v is an eigenvector corresponding to −λ. No corresponding results are known for A2 .


We now compute the eigenvalues λj of A1 and µj of A2 using Matlab when M = 47 and M = 48
(chosen because one is prime and the other even). In all computed cases the eigenvalues of both
matrices have been found to be real. The relative difference
λj − µm
λj

is shown in Fig. 30 for all non-zero values of λj . It is seen to be of the order of rounding error
(which is around 10−16 ) for both values of M . The computed “zero” eigenvalues of A1 are
generally less than 10−13 for both values of M (using a number of different random grids). The
same is true for A2 when M = 47 but, when M = 48, it has a pair of eigenvalues of the form
±ε, where ε varies in magnitude from about 10−8 to 10−3 for different random grids.
The null space of both matrices is computed exactly as multiples of v1 when M = 47. When
M = 48, the null space of A1 is computed as two vectors of the form

[aj , bj , aj , bj , . . . , aj , bj ]T , j = 1, 2

for complex constants a1 , b1 , a2 , b2 . These span the same subspace as v1 , v2 . The situation is more
complicated for A2 . The computed vectors corresponding to the “null-space” each have entries
whose magnitude is around 0.5 ± 10−7 so as to be, for practical purposes, linearly dependent.
The positive eigenvalues of A1 (solid lines) are compared with those of the ODE (◦) in Fig. 30
when both are ordered by magnitude. It would appear that, apart from the first eigenvalue,
the differences are significant. The reason for this can best be understood by calculating the

146
10
-10 250 250

200 200
-12
10
150 150

100 100
-14
10
50 50

10-16 0 0
0 10 20 30 40 50 0 5 10 15 20 25 0 5 10 15 20 25
j j j

Figure 30: Left: the relative difference between the eigenvalues of A1 and A2 for M = 47 (solid
lines) and M = 48 (broken lines). The positive eigenvalues of A1 (solid lines) are shown for
M = 47 (centre) and M = 48 (right). Also shown in the centre and right are the exact positive
eigenvalues of the ODE (◦), the discrete eigenvalues on a uniform grid when sorted according to
magnitude (×) and when sorted according to wavenumber (+).

eigenvalues of A1 on a uniform grid. The eigenvalue problem A1 V = λV is a representation of


iM △Vm = λVm and, we find that the jth eigenvalue/vector are5

λj = M sin(2πj/M ), [Vj ]m = e−2πijxm , xm = m/M,

where j = − 21 (M − 1), . . . , 21 (M − 1) when M is odd and j = − 12 M + 1, . . . , 21 M when M is even.


These are shown with + symbols in Fig. 30 (centre and right) and the first half-dozen or so agree
well with the eigenvalues of the ODE. Now, taking M to be odd, for illustration, consider

λ 1 (M−1)−k = M sin(π(2k + 1)/M ), [V 1 (M−1)−k ]m = (−1)m e−πi(2k+1)xm .


2 2

so, for k = 0, 1, 2, . . . (small), eigenvalues ≈ π, 3π, . . . that are approximately odd multiples of π
are generated by eigenvectors with high wavenumber whereas the low wavenumbers (j = 1, 2, . . .)
generate eigenvalues ≈ 2π, 4π, . . .. When these eigenvalues are ordered by magnitude (see ×
symbols in Fig. 30) there is close agreement with the eigenvalues on a random grid for the lower
half of range of wavenumbers.

We now turn to the characteristic polynomials of A1 and A2 . For M = 3, 4, 5, 6 they have


identical characteristic polynomials pM (λ) given by

p3 (λ) = det(D)λ3 − 2λ
p4 (λ) = det(D)λ4 − λ2
X 5 
p5 (λ) = det(D)λ5 − Hm Hm+1 Hm+2 λ3 + 2λ
m=1
X
6 
p6 (λ) = det(D)λ6 − Hm Hm+1 Hm+2 Hm+3 λ4 + λ2 ,
m=1

QM
where det(D) = m=1 Hm , Hm := hm + hm−1 and hm ≡ hm−M for m > M .
The matrices A1 , A2 and 12 (A1 +A2 ) have been found to have identical characteristic polynomials
for all M up to M = 20 but their complexity makes it impractical to display them here.

5 Note that λj → 2πj, the eigenvalues of the original ODE as M → ∞ with j fixed.

147
http://www.springer.com/978-3-319-22568-5

You might also like