0.2

0.15

0.1

0.05

0

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

FIGURE 12.1. Green™s function for three di¬erent values of x: x = 1/4 (solid

line), x = 1/2 (dashed line), x = 3/4 (dash-dotted line)

12.2 Finite Di¬erence Approximation 533

An interesting property of the solution u is that if f ∈ C 0 ([0, 1]) is a

nonnegative function, then u is also nonnegative. This is referred to as the

monotonicity property, and follows directly from (12.3), since G(x, s) ≥ 0

for all x, s ∈ [0, 1]. The next property is called the maximum principle and

states that if f ∈ C 0 (0, 1),

1

¤

u f (12.5)

∞ ∞

8

= max |u(x)| is the maximum norm. Indeed, since G is non-

where u ∞

0¤x¤1

negative,

1 1

1

|u(x)| ¤ G(x, s)|f (s)| ds ¤ f x(1 ’ x) f

G(x, s) ds =

∞ ∞

2

0 0

from which the inequality (12.5) follows.

12.2 Finite Di¬erence Approximation

n

We introduce on [0, 1] the grid points {xj }j=0 given by xj = jh where

n ≥ 2 is an integer and h = 1/n is the grid spacing. The approximation to

n

the solution u is a ¬nite sequence {uj }j=0 de¬ned only at the grid points

(with the understanding that uj approximates u(xj )) by requiring that

uj+1 ’ 2uj + uj’1

’ for j = 1, . . . , n ’ 1

= f (xj ), (12.6)

h2

and u0 = un = 0. This corresponds to having replaced u (xj ) by its second

order centred ¬nite di¬erence (10.65) (see Section 10.10.1).

If we set u = (u1 , . . . , un’1 )T and f = (f1 , . . . , fn’1 )T , with fi = f (xi ),

it is a simple matter to see that (12.6) can be written in the more compact

form

Afd u = f , (12.7)

where Afd is the symmetric (n ’ 1) — (n ’ 1) ¬nite di¬erence matrix de¬ned

as

Afd = h’2 tridiagn’1 (’1, 2, ’1). (12.8)

This matrix is diagonally dominant by rows; moreover, it is positive de¬nite

since for any vector x ∈ Rn’1

n’1

’2

(xi ’ xi’1 )2 .

T

x2 x2

x Afd x = h + +

1 n’1

i=2

534 12. Two-Point Boundary Value Problems

This implies that (12.7) admits a unique solution. Another interesting prop-

erty is that Afd is an M-matrix (see De¬nition 1.25 and Exercise 2), which

guarantees that the ¬nite di¬erence solution enjoys the same monotonic-

ity property as the exact solution u(x), namely u is nonnegative if f is

nonnegative. This property is called discrete maximum principle.

In order to rewrite (12.6) in operator form, let Vh be a collection of discrete

functions de¬ned at the grid points xj for j = 0, . . . , n. If vh ∈ Vh , then

vh (xj ) is de¬ned for all j and we sometimes use the shorthand notation vj

0

instead of vh (xj ). Next, we let Vh be the subset of Vh containing discrete

functions that are zero at the endpoints x0 and xn . For a function wh we

de¬ne the operator Lh by

wj+1 ’ 2wj + wj’1

(Lh w)(xj ) = ’ j = 1, . . . , n ’ 1

, (12.9)

h2

and reformulate the ¬nite di¬erence problem (12.6) equivalently as: ¬nd

uh ∈ Vh such that

0

for j = 1, . . . , n ’ 1.

(Lh uh )(xj ) = f (xj ) (12.10)

Notice that, in this formulation, the boundary conditions are taken care of

by the requirement that uh ∈ Vh .0

Finite di¬erences can be used to provide approximations of higher-order

di¬erential operators than the one considered in this section. An example

is given in Section 4.7.2 where the ¬nite di¬erence centred discretization of

the fourth-order derivative ’u(iv) (x) is carried out by applying twice the

discrete operator Lh (see also Exercise 11). Again, extra care is needed to

properly handle the boundary conditions.

