0% found this document useful (0 votes)
3 views

linear

This document discusses finite difference methods for solving linear partial differential equations, covering hyperbolic, parabolic, and elliptic types. It introduces key concepts such as consistency, stability, and convergence of numerical schemes, providing examples and definitions for various finite difference approximations. The document also includes a theorem on the convergence of linear finite difference methods under certain conditions.

Uploaded by

SEENUVASAN K
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

linear

This document discusses finite difference methods for solving linear partial differential equations, covering hyperbolic, parabolic, and elliptic types. It introduces key concepts such as consistency, stability, and convergence of numerical schemes, providing examples and definitions for various finite difference approximations. The document also includes a theorem on the convergence of linear finite difference methods under certain conditions.

Uploaded by

SEENUVASAN K
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Numerical Methods for PDE

In this chapter we discuss the finite difference methods for linear partial differential equa-
tions. We consider one example from each of Hyperbolic, Parabolic and Elliptic partial dif-
ferential equations. The basic concept of consistency, stability and convergence of numerical
schemes are discussed.

1 Hyperbolic equation
Simplest hyperbolic partial differential equation is one way wave equation,
(1.1) P u = ut + aux = 0, − ∞ < x < ∞, t > 0, u = u(x, t)
with initial condition
(1.2) u(x, 0) = u0 (x).
(1.1) - (1.2) is an initial value problem.
First define the grid of points in the (x, t) plane by drawing vertical and horizontal lines
through the points (xi , tn )

grid points grid lines


t

where
tn = n∆t, n = 0, 1, 2, . . .
xi = ih, i = 0, ±1, ±2, . . .

1
The lines x = xi and t = tn are called grid lines and their intersections are called mesh points
of the grid. We denote
u(xi , tn ) = u(ih, n∆t) = uni
The basic idea of finite difference method is to replace derivatives by finite differ-
ences. This can be done in many ways; as example we have
(i) Forward difference:

∂u u(xi , tn+1 ) − u(xi , tn ) un+1 − uni


(xi , tn ) = + O(∆t) = i + O(∆t)
∂t ∆t ∆t
(ii) Backward difference:

∂u u(xi , tn ) − u(xi , tn−1 ) un − uin−1


(xi , tn ) = + O(∆t) = i + O(∆t)
∂t ∆t ∆t
(iii) Central difference:

∂u u(xi , tn+1 ) − u(xi , tn−1 ) un+1 − uin−1


(xi , tn ) = + O(∆t2 ) = i + O(∆t2 )
∂t 2∆t 2∆t
Similar formulas can be given for derivative with respect to x i.e.,

∂u uni+1 − uni
(xi , tn ) = + O(h) (Forward difference)
∂x h
uni − uni−1
= + O(h) (Backward difference)
h
n n
ui+1 − ui−1
= + O(h2 ) (Central difference)
2h
By replacing the derivatives by finite differences and neglecting the error terms we have list of
difference equations. For example

vin+1 − vin (v n − vin )


(1.3) P∆t,h v = + a i+1 = 0 (forward time − forward space)
∆t h

