Chapter 11
MATH 6371
Annalisa Quaini
[email protected]
Office : PGH 662
Lecture : TuTh 2:30 PM - 4:00 PM in S 101
Office hours : Th 1:00 PM - 2:30 PM or BY APPOINTMENT
A. Quaini, UH MATH 6371 1/6
Chapter 12
Two-Point Boundary Value
Problems: A Model Problem
Section 12.1
c 2021, A. Quaini, UH MATH 6371 2/7
Chapter 12
A model problem
By integrating twice and with some manipulation, it is possible to
show that the solution to (MP) is
c 2021, A. Quaini, UH MATH 6371 3/7
Chapter 12
A model problem
Definition
Function G is called called Green’s function for (MP).
The Green’s function G (x, s) is:
piecewise linear in x for fixed s and viceversa
continuous
symmetric (G (x, s) = G (s, x) ∀x, s ∈ [0, 1])
non-negative
null if x or s are equal to 1 or 0
R1 1
0 G (x, s)ds = 2 x(1 − x)
c 2021, A. Quaini, UH MATH 6371 4/7
Chapter 12
A model problem
For every f ∈ C 0 ([0, 1]) there is a unique solution u ∈ C 2 ([0, 1]),
which admits representation (SOL).
In general, if f ∈ C m ([0, 1]) for some m ≥ 0, then u ∈ C m+2 ([0, 1]).
If f ∈ C 0 ([0, 1]), u satisfies the two following important properties:
1. Monotonicity: if f is a non-negative function, then u is also
non-negative. It follows from (SOL) since G (x, s) ≥ 0,
∀x, s ∈ [0, 1].
2. Maximum principle:
c 2021, A. Quaini, UH MATH 6371 5 / 24
Chapter 12
Finite Difference Approximation
Section 12.2
c 2021, A. Quaini, UH MATH 6371 6/7
Chapter 12
Finite Difference Approximation
Assume f ∈ C 2 ([a, b]). Let’s introduce a partition of interval [a, b]
with discretization step h.
Let’s recall what we learned about discretization of functions
of time t. Obviously, that can be extended to functions of
space x.
c 2021, A. Quaini, UH MATH 6371 7 / 24
Let t0 , t1 , . . . , tNh , Nh + 1 be equidistributed nodes at [t0 , tNh ]. Let
h = (tNh − t0 )/Nh be the distance between two consecutive nodes.
Let (Dy)n be an approximation of y ′ (tn ). We say
• Forward finite difference if
y(tn+1 ) − y(tn )
(Dy)P
n = , n = 0, . . . , Nh − 1 (8)
h
• Backward finite difference if
y(tn ) − y(tn−1 )
(Dy)R
n = , n = 1, . . . , Nh (9)
h
• Centered finite difference if
y(tn+1 ) − y(tn−1 )
(Dy)C
n = , n = 1, . . . , Nh − 1 (10)
2h
Ordinary differential equations – p. 9/85
Ordinary differential equations – p. 10/85
The error in the finite difference
If y ∈ C 2 (R) for all t ∈ R, then there exists ξn between tn and t such that
(using the Taylor expansion)
y ′′ (ξn )
′
y(t) = y(tn ) + y (tn )(t − tn ) + (t − tn )2 . (11)
2
• For t = tn+1 in (11), we obtain
′ y ′′ (ξn ) 2
y(tn+1 ) − y(tn ) = y (tn )h + h ,
2
so the forward finite difference is given by
y(tn+1 ) − y(tn ) h
(Dy)P
n = = y ′ (tn ) + y ′′ (ξn ).
h 2
In particular,
1
|y ′ (tn ) − (Dy)P
n | ≤ Ch, where C= max |y ′′ (t)|.
2 t∈[tn ,tn+1 ]
Ordinary differential equations – p. 11/85
• For t = tn−1 in (11), we obtain
y ′′ (ξn )
′
y(tn−1 ) − y(tn ) = y (tn )(−h) + (−h)2 ,
2
so the backward finite difference is given by
y(tn ) − y(tn−1 ) h
(Dy)R
n = = y ′ (tn ) − y ′′ (ξn ).
h 2
In particular,
|y ′ (tn ) − (Dy)R
n | ≤ Ch,
where C = 1
2
maxt∈[tn−1 ,tn ] |y ′′ (t)|.
Ordinary differential equations – p. 12/85
• For t = tn+1 and t = tn−1 with expansion of order 2 (if y ∈ C 3 (R))
′ y ′′ (tn ) 2 y ′′′ (ξn1 ) 3
y(tn+1 ) = y(tn ) + y (tn ) h + h + h ,
2 6
′ y ′′ (tn ) 2 y ′′′ (ξn2 ) 3
y(tn−1 ) = y(tn ) − y (tn ) h + h − h ,
2 6
we obtain
′ y ′′′ (ξn1 ) + y ′′′ (ξn2 ) 3
y(tn+1 ) − y(tn−1 ) = 2y (tn )h + h ,
6
and
C y(tn+1 ) − y(tn−1 ) ′ y ′′′ (ξn1 ) + y ′′′ (ξn2 ) 2
(Dy)n = = y (tn ) + h .
2h 12
It has the following estimation
′ C 2
|y (tn ) − (Dy)n | ≤ Ch ,
where C = 1
6 maxt∈[tn−1 ,tn+1 ] |y ′′′ (t)|.
Ordinary differential equations – p. 13/85
Chapter 12
Finite Difference Approximation
Concerning the second order derivative, using Taylor’s expansion if
f ∈ C 4 ([a, b]) we get
f (xi+1 ) − 2f (xi ) + f (xi−1 ) h2 (4)
f 00 (xi ) = − f (x i + θ i h) + f (4)
(xi − ωi h)
h2 24
for 0 < θi , ωi < 1. Thus, we can derive the following centered
finite difference scheme for the second derivative
f (xi+1 ) − 2f (xi ) + f (xi−1 )
d 2 fi =
h2
with error
h2 (4)
f 00 (xi ) − d 2 fi = − f (xi + θi h) + f (4) (xi − ωi h) .
24
c 2021, A. Quaini, UH MATH 6371 8 / 24
Chapter 12
Finite Difference Approximation
Going back to (MP), the approximation of the solution u is a finite
sequence {uj }nj=0 defined only at the grid points (u(xj ) ≈ uj ) s.t.:
uj+1 − 2uj + uj−1
− = f (xj ) j = 1, . . . , n − 1,
h2
u0 = 0,
un = 0.
We have replaced u 00 (xj ) by its centered finite difference. So, we
have:
c 2021, A. Quaini, UH MATH 6371 9 / 24
Chapter 12
Finite Difference Approximation
Set u = (u1 , . . . , un−1 )T and f = (f1 , . . . , fn−1 )T . the matrix form
of (FDA) is:
c 2021, A. Quaini, UH MATH 6371 10 / 24
Chapter 12
Finite Difference Approximation
Afd is tridiagonal, symmetric, diagonally dominant by rows and
columns, and positive definite. Moreover, Afd has another
interesting property: the finite difference solution enjoys the same
monotonicity property as the exact solution, that is u is
non-negative if f is non-negative. This is called discrete
maximum principle.
c 2021, A. Quaini, UH MATH 6371 11 / 24
Chapter 12
Notation
Vh is a collection of discrete functions defined on the grid
points xj , j = 0, . . . , n. If vh ∈ Vh , vh (xj ) = vj is defined for
all j.
Vh0 is the the subset of Vh containing discrete functions that
are zero at the endpoints x0 and xn .
For a function wh ∈ Vh0 , define the operator Lh :
With this notation, (FDA) can be rewritten as: find uh ∈ Vh0 s.t.
(Lh uh )(xj ) = f (xj ) j = 1, . . . , n − 1.
Note: the boundary conditions are taken into account by the
requirement uh ∈ Vh0 .
c 2021, A. Quaini, UH MATH 6371 12 / 24
Chapter 12
Stability Analysis by the Energy Method
Definition
For vh , wh ∈ Vh , the discrete inner product is given by:
n
X
(wh , vh )h = h ck wk vk ,
k=0
where c0 = cn = 12 , ck = 1 for k = 1, . . . , n − 1. The associated
norm is
||vh ||h = ((vh , vh )h )1/2 .
Notice that the discrete inner product comes from applying the
compositeR trapezoidal rule to evaluate the inner product
1
(w , v ) = 0 v (x)w (x)dx.
c 2021, A. Quaini, UH MATH 6371 13 / 24
Chapter 12
Stability Analysis by the Energy Method
c 2021, A. Quaini, UH MATH 6371 14 / 24
Chapter 12
Stability Analysis by the Energy Method
It is possible to show that quantity
is positive unless vj+1 = vj for j = 0, . . . , n − 1, in which case
vj = 0 for j + 0, . . . , n since v0 = 0. Since this is a non-negative
function, we can define with it a norm for any grid function
vh ∈ Vh0 :
c 2021, A. Quaini, UH MATH 6371 15 / 24
Chapter 12
Stability Analysis by the Energy Method
Note: Remember that
vj+1 − vj
≈ vh0 (xj ) j = 0, . . . , n − 1.
h
(1)
Let us denote by vh the grid function whose grid values are
vj+1 −vj
h , j = 0, . . . , n − 1, ∀vh ∈ Vh0 . The inequality (12.14) can be
written as
1 (1)
||vh ||h ≤ √ ||vh ||h .
2
c 2021, A. Quaini, UH MATH 6371 16 / 24
Chapter 12
Stability Analysis by the Energy Method
This inequality can be regarded as the discrete counterpart in [0, 1]
of the Poincaré inequality: for every interval [a, b], ∃Cp > 0 s.t.
||v ||L2 (a,b) ≤ Cp ||v (1) ||L2 (a,b)
∀v ∈ C 1 ([a, b]) s.t. v (a) = v (b) = 0.
c 2021, A. Quaini, UH MATH 6371 17 / 24
Chapter 12
Stability Analysis by the Energy Method
Let’s go back to
uj+1 − 2uj + uj1
− = f (xj )
h2
(Lh uh )(xj ) = f (xj ).
If we multiply every equation by uj , then multiply by h, and finally
sum for j form 1 to n − 1, we obtain:
(Lh uh , uh )h = (fh , uh )h .
Here, fh ∈ Vh is the grid function s.t. fh (xj ) = f (xj ), ∀j = 0, . . . , n.
c 2021, A. Quaini, UH MATH 6371 18 / 24
Chapter 12
Stability Analysis by the Energy Method
We can apply the finite dimensional Cauchy-Schwarz ineq. to the
rhs:
(f , vh )h ≤ ||fh ||h ||uh ||h .
Thus,
|||uh |||2h ≤ ||fh ||h ||uh ||h .
Applying lemma 12.2 to this ineq.:
2||uh ||2h ≤ |||uh |||2h ≤ ||fh ||h ||uh ||h .
Thus:
1
||uh ||h ≤ ||fh ||h .
2
This is a stability result: it states that the finite difference
solution is bounded by the given datum fh . Moreover, it shows
that the only solution corresponding to fh = 0 is uh = 0.
c 2021, A. Quaini, UH MATH 6371 19 / 24
Chapter 12
Stability Analysis by the Energy Method
Let’s check consistency now. If f ∈ C 0 ([0, 1]) and u ∈ C 2 ([0, 1]) is
the corresponding exact solution of (MP), the local truncation
error is the grid function τh defined by:
τh (xj ) = (Lh u)(xj ) − f (xj ) j = 1, . . . , n − 1.
Remember:
c 2021, A. Quaini, UH MATH 6371 20 / 24
Chapter 12
Stability Analysis by the Energy Method
Using this, we have:
τh (xj ) = (Lh u)(xj ) − f (xj )
c 2021, A. Quaini, UH MATH 6371 21 / 24
Chapter 12
Stability Analysis by the Energy Method
We define the discrete maximum norm:
c 2021, A. Quaini, UH MATH 6371 22 / 24
Chapter 12
Stability Analysis by the Energy Method
c 2021, A. Quaini, UH MATH 6371 23 / 24
Chapter 12
Stability Analysis by the Energy Method
From this inequality, we see that:
lim ||τh ||h,∞ = 0,
h→0
which means that the finite difference scheme is consistent with
differential problem (MP).
Note: Let eh = u − uh be the discretization error grid function.
Then:
Lh eh = Lh u − Lh uh = Lh u − fh = τh .
c 2021, A. Quaini, UH MATH 6371 24 / 24
Chapter 12
Convergence Analysis
For a given point xk , define a grid point function G k ∈ Vh0 as the
solution of problem:
Lh G k = d k ,
where d k ∈ Vh0 satisfies d k (xj ) = δkj , 1 ≤ j ≤ n − 1. G k is a
discrete Green’s function.
It can be shown that
G k (xj ) = hG (xj , xk ).
c 2021, A. Quaini, UH MATH 6371 25 / 29
Chapter 12
Convergence Analysis
The finite difference solution can be characterized by the discrete
Green’s function:
n−1
X
uh = f (xk )G k
k=1
and
n−1
X
uh (xj ) = h f (xk )G (xj , xk ).
k=1
c 2021, A. Quaini, UH MATH 6371 26 / 29
Chapter 12
Convergence Analysis
Proof:
|uh (xj )|
c 2021, A. Quaini, UH MATH 6371 27 / 29
Chapter 12
Convergence Analysis
This is a stability result in the discrete maximum norm for the
finite difference solution uh .
We have seen that Lh eh = τh . This means that:
n−1
X
eh = h G (xj , xk )τh (xk ).
k=1
So, following the same argument used for uh , we can show that:
1
||eh ||h,∞ ≤ ||τh ||h,∞ .
8
c 2021, A. Quaini, UH MATH 6371 28 / 29
Chapter 12
Convergence Analysis
We have seen that:
||f 00 ||∞ 2
||τh ||h,∞ ≤ h .
12
Thus,
1 ||f 00 ||∞ 2 h2
||eh ||h,∞ ≤ h = ||f 00 ||∞ .
8 12 96
Note: both stability and consistency results were used in the
proof. The discretization error is of the same order wrt h as the
consistency error τh .
c 2021, A. Quaini, UH MATH 6371 29 / 29