Consistency and Stability of Finite Difference
Schemes
Rajen Kumar Sinha
Department of Mathematics
IIT Guwahati
Rajen Kumar Sinha MA573
Let
L(U) = 0, (1)
represent the partial differential equation (PDE) in the independent
variables x and t, with exact solution U. Let
Fi,j (u) = 0 (2)
represent the finite difference equation approximation the PDE at the
(i, j)th mesh point, with exact solution u.
The local truncation error Ti,j (U) at the point (ih, jk) is defined by
Ti,j (U) = Fi,j (U) − L(Ui,j ) = Fi,j (U).
Ti,j gives an indication of the error resulting from the replacement of
L(Ui,j ) by Fi,j (U).
Definition. If Ti,j (U) → 0 as h → 0, k → 0, the difference equation (2) is
said to be consistent or compartible with the PDE (1).
Rajen Kumar Sinha MA573
Example: Compute Ti,j of the two-level explicit scheme approximating
Ut = Uxx at the point (ih, jk).
ui,j+1 − ui,j ui−1,j − 2ui,j + ui+1,j
Fi,j (u) = − = 0.
k h2
Ui,j+1 − Ui,j Ui−1,j − 2Ui,j + Ui+1,j
Ti,j (U) = Fi,j (U) = − (3)
k h2
By Taylor’s expansion
Ui+1,j = U((i + 1)h, jk) = U(xi + h, tj )
1 2 ∂2U 1 3 ∂3U
∂U
= Ui,j + h + h + h + ···
∂x i,j 2 ∂x 2 i,j 6 ∂x 3 i,j
Ui−1,j = U((i − 1)h, jk) = U(xi − h, tj )
1 2 ∂2U 1 3 ∂3U
∂U
= Ui,j − h + h − h + ···
∂x i,j 2 ∂x 2 i,j 6 ∂x 3 i,j
Ui,j+1 = U(ih, (j + 1)k) = U(xi , tj + k)
1 2 ∂2U 1 3 ∂3U
∂U
= Ui,j + k + k + k + ···
∂t i,j 2 ∂t 2 i,j 6 ∂t 3 i,j
Rajen Kumar Sinha MA573
Substituting the above in (3) to obtain
∂2U
2
1 2 ∂4U
∂U 1 ∂ U
Ti,j = − + k − h
∂t ∂x 2 i,j 2 ∂t 2 i,j 12 ∂x 4 i,j
3 6
1 ∂ U 1 4 ∂ U
+ k2 − h + ···
6 ∂t 3 i,j 360 ∂x 6 i,j
∂U ∂2U
Since ∂t − ∂x 2 = 0, the principal part of the local truncation error
i,j
is
1 ∂2U 1 ∂4U
k 2 − h2 4 .
2 ∂t 12 ∂x i,j
Therefore, Ti,j = O(k) + O(h2 ). Note that
Ti,j → 0 as h → 0, k → 0.
Thus, the explicit scheme approximating Ut = Uxx is consistent with the
differential equation.
Rajen Kumar Sinha MA573
Remark: This error may further be reduced by choosing special value for
k/h2 . Ti,j can be written as
k ∂2U ∂4U
1 2
Ti,j = h 6 2 2 − + O(k 2 ) + O(h4 ).
12 h ∂t ∂x 4 i,j
Note that
∂2 ∂2 ∂2U
∂ ∂ ∂U
= =⇒ = .
∂t ∂x 2 ∂t ∂t ∂x 2 ∂x 2
If 6 hk2 = 1 then Ti,j = O(k 2 ) + O(h4 ).
Note: This is of little use because k = 16 h2 is very small for small h and
the volume of arithmatic operation needed to advance the solution to a
large-time level is enourmous).
Rajen Kumar Sinha MA573
Stability
Stability is related to the round-off error. We say that the scheme is
stable if the round-off error in the numerical process is bounded.
Let R = {(x, t) | 0 ≤ x ≤ 1, 0 ≤ t ≤ T } be a rectangle. Consider the
PDE
L(U) = 0 in R
with prescribed initial and boundary conditions. Let h and k be the
discretisation/mesh parameters such that
xi = ih, i = 0(1)N with Nh = 1,
tj = jk, j = 0(1)J with Jk = T .
Assume that h is related to k (e.g., k = O(h2 )). That is, As h → 0,
k → 0.
Consider the finite difference approximation of the form:
bi−1 ui−1,j+1 + bi ui,j+1 + bi+1 ui+1,j+1 = ci−1 ui−1,j + ci ui,j + ci+1 ui+1,j ,
where bi ’s and ci ’s are constants.
Rajen Kumar Sinha MA573
Suppose the boundary values u0,j and uN,j for j > 0 are known. Then for
i = 1(1)N − 1, we have
b1 b2 u1,j+1
b1 b2 b3 u2,j+1
.. .. . . ..
. . . .
bN−3 bN−2 bN−3 uN−2,j+1
bN−2 bN−1 uN−1,j+1
c1 c2 u1,j c0 u0,j − b0 u0,j+1
c1 c2 c3
u2,j
= ... ... .. .. ..
+
.
. .
cN−3 cN−2 cN−3 uN−2,j
cN−2 cN−1 uN−1,j cN uN,j − bN,j+1
In vector and matrix notation,
Buj+1 = Cuj + dj
=⇒ uj+1 = B−1 Cuj + B−1 dj
=⇒ uj+1 = Auj + fj , where A = B−1 C, fj = B−1 dj
Rajen Kumar Sinha MA573
Apply recursively to obtain
uj = Auj−1 + fj−1 = A(Auj−2 + fj−2 ) + fj−1
= A2 uj−2 + Afj−2 + fj−1
= ···
= Aj u0 + Aj−1 f0 + Aj−2 f1 + · · · + fj−1 , (4)
where u0 → the vector of initial values
f0 , f1 , . . . , fj−1 → are the vectors of known boundary values
Perturb the vector of initial value u0 to u∗0 . The exact solution at the jth
time-level will be
u∗j = Aj u∗0 + Aj−1 f0 + Aj−2 f1 + · · · + fj−1 (5)
Define the perturbation error by e = u∗ − u. Then, it follows from (4)
and (5) that
ej = u∗j − uj = Aj (u∗0 − u0 ) = Aj e0 ,
where e0 is the perturbation error of initial values.
Rajen Kumar Sinha MA573
kej k = kAj e0 k ≤ kAj kke0 k.
If there exists a positive number M, independent of j, h and k such that
kAj k ≤ M, j = 1(1)J (Due to Lax and Richtmyer), then
kej k ≤ Mke0 k,
which limits the amplification of initial error. Since
kAj k = kAAj−1 k ≤ kAkkAj−1 k ≤ · · · ≤ kAkj ,
we have
kej k ≤ kAkj ke0 k.
Thus, the Lax and Richtmyer definition of stability is satisfied if
k A
|{z} k ≤ 1.
amplification matrix
This is the necessary and sufficient condition for the difference equations
to be stable when the solution of the PDE does not increase as t
increases.
*** Ends ***
Rajen Kumar Sinha MA573