12.2.1 Stability Analysis by the Energy Method

For two discrete functions wh , vh ∈ Vh we de¬ne the discrete inner product

n

(wh , vh )h = h ck wk vk ,

k=0

with c0 = cn = 1/2 and ck = 1 for k = 1, . . . , n ’ 1. This is nothing but the

composite trapezoidal rule (9.13) which is here used to evaluate the inner

1

product (w, v) = 0 w(x)v(x)dx. Clearly,

1/2

vh = (vh , vh )h

h

is a norm on Vh .

Lemma 12.1 The operator Lh is symmetric, i.e.

∀ wh , vh ∈ Vh ,

0

(Lh wh , vh )h = (wh , Lh vh )h

12.2 Finite Di¬erence Approximation 535

and is positive de¬nite, i.e.

(Lh vh , vh )h ≥ 0 ∀vh ∈ Vh ,

0

with equality only if vh ≡ 0.

Proof. From the identity

wj+1 vj+1 ’ wj vj = (wj+1 ’ wj )vj + (vj+1 ’ vj )wj+1 ,

upon summation over j from 0 to n ’ 1 we obtain the following relation for all

wh , vh ∈ Vh

n’1 n’1

(wj+1 ’ wj )vj = wn vn ’ w0 v0 ’ (vj+1 ’ vj )wj+1

j=0 j=0

which is referred to as summation by parts. Using summation by parts twice, and

setting for ease of notation w’1 = v’1 = 0, for all wh , vh ∈ Vh we obtain

0

n’1

’1

= ’h [(wj+1 ’ wj ) ’ (wj ’ wj’1 )] vj

(Lh wh , vh )h

j=0

n’1

= h’1 (wj+1 ’ wj )(vj+1 ’ vj ).

j=0

From this relation we deduce that (Lh wh , vh )h = (wh , Lh vh )h ; moreover, taking

wh = vh we obtain

n’1

’1

(vj+1 ’ vj )2 .

(Lh vh , vh )h = h (12.11)

j=0

This quantity is always positive, unless vj+1 = vj for j = 0, . . . , n ’ 1, in which

3

case vj = 0 for j = 0, . . . , n since v0 = 0.

For any grid function vh ∈ Vh we de¬ne the following norm

0

± 1/2

n’1 2

vj+1 ’ vj

|||vh |||h = h . (12.12)

h

j=0

Thus, (12.11) is equivalent to

(Lh vh , vh )h = |||vh |||2 for all vh ∈ Vh .

0

(12.13)

h

Lemma 12.2 The following inequality holds for any function vh ∈ Vh

0

1

¤ √ |||vh |||h .

vh (12.14)

h

2

536 12. Two-Point Boundary Value Problems

Proof. Since v0 = 0, we have

j’1

vk+1 ’ vk

for all j = 1, . . . , n ’ 1.

vj = h

h

k=0

Then,

2

j’1

vk+1 ’ vk

2 2

vj =h .

h

k=0

Using the Minkowski inequality

2

m m

¤m p2

pk (12.15)

k

k=1 k=1

which holds for every integer m ≥ 1 and every sequence {p1 , . . . , pm } of real

numbers (see Exercise 4), we obtain

n’1 j’1

n’1

vk+1 ’ vk 2

¤h

2 2

vj j .

h

j=1 j=1 k=0

Then for every vh ∈ Vh we get

0

n’1 n’1 n’1

(n ’ 1)n

vk+1 ’ vk 2

¤h |||vh |||2 .

vh 2 2 2

= h2

=h vj jh

h h

h 2

j=1 j=1 k=0

3

Inequality (12.14) follows since h = 1/n.

(1)

Remark 12.1 For every vh ∈ Vh , the grid function vh whose grid values

0

are (vj+1 ’ vj )/h, j = 0, . . . , n ’ 1, can be regarded as a discrete derivative

of vh (see Section 10.10.1). Inequality (12.14) can thus be rewritten as

1 (1)

¤ √ vh ∀vh ∈ Vh .

0

vh h h

2

It can be regarded as the discrete counterpart in [0, 1] of the following