vin+1 − vin n )
(v n − vi−1
(1.4) P∆t,h v = +a i = 0 (forward time − backward space)
∆t h

vin+1 − vin n )
(v n − vi−1
(1.5) P∆t,h v = + a i+1 = 0 (forward time − central space)
∆t 2h

vin − vin−1 (v n − vin )


(1.6) P∆t,h v = + a i+1 = 0 (backward time − forward space)
∆t h

vin − vin−1 n )
(v n − vi−1
(1.7) P∆t,h v = +a i = 0 (backward time − backward space)
∆t h
Like this one can consider several schemes. Here in all we replace the derivatives by finite
differences. Given a list of schemes one naturally ask the question which of the schemes are
useful and which are not, as indeed some are not.

2
Example : Take a = 1 in (1.1)
ut + ux = 0


 1 if x≤0
with I.C : u(x, 0) = u0 (x) = 2x3 − 3x2 + 1 if 0≤x≤1

 0 x≥1

Exact solution is given by




 1 x≤t
u(x, t) = u0 (x − t) = 2(x − t)3 − 3(x − t)2 + 1 0 ≤ x − t ≤ 1

 0 x ≥ t+1

Now consider the scheme (1.3) for this example, i.e.,

∆t n
vin+1 = vin − (v − vin ) (forward time − forward space).
h i+1
∆t
Let λ = h , then

vin+1 = (1 + λ)vin − λvi+1


n .

Let x = 1 and xj0 = 1 for some i = j0 .

Then v(1, 0) = v(xj0 , 0) = 0 = u(xj0 , 0) = vj00 and vj0 = 0 j ≥ j0 ,

vj10 = (1 + λ)vj00 − λvj00 +1 = 0


..
.
vjn0 = 0 ∀ n and for any choice of λ

⇒ vjn = 0 ∀j ≥ j0

⇒ v(x, t) = 0 ∀x ≥ 1

Solution obtained from (1.3) does not converges to u(x, t) as mesh size h and ∆t goes to
zero. Therefore Scheme (1.3) is not a correct scheme for ut + ux = 0. To study what are the
schemes are useful (convergent) let us first introduce the concepts of consistency and stability.
Throughout the notes, norm || · || means either
 1/2  1/2
X X
||u|| = ||u||2 = h |u(xj )|2  = h |uj |2 
j j

or

||u|| = ||u||∞ = sup |u(xj )| = sup |uj |.


j j

3
Definition : Given a partial differential equation P u = 0 and a finite difference scheme
P∆t,h v = 0 we say that the finite difference scheme is consistent with the partial differential
equation in norm || · ||, if for the actual solution u of P u = 0,

||P∆t,h u|| → 0 as ∆t, h → 0.

Definition : The finite difference method is accurate of order (p, q) in || · || if for the actual
solution u of P u = 0,

||P∆t,h u|| = O(hp ) + O(∆tq ).

Example : Let u be solution of (1.1).Then


!  
∂u ∂u un+1
i − uni uni+1 − uni
+a − −a + O(∆t) + O(h) = 0
∂t ∂x ∆t h
i.e.,
||P∆t,h u|| = O(∆t) + O(h).
Hence
vin+1 − vin (v n − vin )
P∆t,h v = + a i+1 = 0 is consistent with ut + aux = 0.
∆t h
Similarly scheme (1.4), (1.5),(1.6) and (1.7) are consistent with ut + aux = 0.
In all these schemes one can write
k
X
vin+1 = n
αj vi+j n
= α−k vi−k + . . . α0 vin + . . . + αk vi+k
n
.
j=−k

By defining forward shift operator S+ vj = vj+1 and backward shift operator S− vj = vj−1 we
can write
k n
vin+1 = α−k S− vi + . . . α−1 S− vin + α0 vin + α1 S+ vin + . . . + αk S+
k n
vi
where
k
S± = S± oS± . . . oS± (k times composition)
0 0
I = Identity operator = S− = S+ .
Therefore
vin+1 = Q(S+ , S− )vin ∀i
In general one can write the one step scheme by
 T
n+1 n+1 n+1
(1.7). v n+1 = Qv n where v n+1 = . . . , vi−1 , vi , vi+1 , . . . .

and Q is a matrix.
Definition : The finite difference method (1.7) is called stable in || · ||, if there exist constants
K and β such that

||v n || ≤ Keβt ||v 0 ||


where t = n∆t, K and β are independent of h and ∆t

4
Definition : A finite difference method is unconditionally stable if it is stable for any time
step ∆t and space step h.
Examples :
∆t n
vin+1 = vin − n
(v − vi−1 )
h i
a finite difference scheme for ut + ux = 0
∆t
vin+1 = vin (1 − λ) + λvi−1
n
, λ=
h

||v n+1 ||∞ = sup |vin+1 | = sup |vin (1 − λ) + λvi−1


n
|
i i
≤ sup{|1 − λ| |vin | + λ |vi−1
n
|} ≤ |1 − λ| ||v n ||∞ + |λ| ||v n ||∞ .
i

If 0 < λ ≤ 1, then ||v n+1 ||∞ ≤ ||v n ||∞ ≤ . . . ≤ ||v 0 ||∞ . Therefore this scheme is l∞ -stable if
λ ≤ 1 (conditionally stable).
Consider the following implicit scheme:
vin = vin−1 − λ(vin − vi−1
n ) n ≥ 1 (backward time - backward space)
n
i.e, vin (1 + λ) − λvi−1 = vin−1 This can be written in the matrix form, Av n = v n−1 where
A = (aij ) with aii = (1 + λ) and aii−1 = −λ and aij = 0 if j 6= i, i − 1.
−λ
A = (1 + λ)[I + C] where C = (Cij ) with Cii−1 = 1+λ and Cij = 0 if j 6= i − 1. Hence
λ
||C||∞ ≤ 1+λ < 1. Hence A is invertible and
 
1 1
||A−1 ||∞ ≤
1 + λ 1 − ||C||∞
 
1 1
≤ λ
≤1
λ + 1 1 − 1+λ
Hence
v n = A−1 v n−1 , where v n = (. . . , vi−1
n
, vin , vi+1
n
. . .)T
||v n ||∞ ≤ ||A−1 ||∞ ||v n−1 ||∞ ≤ ||v n−1 ||∞ ≤ . . . ≤ ||v 0 ||∞
Hence this scheme is unconditionally stable.
Definition : A finite difference method is said to be linear if it is of the form
m2
X
vin+1 = n
cj vj+i where cj ′ s are constants
j=−m1

m1 , m2 are non-negative integers.


Theorem (Lax): If a finite difference method is linear, stable and accurate of order (p, q) in
|| · ||, then it is convergent of order (p, q) in || · ||.
Proof :
v n = Qv n−1 Q = Q(S+ , S− )
n−2
= Q(Qv )
..
.
= Qn v 0 , Qj = Qo . . . oQ(j times composition)

5
This implies

||v n || = ||Qn v 0 || ≤ Keβt ||v 0 || (Scheme is stable)


||Qn v 0 ||
⇒ ≤ Keβt
||v 0 ||

||Qn v 0 ||
||Qn || = sup 0 ||
≤ Keβt
0
||v ||6=0 ||v
Let u(x, t) be the exact solution of the problem P u = 0. Then

un = Qun−1 + ∆t(O(hp ) + O(∆tq ))

by the definition of accuracy of the scheme.

w n = v n − un , w 0 = v 0 − u0 = 0
wn = Qwn−1 + ∆t(O(hp ) + O(∆tq ))
= Q2 wn−2 + Q((O(hp ) + O(∆tq ))∆t) + ∆t(O(hp ) + O(∆tq ))
..
.
n−1
X
= Qn w0 + ∆t Qj (O(hp ) + O(∆tq ))
j=0

n−1
X
||wn || ≤ ∆t ||Qj ||(O(hp ) + O(∆tq ))
j=0

≤ (n + 1)∆tKeβt (O(hp ) + O(∆tq ))


≤ et(β+1) K(O(hp ) + O(∆tq ))
= O(hp ) + O(∆tq ).

This completes the proof.

Von Neumann Analysis

Let v = (vj )∞
j=−∞ be a sequence. Define the discrete Fourier transform of v by
X √
vb(ξ) = vj eijξ i= −1, ξ ∈ [0, 2π).
j

Forward shift operator S+ defined by

S+ v = (S+ vj )∞
j=−∞ , S+ vj = vj+1

6
Backward shift operator S− defined by

S− v = (S− vj )∞
j=−∞ , S− vj = vj−1

X X
Sd
+v = (S+ vj )eijξ = vj+1 eijξ
j j
X X
= vj ei(j−1)ξ = e−iξ vj eijξ
j j
−iξ
=e vb(ξ).

Similarly Sd iξ b(ξ).
−v = e v

Example :
ut + ux = 0
Consider the numerical scheme
∆t n
vin+1 = vin − n
(v − vi−1 )
h i
∆t
= (1 − λ)vin + λvi−1
n
, λ=
h
= (1 − λ)vin + λS− vin
= ((1 − λ) + λS− )vin = Q(S+ , S− )vin

⇒ v n+1 = Q(S+ , S− )v n
P n+1 ijξ
⇒ vbn+1 = v e
Pj j
= ((1 − λ) + λS− )vjn eijξ
Pj ijξ n P iξ n ijξ
= j (1 − λ)e vj + j λe vj e
= (1 − λ)vbn + λeiξ vbn = ((1 − λ) + λeiξ )vbn
= (1 − λ + λeiξ )vbn
In general

vbn+1 = Q(e−iξ , eiξ )vbn


ρ(ξ) = Q(e−iξ , eiξ ) is called amplification factor

Definition : A symbol ρ(ξ) is said to satisfy the Von Neumann condition if there exists a
constant C > 0 (independent of ∆t, h, n and ξ) such that

|ρ(ξ)| ≤ 1 + C∆t for ξ ∈ [0, 2π)

Theorem : A finite difference method v n+1 = Qv n is stable in the l2 norm iff the Von-Neumann
condition is satisfied
Proof : Suppose the Von Neumann condition is satisfied. Let v n+1 = Qv n . By Parsevel ’s
relation
X Z2π
1
n+1 2
(vj ) = |vd
n+1 (ξ)|2 dξ
j

0

7
upon multiplying by h
Z2π
h
||v n+1 ||22 = |vbn+1 (ξ)|2 dξ

0
Z2π
h
= |ρ(ξ)|2 |vbn (ξ)|2

0
Z2π
h
≤ (1 + C∆t)2 |vbn (ξ)|2 = (1 + C∆t)2 ||v n ||22

0

||v n+1 ||2 ≤ (1 + C∆t)||v n ||2


≤ eC∆t ||v n ||2 ≤ eC∆t .eC∆t ||v n−1 ||2
≤ e2C∆t ||v n−1 ||2
≤ e(n+1)C∆t ||v 0 ||2
≤ e2Ct ||v 0 ||2

⇒ scheme is l2 stable.
Conversely, suppose Von-Neumann condition is not satisfied. This implies for each C > 0 ∃
a number ξC ∈ [0, 2π) such that |ρ(ξC )| > (1 + C∆t). Since ρ(ξ) is a continuous function of ξ
there exists an interval [θ1 , θ2 ] in [0, 2π) such that

|ρ(ξ)| > (1 + C∆t) ∀ ξ ∈ [θ1 , θ2 ] = IC

Consider the discrete initial data v 0 = (vj0 ) such that


(
0
q if ξ ∈
/ IC
vb(ξ) = 2π
h(θ2 −θ1 ) if ξ ∈ IC

Then by Parsevel’s relation

X Z2π
h
||v n+1 ||22 =h (vjn+1 )2 = |vbn+1 (ξ)|2 dξ
j

0
Z2π
h
= |ρ(ξ)|2 |vbn (ξ)|2 dξ

0
Z2π
h
= |ρ(ξ)|2(n+1) |vb0 (ξ)|2 dξ

0
Zθ2
h
= |ρ(ξ)|2(n+1) |vb0 (ξ)|2 dξ

θ1
h 2π
≥ (1 + C∆t)2(n+1) (θ2 − θ1 ) = (1 + C∆t)2(n+1)
2π h(θ2 − θ1 )
= (1 + C∆t)2(n+1) ||v 0 ||22

8

||v n+1 ||2 ≥ (1 + C∆t)n+1 ||v 0 ||2 for any C > 0
⇒ scheme is not l2 stable.
Examples : consider the equation

ut + aux = 0
u(x, 0) = u0 (x), a ∈ IR1

1. Godunov Scheme : It is given by

(1 + sgn a)
vin+1 = vin − λ a(vin − vi−1
n
)
2
(1 − sgn a) n
−λ a(vi+1 − vin )
2
(1 − sgn a) n (1 + sgn a) (1 − sgn a) n
= −aλ vi+1 + (1 − λa + aλ )vi
2 2 2
(1 + sgn a) n
+aλ vi−1
2
n
= vi+1 max(0, −aλ) + vin (1 − |λa|) + max(0, aλ)vi−1n
where λ = ∆t/h.

l∞ stability:

||v n+1 ||∞ = sup |vin+1 | ≤ max(0, −aλ) sup |vi+1


n
| + (| 1 − |λa| |) sup |vin |
i i i

n
+ max(0, aλ) sup |vi−1 |
i

≤ (max(0, −aλ) + max(0, aλ) + | 1 − |λa| |)||v n ||∞


= (|aλ| + | 1 − |aλ| |)||v n ||∞

Godunov scheme is l∞ stable if |aλ| ≤ 1.


l2 stability:
ρ(ξ) = e−iξ max(0, −aλ) + (1 − |λa|) + max(0, aλ)eiξ
|ρ(ξ)| ≤ |1 − |λa| | + |aλ| ≤ 1 if |aλ| ≤ 1
Von-Neumann condition is satisfied if |aλ| ≤ 1
⇒ l2 -stable if |λa| ≤ 1
⇒ by Lax theorem scheme is convergent in l2 norm and l∞ norm if |aλ| ≤ 1.
2. Lax-Friedrichs Scheme : It is defined by
n + vn
vi+1 i−1 ∆ta n
vin+1 = − (v n
− vi−1 ).
2 2h i+1
Since n + vn
vi+1 i−1
vin = + O(h2 ),
2
n − vn
vi+1 i−1
= vx + O(h2 ),
2h

9
we have
∆ta n
vin+1 = vin − n
(vi+1 − vi−1 ) + O(h2 )
h
!
v n+1 − vin n )
(v n − vi−1 h2
⇒ i − a i+1 +O =0
∆t 2h ∆t
!
2 h2
= vt + O(∆t) + avx + O(h ) + O
∆t
h
= vt + avx + O(∆t) + O(h) is bounded.
if
∆t
The Lax-Friedrich’s Scheme is first order accurate i.e. p = 1, q = 1
l∞ Stability:
(1 − aλ) n (1 + aλ) n
vin+1 = vi+1 + vi−1
2 2
1 1
||v n+1 ||∞ = sup |vin+1 | ≤ n
|1 − aλ| sup |vi+1 n
| + |1 + aλ| sup |vi−1 |
i 2 i 2 i
1
≤ (|1 − aλ| + |1 + aλ|)||v n ||∞
2
≤ ||v n ||∞ if |aλ| ≤ 1

⇒ L. F. Scheme is l∞ stable if |aλ| ≤ 1


l2 Stability :
1 1
ρ(ξ) = (1 − aλ)e−iξ + (1 + aλ)eiξ
2 2
1 1
|ρ(ξ)| ≤ |1 − aλ| + |1 + aλ| ≤ 1 if |aλ| ≤ 1.
2 2
Hence L.F. Scheme is l2 stable if |aλ| ≤ 1.
L.F. Scheme is convergent in l2 norm and l∞ norm if |aλ| ≤ 1.
3. Lax-Wendroff Scheme :
Let u be a solution of ut + aux = 0
(∆t)2
u(x, t + ∆t) = u(x, t) + ∆tut (x, t) + utt (x, t) + O(∆t3 )
2
(∆t)2 2
= u(x, t) − ∆taux + a uxx + O(∆t)3
2
∆ta a2 (∆t)2
= u(x, t) − (u(x + h, t) − u(x − h, t)) + (u(x + h, t) − 2u(x, t)
2h 2h2
+u(x − h, t)) + ∆tO(h2 ) + (∆t)2 O(h2 ).

Now Lax-Wendroff scheme is given by

∆ta n a2 (∆t)2 n
vin+1 = vin − n
(vi+1 − vi−1 )+ (vi+1 − 2vin + vi−1
n
)
2h 2h2
This scheme is second order accurate i.e, p = q = 2
l2 stability :

10
λa −iξ a2 λ2 −iξ
ρ(ξ) = 1 − (e − eiξ ) + (e − 2 + eiξ )
2 2
λa iξ a2 λ2 iξ
= 1+ (e − e−iξ ) + (e + e−iξ − 2)
2 2
= 1 + λai sin ξ + a2 λ2 (cos ξ − 1)
= 1 − a2 λ2 (1 − cos ξ) + iλa sin ξ
ξ ξ
= 1 − 2a2 λ2 sin2 + iλa sin ξ (because 1 − cos ξ = 2 sin2 )
2 2
ξ
|ρ(ξ)|2 = 1 − 4a2 λ2 (1 − a2 λ2 ) sin4
2
|ρ(ξ)| ≤ 1 if |aλ| ≤ 1
Scheme is l2 stable. Hence converges in l2 norm
Remark : Lax-Wendroff scheme is not l∞ stable
4. Crank-Nicolson Scheme : Let u be the solution. Then
t+∆t
Z
u(x, t + ∆t) − u(x, t) 1
= ut (x, ξ)dξ
∆t ∆t
t
ut (x, t + ∆t) + ut (x, t)
= + O(∆t2 )
2
ux (x, t + ∆t) + ux (x, t)
= −a + O(∆t2 )
2
a (u(x + h, t + ∆t) − u(x − h, t + ∆t))
= −
2 2h
a (u(x + h, t) − u(x − h, t))
− + O(∆t2 ) + O(h2 )
2 2h
Crank-Nicolson scheme is given by
n+1 n+1
vin+1 − vin a (vi+1 − vi−1 n − vn )
) a (vi+1 i−1
=− −
∆t 2 2h 2 2h
This scheme is second order accurate i.e., p = q = 2
Let λ = ∆t
h

aλ n+1 aλ n+1 aλ n
− vi−1 + vin+1 + vi+1 = vin − (vi+1 − vi−1n
)
 4 4
  4 
−aλ aλ aλ
S− + I + S+ vin+1 = I− (S+ − S− ) vin
4 4 4
   
aλ +iξ aλ −iξ n+1 aλ −iξ
− e +1+ e vb = 1− (e − e ) vbn

4 4 4
!

1 + i sin ξ
vbn+1 = 2
vbn
1 − aλ2 i sin ξ

1+ 2 i sin ξ z
ρ(ξ) = aλ
=
1− 2 i sin ξ
z
|ρ(ξ)| = 1

11
Hence the Scheme is unconditionally stable.
⇒ Crank-Nicolson is convergent in l2 norm
5. Unconditionally unstable scheme : Let a=1 in (1.1)

∆t n
vin+1 = vin − (v n
− vi−1 )
2h i+1
vin+1 − vin vi+1
n − vn
i−1
+ = vt + vx + O(∆t) + O(h2 ),
∆t 2h
order of accuracy = (p, q) = (2, 1)

λ −iξ
ρ(ξ) = 1 − (e − eiξ )
2
= 1 + iλ sin ξ
|ρ(ξ)|2 = 1 + λ2 sin2 ξ > 1 if ξ 6= 0, π

this scheme is not l2 stable.


This scheme is not l∞ stable

2 Parabolic equation
Consider the heat equation

(2.1) ut = buxx − ∞ < x < ∞, t > 0, b > 0

with initial condition

(2.2) u(x, 0) = u0 (x)

u(x, t + ∆t) − u(x, t)


ut = + O(∆t)
∆t
u(x + h, t) − 2u(x, t) + u(x − h, t)
uxx = + O(h2 )
h2
The scheme for (2.1)

vin+1 − vin b n
= 2 (vi+1 − 2vin + vi−1
n
) is of order (p, q) = (2, 1).
∆t h

vin+1 = vin + ∆tb n n n


h2 (vi+1 − 2vi + vi−1 )
n n n n ∆t
(2.3) = vi + λb(vi+1 − 2vi + vi−1 ) λ= 2
h
n + λbv n
= vin (1 − 2λb) + λbvi+1 i−1

l∞ Stability :

||v n+1 || = sup |vin+1 | ≤ (|1 − 2λb| + λb + λb) sup |vin |


i i
≤ (|1 − 2λb| + λb + λb)||v n ||∞

12
if λb ≤ 1/2 then scheme is l∞ stable
Define a scheme by
n+1
vin+1 − vin b (vi+1 − 2vin+1 + vi−1
n+1
)
= 2
∆t 2 h
n − 2v n + v n )
b (vi+1 i i−1
+
2 h2
This scheme is second order accurate i.e. p = q = 2.

b∆t n+1 b∆t n
(2.4) vin+1 = v n + 2
(vi+1 − 2vin+1 + vi−1
n+1
) + 2 (vi+1 − 2vin + vi−1
n
)
2h 2h
The scheme (2.4) is called Crank-Nicolson Scheme.

θ-Scheme : Let 0 ≤ θ ≤ 1, Define

(2.5) vin+1 = vin + θbλ(vi+1


n+1
− 2vin+1 + vi−1
n+1 n
) + (1 − θ)λb(vi+1 − 2vin + vi−1
n
)

If θ = 1/2, θ - scheme is nothing but Crank-Nicolson Scheme.


Remark : The order of accuracy of the scheme (2.5)=(p, q) = (2, 1) if θ 6= 1/2. If θ = 1/2 it is
second order accurate i.e., p=q=2.
l2 stability of θ Scheme : The scheme (2.5) can be written as
n+1
−θbλvi+1 + (1 + 2θbλ)vin+1 − θbλvi−1
n+1 n + (1 − 2(1 − θ)λb)v n
= (1 − θ)λbvi−1 i
(2.6) n .
+(1 − θ)λbvi+1

Then

(−θbλe−iξ + (1 + 2θbλ) − θbλeiξ )vbn+1 = (1 − θ)λbeiξ + (1 − 2(1 − θ)λb)

+(1 − θ)λbe−iξ vbn

((1 − θ)λbeiξ + (1 − 2(1 − θ)λb) + (1 − θ)λbe−iξ ) n


vbn+1 = vb (ξ)
(−θbλeiξ + (1 + 2θbλ) − θbλe−iξ )

(1 − θ)λb(eiξ + e−iξ ) + (1 − 2(1 − θλb)


ρ(ξ) =
−θbλ(eiξ + e−iξ ) + (1 + 2θbλ)

2(1 − θ)λb cos ξ + (1 − 2(1 − θ)λb)


=
−2θbλ cos ξ + (1 + 2θbλ)
1 − 2(1 − θ)λb(1 − cos ξ)
=
1 + 2θbλ(1 − cos ξ)
ξ
Note that 1 − cos ξ = 2 sin2 2, hence

13
ξ
1 − 4(1 − θ)λb sin2 2
ρ(ξ) = ξ
1 + 4θbλ sin2 2

ξ
Let w = 4λb sin2 2 Now −1 ≤ ρ(ξ) ≤ 1

1 − (1 − θ)w
⇒ −1≤ ≤1
1 + θw
or 2 + 2θw ≥ w ≥ 0,
w ≥ 0 is obvious. Therefore

(2.7) |ρ(ξ)| ≤ 1 if (1 − 2θ)w ≤ 2

If θ ≥ 1/2 (2.7) is obvious. For 0 ≤ θ < 1/2, (1−2θ) > 0. Hence |ρ(ξ)| ≤ 1 if (1−2θ)4λb ≤ 2.
Therefore θ scheme is unconditionally stable if θ ≥ 1/2 and conditionally stable (i.e. λb ≤
1
2(1−2θ) ) for 0 ≤ θ < 1/2.

l∞ Stability of θ-scheme : Scheme (2.6) can be written as

A v n+1 = Bv n

where A = (aij ) is an infinite tridiagonal matrix with aii = (1+2θλb), aii−1 = aii+1 = −θλb and
aij = 0 if j 6= i, i−1, i+1. B = (bij ) is also an infinite matrix with bii = (1−2(1−θ)bλ), bii−1 =
bii+1 = (1 − θ)λb and bij = 0 if j 6= i, i − 1, i + 1.
−θλb
Now A = (1 + 2θλb)(I + C). Where C = (Cij ) be a matrix with Cii+1 = Cii−1 = 1+2θλb and
Cij = 0 if j 6= i − 1, i + 1
X 2θλb
||C||∞ = sup( |Cij |) = <1
i j
1 + 2θλb

Therefore (I + C) is invertible and


1 1
||(I + C)−1 ||∞ ≤ = 2θλb
= (1 + 2θλb)
1 − ||C||∞ 1 − 1+2θλb

1
⇒ ||A−1 ||∞ = ||(I + C)−1 ||∞ ≤ 1
1 + 2θλb
Now v n+1 = A−1 Bv n and

||v n+1 ||∞ ≤ ||A−1 ||∞ ||B||∞ ||v n || ≤ ||B||∞ ||v n ||

Scheme is l∞ stable if ||B||∞ ≤ 1.


X
||B||∞ = sup( |bij |) = 2(1 − θ)λb + |(1 − 2(1 − θ)bλ|
i j

If 1 − 2(1 − θ)bλ ≥ 0, then ||B||∞ ≤ 1


1
θ-scheme is l∞ stable if bλ ≤ 2(1−θ)
1
θ scheme is convergent in l∞ norm if bλ ≤ 2(1−θ)

14
3 Elliptic equation
Consider the Dirichlet problem

∂2u ∂2u
(3.1) Pu = + 2 = f (x, y) in Ω = (0, 1) × (0, 1)
∂x2 ∂y
with boundary condition

(3.2) u = g(x, y) on the boundary of Ω = ∂Ω

Let us denote u(xi .yj ) = uji , f (xi , yj ) = fij and on boundary uji = vij = g(xi , yj ). Then the
numerical scheme corresponding to (3.1) can be written as

j
vi+1 j
− 2vij + vi−1 (vij+1 − 2vij + vij−1 )
(3.3) P∆x,∆y v = 2
+ 2
= fij
(∆x) (∆y)
which is second order accurate. Because if u is a solution of (3.1) then

P∆x,∆y = O(∆x2 ) + O(∆y 2 )

Since the ratio of the mesh plays an insignificant role in the theory of elliptic problems. to
study the above problem we take ∆x = ∆y = h for simplicity. Then (3.3) becomes
j
vi+1 − 2vij + vi−1
j
+ (vij+1 − 2vij + vij−1 ) = h2 fij

i.e.,

(3.4) 4vij = vi+1


j j
+ vi−1 + vij+1 + vij−1 − h2 fij , 1 ≤ i, j ≤ M − 1

Let x0 = y0 = 0 xi = i∆x = ih, i = 0, . . . , M


xM = y M = 1 yi = i∆y = ih, i = 0, . . . , M
Let us consider the following simple cases to understand the scheme (3.4)
Let M = 3
Then by (3.4)

4v11 − (v21 + v01 + v12 + v10 ) = −h2 f11


4v21 − (v31 + v11 + v22 + v20 ) = −h2 f21
4v12 − (v22 + v02 + v13 + v11 ) = −h2 f12
4v22 − (v32 + v12 + v23 + v21 ) = −h2 f22

As on boundary vij = gij ,this can be written as a linear system

Av = bg,f

i.e.
    
4 −1 −1 0 v11 g01 + g10 − h2 f11
 −1 4  
0 −1   v21   g31 + g20 − h2 f21 
   
Av =   =  = bg, f.
 −1 0 4 −1   v12   g02 + g13 − h2 f12 
0 −1 −1 4 v22 g32 + g23 − h2 f22

15
Now A can be written as
" # " # " #
B −I 4 −1 1 0
A= , where B = , I=
−I B −1 4 0 1
A is a strictly diagonally dominant matrix. Hence A is invertible. Therefore above linear system
can be solved uniquely.
Now let us consider the case M = 4

4v11 − v21 − v12 = v10 + v01 − h2 f11


4v21 − v31 − v21 − v11 = v20 − h2 f21
4v31 − v32 − v22 = v30 + v41 − h2 f31
4v12 − v22 − v13 − v11 = v02 − h2 f12
4v22 − v32 − v12 − v23 − v21 = 0 − h2 f22
4v32 − v22 − v31 − v33 = v42 − h2 f32
4v13 − v23 − v12 = v03 + v14 − h2 f13
4v23 − v33 − v22 − v13 = v24 − h2 f23
4v33 − v23 − v32 = v43 + v34 − h2 f33
This can be written as a linear system
Av = bg,f
i,e.,
  
4 −1 0 −1 0 0 0 0 0 v11
 −1 4 −1 0 −1 0 0 0  
0   v21 
 
  
 0 −1 4 0 0 −1 0 0 0   v31 
  2 
 −1 0 0 4 −1 0 −1 0 0   
   v12 
Av = 
 0 −1 0 −1 4 −1 0 −1 0  
  v2
 = bg,f

 0 0 −1 0 −1 4 0 0 −1  
 2 
  v 
   33 
 0 0 0 −1 0 0 4 −1 0   v1 
  
 0 0 0 0 −1 0 −1 4 −1   v23 
0 0 0 0 0 −1 0 −1 4 v33
Now A can be written as
   
B −I O 4 −1 0
   
A =  −I B −I  , where B =  −1 4 −1 
O −I B 0 −1 4
A is 9 × 9 matrix, B, O(zero matrix) and I are 3 × 3 matrices.
In general (3.4) can be written as
Av = bg,f
where
 
B −I O
 −I B −I 
 
 
A= −I B −I 
 
 . . . 
O −I B

16
where
 
4 −1 O
 −1 4 −1 
 
B= 
 . . . 
O −1 4
with A is a matrix of order (M − 1)2 . B , O and I are matrices of order M − 1. v is a vector
given by
M −1 M −1 T
v = (v11 , v21 , . . . , vM
1 2 2 2
−1 , v1 , v2 , . . . , vM −1 , . . . , v1 , . . . , vM −1 )
and bg is a vector depends on the boundary values.
A is symmetric and positive definite. As A is tridioganal block matix there are several
methods like direct methods or iterative methods to solve the above system.
Convergence : Let u = u(x, y) be the actual solution of the problem and let ǫji = uji − vij
where uji = u(xi , yj ) = u(ih, jh) and vij is obtained from (3.4). Since ∆u = f we have

4uji − (uji+1 + uji−1 + uj+1


i + uij−1 − h2 fij ) + O(h4 ) = 0
Therefore we have
1
Lǫ = ǫji − (ǫji+1 + ǫji−1 + ǫj+1
i + ǫij−1 ) = O(h4 ) ≤ M h4
4
for some M > 0. On the boundary ǫji = uji − vij ≡ 0. Let w(x, y) = x2 + y 2 and wij = w(ih, jh)
Then
1 j
Lw = wij − (wi+1 j
+ wi−1 + wij+1 + wij−1 ) = −h2
4
Define
ǫ̃j i = ǫji + M h2 wij . Then

Lǫ̃ = Lǫ + M h2 Lw ≤ M h4 − M h4 = 0

1
ǫ̃ji ≤ (ǫ̃ji+1 + ǫ̃ji−1 + ǫ̃j+1
i + ǫij−1 )
4
⇒ ǫ̃ji attains maxima on the boundary
Let r denotes the radius of a circle about the origin enclosing the region Ω = (0, 1) × (0, 1).
Then
ǫ̃ji ≤ maximum of ǫji on the boundary +M h2 r 2
= 0 + M h2 r = M h2 r 2 ( because ǫji ≡ 0 on boundary)
Now define ǫji = ǫji − M h2 wij . By similar arguments one can show that

ǫji ≥ −M r 2 h2

−M r 2 h2 ≤ ǫji ≤ ǫji ≤ ǫ̃ji ≤ M h2 r 2


⇒ |ǫji | ≤ M h2 r 2
Hence as mesh size goes to zero numerical solution goes to actual solution.

References:

17
1. R.L. Burden, J.D. Faires and A.C. Reynolds, Numerical Analysis, Prindle, Weber and
Schmidt(1978).

2. E.Isaacson and H.B. Keller, Analysis of numerical methods, John Wiley and Sons(1966).

3. G.A. Sod, Numerical Methods in Fluid dynamics, Cambridge university press(1985).

4. J.C. Strikwerda, Finite difference schemes and Partial differential equations, Wordsworth
and Brooks(1989).

APPENDIX:

1. Discrete Fourier Transform

Let v = (vj )∞ 2
j=−∞ be a comlex sequence in l . Define the discrete Fourier transform of v by
X √
vb(ξ) = vj eijξ i= −1, ξ ∈ [0, 2π)
j

. Then
(1)
Z2π
1
vj = vb(ξ) e−ijξ dξ

0

(2) (Parsevel’s relation)

X Z2π
2 1
|vj | = |vb(ξ)|2 dξ
j

0
Proof: Let
Z2π
2 1
L [0, 2π] = {f : [0, 2π] → C, f is measureble and |f (x)|2 dx < ∞}

0

Then {en = √1 einx }n∈N forms an orthonormal basis for L2 [0, 2π]. Therefore we have

Z2π Z2π X
1 −ijξ 1
vb(ξ)e dξ = ( vn einξ )e−ijξ
2π 2π n
0 0
Z 2π
1 X
= vn ei(n−j)ξ )d ξ
2π n
0
= vj .

Also,

Z2π Z2π
1 2 1
|vb(ξ)| dξ = vb(ξ) vb(ξ)dξ
2π 2π
0 0

18
Z2π X X
1
= ( vn einξ ) ( vj eijξ )dξ
2π n j
0

Z
1 X X
= ( vn einξ ) ( vj e−ijξ )dξ
2π n j
0
X
= |vj |2
j

19

You might also like