Solutions Odd
Solutions Odd
Solutions Odd
Exercises
1 Introduction 2
3 Origins of PDEs 6
4 Classification of PDEs 7
8 Separation of variables 29
1
Exercises 1 Introduction
1.1
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.
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.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
2
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.
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.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
4
t=0 t=5 t = 10 t = 15
2 Figure 2: 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
3
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.3
From (1.2) with g(x) as given,
Z ∞ Z ∞ Z ∞
1 2 1 2 1 −z 2
u(x, t) = √ e−(x−s) /4t g(s) ds = √ e−(x−s) /4t ds = √ √ e 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
since the integrand is an even function of z.
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.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 2
ux = − AT 1/2 x(T −t)−3/2 e−x /4(T −t) ,
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
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.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.
5
Exercises 3 Origins of PDEs
3.1
Since H does not depend on t, we can differentiate ht + Hvx with respect to t:
3.3
This simply requires the vector form of differentiation of a product:
~ · (~v T ) = T ∇
∇ ~ · ~v + ~v · ∇T.
~
6
Exercises 4 Classification of PDEs
4.1
If ϕ(x) = x/(1 + |x|), then ϕ is a continuous function for x ∈ R and
( (
x 1
1+x x≥0 ′ (1+x)2 x≥0
ϕ(x) = x
⇒ ϕ (x) = 1
.
1−x x<0 (1−x)2 x<0
Therefore
1 1
lim− ϕ′ (x) = lim 2
= 1 = lim = lim+ ϕ′ (x).
x→0 x→0 (1 − x) x→0 (1 + x)2 x→0
4.3
u(x, t) = F (x − ct) + G(x + ct) and so the initial conditions give
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
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 > 14 , hyperbolic for u3 < 14 ,
parabolic for u3 = 41 .
4.7
With the change of variables s = x + y, t = x − y, it follows from the previous answer that
uxx − uyy = x + y becomes 4ust = s. Integrating with respect to t gives us = 41 st + f (s) (where
f is an arbitrary function) then integrating with respect to s, u = 81 s2 t + F (s) + G(t), where G
7
R
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) = − 83 x3 and so
G(x) − G(−x) = x + 14 x3 .
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)
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 = 41 > 0, so the equation is hyperbolic. The factorisation
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.11
Substituting u(r, t) = rm f (t − r) into the PDE and collecting terms leads to
8
This will hold for all differentiable functions f if, and only if,
m(m + n − 2) = 0 and 2m + n − 1 = 0.
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
4.15
y
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) = −
4π (x2 + (y + t)2 x2 + (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
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 + y2 − 4
9
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
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
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.23
Under the change of variables z = x + iy, z ∗ = x − iy, the chain rule gives
and so,
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.25
Since −∇2 u = v and −∇2 v = f ,
−∇2 −∇2 u = −∇2 v = f
10
and so ∇4 u = f .
With u = Cr2 log(r) and ∇2 u = (1/r)(rur )r
so v = −∇2 u = −4C log r − 4C which satisfies ∇2 v = 0 (see Exercise 4.20). Hence u satisfies
the biharmonic equation.
11
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.
5.3
The key identities are
cosh A − cosh B = 2 sinh 12 (A + B) sinh 12 (A − B), cos A − cos B = −2 sin 21 (A + B) sin 12 (A − B).
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
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.
12
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.9
Multiplying both sides of −2xu′′ − u′ = 2f (x) by 12 x− /2 we obtain
1
which has the form (5.28) with p(x) = x1/2 , q(x) = 0 and g(x) = x−1/2 f (x). The change of
independent variable ξ = ξ(x) given by (5.30), that is,
Z x
1
ds = 2x /2
1
ξ=
0 p(s)
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.11
RL
With u, v = 0 u(x)v ∗ (x) dx :
Z ∗ Z
∗ L ∗
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
(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.
13
5.13
φ(x) = sin 2πx satisfies the differential equation and boundary conditions.
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
4π
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
4π
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.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
φ, we find
1 Z 1 Z 1
′ ′ ′ 2
−φ(x)u (x) + (φ (x)u (x) + ω φu) dx = φ(x)f (x) dx,
0 0 0
1 Z 1 Z 1
′ ′ ′′ 2
(−φ(x)u (x) + φ (x)u(x)) + (−φ (x) + ω φ)u(x) dx = φ(x)f (x) dx,
0 0 0
Z 1
2φ(1) − φ′ (0) = φ(x)f (x) dx,
0
14
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.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
The coefficient of w′ can be made to vanish by choosing M such that 2M ′ = aM in which case
2M ′′ = a′ M + aM ′ = (a′ + 12 a2 )M and
M ′′ − aM ′ − bM = − 21 (2b + 12 a2 − a′ )M.
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)
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.
15
5.23
With φn = cos(n − 21 )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.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
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.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.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
2 2
|u(1)| + ′
|u (x)| dx = λ w(x)|u(x)|2 dx
0 0
16
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.31
This requires on the insertion of a factor w(x) in each of the integrands in the solution of
Exercise 5.11.
5.33
Choosing u = φm (x) and v = φn (x) so that
17
Exercises 6 Finite difference methods in R1
6.1
Using Taylor series expansions with remainder terms, (6.13) with x = xm becomes
− +
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,
1 2 ′′′′
v ′′ (xm ) = h−2 v(xm+1 ) − 2v(xm ) + v(xm−1 ) − 12 h v (ξm ).
6.3
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.7
am = h−2 , bm = 2h−2 + x2m , cm = h−2 , dm = xm for m = 1, 2, . . . , M − 1.
18
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.9
Since Φ(x) is a quadratic function of x, h−2 δ 2 Φm = Φ′′ (xm ) = 2c. Also,
Consequently,
6.11
The ODE is approximated by Lh Um = fm for m = 1, 2, . . . , M − 1, where
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.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,
19
since −εu′′ + 2u′ = f . The order of consistency is therefore first order. Also
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.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),
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.
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
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.
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.
20
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.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.
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
21
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.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.
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 = β
β − α8−M α − β8−M
A = 8−M , B=
1 − 8−2M 1 − 8−2M
leading to
1
Um = −2M
8m−M (β − α8−M ) + 8m (α − β8−M ) .
1−8
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. 4. 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
22
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 δ Um + σ 2 Um
−2 2
(σ + 21 σ 2 h)UM + h−1 △− UM
−1 1 2 −1
(h + 2 hσ )U0 − h U1 , m = 0,
−2 2 2
= h (−Um−1 + (2 + σ h )Um − Um+1 ), m = 1, 2, . . . , M − 1,
(σ + 21 σ 2 h + h−1 )UM − h−1 UM−1 , m = 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 )
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.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:
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.31
−1
−1 1 2 −1
..
.. .. 1 .
−1 . . . . . .
. .
T
LL = h −2
.. = .
−1 1
. −1
..
.
2 −1
−1 ρ 1 −1
−1 1 + ρ2
ρ
23
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.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.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
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=xm for v(x) = 1, (x − xm ) and (x − xm )2 . Since Mh := Lh − L
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
24
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=x
m
Lh (x − xm )2 = −h2 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).
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 + .
−32(x − 12 )4 , 1/2 < x ≤ 1
These are shown in Fig. 5. These boundary value problems are solved numerically using the
1
Figure 5: 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. 6. 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.
25
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
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 6: 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).
26
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.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.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
1d
2 dt u2 dx = − x(ux )2 dx ≤ 0.
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.
7.7
Differentiating under the integral sign we find
Z 1 Z 1
d
(ux )2 dx = 2 ux uxt dx
dt 0 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.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
Ω
27
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.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
−∞ −∞
since u and its derivatives tend to zero at ±∞. Therefore M (t) is constant in time.
28
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 Z 1
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.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
g(x) − g(1 − x)
g ′ (c) = = 0, 1 − x < c < x.
2x − 1
29
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),
and therefore
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.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
n+1
=− g(s) cos nπ sin nπs ds = (−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.7
From Exercise 4.20
1
sin θ uθ = cos θf ′ (r),
ux = cos θ ur −
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.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
30
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
2 2
sin 21 (2m − 1)π = (−1)m−1 , when n = 2m − 1.
(2m − 1) π (2m − 1)2 π 2
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 t sin nπr
u(r, t) = 2 (−1)n−1 e−n .
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.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
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.
31
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
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 Z
2 b x 2b 1 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.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
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
32
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.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
8.23
Substituting u(x, y) = X(x)Y (y) into the PDE and dividing by X(x)Y (y) gives
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)
33
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
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.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
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
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
34
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
4n −4n 8
Dn (2 −2 )= 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.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
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
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.
35
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 .
36
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
2 2 −t
giving, in terms of (t, k): x = k + t and u = A(k)e .
In terms of (x, t): u = A(x2 − t2 )e−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.
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.
Pd
The bound on the solution of (9.6) follows by applying the triangle inequality to u = j=1 uj :
Pd
kuk2 ≤ j=1 kuj k2 .
When A is symmetric its eigenvalues are mutually orthogonal and κ2 (V ) = 1.
9.5
At P1 , where X1 > 2T1 , (see Fig. 7, 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)
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. 7, Centre)
37
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 7: 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.
(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)
(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.7
The three families of characteristics are:
In order to find the solution at P(X, T ) withX < T (see Fig. 7, 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)
38
BP: This is a Γ2 characteristic x + t = X + T along which v + w is constant. Thus,
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
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
39
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.11
Suppose that P has coordinates (X, Y ).
(a) For X > 2Y > 0 (see Fig. 8) 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 8: 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
F (−y)+G(−2y) = f0 (y), F ′ (−y)+G′ (−2y) = f1 (y) ⇒ −F (−y)− 21 G(−2y) = f1 (s) ds
40
(c) For 2Y > X > Y > 0 (see Fig. 8) 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
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.13
The operator associated with the PDE utt + utx − 2uxx = t factorizes:
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
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
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
41
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
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 ).
∗ ∗ ∗
u2 + 2xu − e−2t = 0
e−2t
u= √ .
x + x2 + e−2t
9.19
Under the change of variables s = −x, v(s, t) = −u(−s, t) the PDE becomes
42
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
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.
(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.
43
(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. 9). The appropriate Rankine-Hugoniot condition (see Example 9.11) is
s′ (t) = 12 (u+ + u− )
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
u(x, t) = 1+x
1+t , −1 < x < s(t)
0, x > s(t).
2
sho c
t=1
1 t = 1/2
t=0
−1 0 1 2 x −1 0 1 2 x
Figure 9: The characteristics (left) and solutions at selected times (right) for Exercise 9.21.
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.23
(
1
g(x) = 1 −
1
= 1+x , x≥0
1 + |x| 2x−1
x−1 x < 0.
44
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.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.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.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.
45
u u
2 t = 1/3 2 t=2
1 1
x x
1 2 3 4 1 2 3 4
1
Figure 10: The solution of Exercise 9.29 when t = 3 (left) and t = 2 (right). The dashed lines
show the initial condition.
46
Exercises 10 Finite difference methods for elliptic PDEs
10.1
1 2 4 1 2 4
We use the replacements uxx = hx−2 δx2 u − 12 hx ∂x u + O(h4x ) and uyy = hy−2 δy2 u − 12 hy ∂y u + O(h4y )
and so
∇2 u = uxx + uyy = hx−2 δx2 u + h−2 2 1 2 4 2 4 4
y δy u − 12 hx ∂x u + hy ∂y u + O(hx ) + O(hy ).
4
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 )
then, in the natural column ordering of points, Au = f . This reduces to the standard 5–point
formula (10.6) when θ = 1.
10.3
47
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
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
L+ 2 +
h uℓ,m = −∇ uℓ,m + Rℓ,m ,
where
R+ 1 2
ℓ,m = − 12 h ∂x4 u + ∂y4 u + O(h4 )
+
so it then follows from L× 1 −2 2 2
h Uℓ,m = Lh Uℓ,m − 2 h δx δy Uℓ,m that
+
L×
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
1 2
= −∇2 u − 12 h ∂x4 u + 6∂x2 ∂y2 u + ∂y4 u + O(h4 ).
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 u = 0
−1 4 −1 b5 + b7
−1 4
b10 + b12 + b14
−1 −1 4 b9 + b11
−1 4 b6 + b8 + b10
48
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.
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.
49
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 ).
Subtracting these gives Ch2 = 4(Q(h/2) − Q(h))/3 + O(h3 ) and so
10.9
Suppose that the Neumann BC −ux = g(0, y) is approximated at y = ym by the second-order
central difference formula
10.11
The local truncation error associated with (10.24) is
Rh 0,M = −h−1 △+x u0,M + h−1 △−y u0,M − 21 hf0,M − g(1+ , 0) − g(0− , 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.13
50
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
3 4 5 6 7
u = [U1,1 , U2,1 , U2,2 , U3,1 , U3,2 , U3,3 ]T 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 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.
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
51
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.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 = 41 : (uxx )3 ≈ 64
9
32
1 (u8 − u3 ) − 4(u3 − u18 ) ,
2
P5 : h+ = 32 , h− = h = 41 : (uxx )5 ≈ 10
64 32
2 (u10 − u5 ) − 4(u5 − u2 ) ,
3
P6 : h+ = 32 , h− = h = 41 : (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 ) .
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
52
where U13 = [4x(9 − 8x)]x=3/4 = 9. These provide 6 equations in the 6 unknowns.
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 )
10.21
With 1 1 π π 2
u(r, θ) = r2 log( ) sin 2θ + ( − θ)r2 cos 2θ − r
π r 4 4
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.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 )
− 12 γ(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 ) .
53
This is of the form
8
X
Lh uP = hx−1 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)
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.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
L+
h Uℓ,m = −εh (δx + δy2 )Uℓ,m + ph−1 △+x Uℓ,m
−2 2
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,
54
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 − 12 h uxxxx m + O(k 2 ) + O(h4 )
1 2
n
= 1 h2 (r − 1 )uxxt + O(k 2 ) + O(h4 ).
2 6 m
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)
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)
n
where un = [U1n , U2n , . . . , UM−1 ]T . The coefficient matrix is clearly the same as that in the BTCS
scheme (11.25) with r replaced by −r.
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 ))
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. 11.
55
t P(X, T )
bc
b b b
A B
Interval of dependence
Figure 11: Stencil (left) and domain of dependence (right) for Exercise 11.5.
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.9
The local truncation error of the BTCS approximation (11.22) is, by definition,
n 1 n+1 1 n+1
Rh m := um − unm − rδx2 un+1
m = (um − unm ) − h−2 δx2 un+1
m
k k
and, using unm = un+1m − kut |n+1
m + 21 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+1
m − 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 − 12 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.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 n+1
+ k −1 (Um n
− Um ) = 0 then U is either constant or else attains its maximum and
56
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.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
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 − θ)
f n = r[(1 − θ)g0 (tn ) + θg0 (tn+1 ), 0, . . . , 0, (1 − θ)g1 (tn ) + θg1 (tn+1 )]T .
11.15
Replacing U by −U in Theorem 11.16 we deduce that
n+1
− 12 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 n
− Um ) = 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
57
is the same constant on Γτ . So, when U0n = UM
n
= 0, the maximum absolute value must occur
at t = 0.
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 ′′
kU· kh,2 = h |Um |2 ≤ 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 .
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.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
58
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. 12 (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. 12 (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 12: 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.23
n
We substitute Um = ξ n eiκmh into the finite difference scheme
n+1 n n n
Um = 31 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
59
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.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).
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,
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.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 .
60
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
j+1
|Vℓ,m | = rUℓ,m−1 j
+ (1 − 2r)Uℓ,m j
+ 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
j+1
|Uℓ,m | = rVℓ−1,m j
+ (1 − 2r)Vℓ,m j
+ 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.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
+ n
h △r U m
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
61
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.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 U6 − U4 − 9 .
3 11
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).
62
Exercises 12 Finite difference methods for hyperbolic PDEs
12.1
Differentiating the PDE ut + aux = 0 with respect to t gives:
as required.
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
thus ξ( 12 π) = 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.5
so its stencil is the same as that of the Lax-Wendroff method (see Fig. 12.6 (left)).
(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 − 21 δx2 unm
= ut + 21 kutt + O(k 2 ) + a ux + 16 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)
Therefore,
|ξ|2 − 1 = cos2 θ − 1 + c2 sin2 θ = −(1 − c2 ) sin2 θ
and |ξ|2 ≤ 1 for all θ ∈ [−π, π] if, and only if, −1 ≤ c ≤ 1.
2 Note 1
that this can also be deduced from (12.26) by replacing Um
n by the average
2
(Um−1
n + Um+1
n ).
63
(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 − 21 (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.7
n
We substitute Um = ξ n eiκmh into the Lax-Wendroff method scheme
n+1
Um = [1 − c△x + 21 c2 δx2 ] Um
n
n+1 n
and use the relationships Um = ξUm , (11.47b) and (11.47c) to give
n n n
ξUm = Um − ic sin(κh)Um − 2c2 sin2 ( 12 κh)Um
n
⇒ ξ = 1 − ic sin κh − 2c2 sin2 21 κh.
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
n+1 n n n
Um = α−2 Um−2 + α−1 Um−1 + α0 Um gives the Warming–Beam scheme (12.64).
12.11
64
(b) Differentiating the PDE with respect to t and x gives
so, subtracting a × second from the first equation leads to utt = a2 uxx + ε(uxxt − auxxx)
and, therefore, n
Rh = 1 kε(uxxt − auxxx) + O(k 2 ) + O(h2 ).
m 2
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
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 ,
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. 13 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.
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.
65
k
2ε/a2
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 − 21 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 )
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 ).
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.
66
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
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 θ.
(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
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.
67
12.17
(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.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.21
The amplification factor of the method (12.5) is
ν
X
ξ= αj eijκh
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 )
68
(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),
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),
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.23
When c > 0, characteristics travel from left-to-right (see Fig. 14, 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
12.25
The Lax-Wendroff method is applied at the points (xm , nk), 0 < m < M , n ≥ 0. At these points
69
→ ← Figure 14: 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.
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
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
Setting
1−M
1+c c+1
C = 12 (1 − c)2 h2 − , ρ=
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.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.
70
(a) Applying the FTBS method to (12.66a) and the FTBS method to (12.66b) leads to
n+1
(Um − Vmn+1 ) = (Um
n
− Vmn ) − c△−x (Um
n
− Vmn ) = c(Um−1
n 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 )
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
ϕ n
= ( nm − ϕnm−1 △−x Um n
,
ρm
12.31
The minmod limiter is a special case of the Chakravarthy–Osher limiter.
Chakravarthy–Osher:
71
ϕ(ρ) Superbee
2
ψ Chakravarthy–Osher
0
0 1 2 3 ρ
Superbee:
72
http://www.springer.com/978-3-319-22568-5