Poincar´ inequality: for every interval [a, b] there exists a constant CP > 0

e

such that

¤ CP v (1)

v (12.16)

L2 (a,b) L2 (a,b)

for all v ∈ C 1 ([a, b]) such that v(a) = v(b) = 0 and where · is the

L2 (a,b)

norm in L2 (a, b) (see (8.25)).

Inequality (12.14) has an interesting consequence. If we multiply every

equation of (12.10) by uj and then sum for j from 0 on n ’ 1, we obtain

(Lh uh , uh )h = (f, uh )h .

12.2 Finite Di¬erence Approximation 537

Applying to (12.13) the Cauchy-Schwarz inequality (1.14) (valid in the

¬nite dimensional case), we obtain

|||uh |||2 ¤ fh uh

h h

h

where fh ∈ Vh is the grid function such that fh (xj ) = f (xj ) for all j =

1, . . . , n.

Owing to (12.14) we conclude that

1

¤

uh fh (12.17)

h h

2

from which we deduce that the ¬nite di¬erence problem (12.6) has a unique

solution (equivalently, the only solution corresponding to fh = 0 is uh = 0).

Moreover, (12.17) is a stability result, as it states that the ¬nite di¬erence

solution is bounded by the given datum fh .

To prove convergence, we ¬rst introduce the notion of consistency. Ac-

cording to our general de¬nition (2.13), if f ∈ C 0 ([0, 1]) and u ∈ C 2 ([0, 1])

is the corresponding solution of (12.1)-(12.2), the local truncation error is

the grid function „h de¬ned by

„h (xj ) = (Lh u)(xj ) ’ f (xj ), j = 1, . . . , n ’ 1. (12.18)

By Taylor series expansion and recalling (10.66), one obtains

„h (xj ) = ’h’2 [u(xj’1 ) ’ 2u(xj ) + u(xj+1 )] ’ f (xj )

h2 (iv)

= ’u (xj ) ’ f (xj ) + (u (ξj ) + u(iv) (·j )) (12.19)

24

2

h

(u(iv) (ξj ) + u(iv) (·j ))

=

24

for suitable ξj ∈ (xj’1 , xj ) and ·j ∈ (xj , xj+1 ). Upon de¬ning the discrete

maximum norm as

vh h,∞ = max |vh (xj )|,

0¤j¤n

we obtain from (12.19)

f ∞2

¤

„h h (12.20)

h,∞

12

provided that f ∈ C 2 ([0, 1]). In particular, lim „h = 0 and there-

h,∞

h’0

fore the ¬nite di¬erence scheme is consistent with the di¬erential problem

(12.1)-(12.2).

Remark 12.2 Taylor™s expansion of u around xj can also be written as

h2 h3

u(xj ± h) = u(xj ) ± hu (xj ) + u (xj ) ± u (xj ) + R4 (xj ± h)

2 6

538 12. Two-Point Boundary Value Problems

with the following integral form of the remainder

xj +h

(xj + h ’ t)2

R4 (xj + h) = (u (t) ’ u (xj )) dt,

2

xj

xj

(xj ’ h ’ t)2

R4 (xj ’ h) = ’ (u (t) ’ u (xj )) dt.

2

xj ’h

Using the two formulae above, by inspection on (12.18) it is easy to see

that

1

(R4 (xj + h) + R4 (xj ’ h)) .

„h (xj ) = (12.21)

h2

For any integer m ≥ 0, we denote by C m,1 (0, 1) the space of all functions

in C m (0, 1) whose m-th derivative is Lipschitz continuous, i.e.

|v (m) (x) ’ v (m) (y)|

¤ M < ∞.

max

|x ’ y|

x,y∈(0,1),x=y

Looking at (12.21) we see that it su¬ces to assuming that u ∈ C 3,1 (0, 1)

to conclude that

„h h,∞ ¤ M h2

which shows that the ¬nite di¬erence scheme is consistent with the di¬er-

ential problem (12.1)-(12.2) even under a slightly weaker regularity of the

exact solution u.