Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
André Ran
Vrije Universiteit Amsterdam
1
The implicit finite difference method
2
The implicit finite
difference method
The discretization of the heat equation becomes
Solution
m+1 m+1 + um+1
Errors
um+1
n − u m
n un+1 − 2u n n−1
Stability =
Conclusion δτ (δx)2
Solution methods
LU-method
Examples for m = 0, 1, · · · , with the initial conditions u0n = u(nδx, 0), and with
boundary conditions as before at (−N − δx, mδτ ) and at (N + δx, mδτ ).
δτ
Put α = (δx) 2.
Rewrite the equation above as
−αum+1
n+1 + (1 + 2α)u m+1
n − αum+1
n−1 = u m
n.
3
The implicit finite
difference method
Let us put the equation
Solution
Errors
Stability
−αum+1
n+1 + (1 + 2α)u m+1
n − αum+1
n−1 = u m
n.
Conclusion
Solution methods with its initial and boundary conditions in matrix-vector form.
LU-method
Examples Put
um+1
−N − +1
..
um+1 =
.
um+1
N + −1
This vector contains the u-values on the grid that are at time level
(m + 1) · δτ , but not on the boundary.
Put k = N + + N − − 1. Then um+1 ∈ Rk .
4
The implicit finite
difference method
To compute we need to use the boundary points, that is, we need the
Solution vector
um
Errors
Stability −N −
Conclusion
0
Solution methods ..
LU-method bm = . .
Examples
0
um
N+
This should be understood correctly: we want bm and um to be vectors of
the same size k !
5
The implicit finite
difference method
With these notations the equation
Solution
Errors
Stability
−αum+1
n+1 + (1 + 2α)u m+1
n − αum+1
n−1 = u m
n.
Conclusion
Solution methods can be rewritten as
LU-method
Examples
(I + αT )um+1 = um + αbm
2 −1 0 ··· ··· 0
.. ..
−1 2 −1 .
.
.. .. .. .. ..
0 . . . . .
T = . .
.. .. .. .. ..
. . . . 0
. ..
.. . −1 2 −1
0 ··· ··· 0 −1 2 6
Solution
1 −1 0 0
u = (I + αT ) u + αb ,
2 −1 1 1
u = (I + αT ) u + αb =
(I + αT )−2 u0 + α(I + αT )−2 b0 + α(I + αT )−1 b1 ,
..
.
m
X
um+1 = (I + αT )−m−1 u0 + α (I + αT )−j−1 bm−j .
j=0
7
Error propagation
em+1 = (I + αT )−m−1 e0 .
8
Eigenvalues
9
Stability
10
Stability
λ−1
M x = λx ⇔ (M −I)x = (λ−1)x ⇔ αT x = (λ−1)x ⇔ T x = x.
α
Thus λ > 1.
10
Stability
λ−1
M x = λx ⇔ (M −I)x = (λ−1)x ⇔ αT x = (λ−1)x ⇔ T x = x.
α
Thus λ > 1.
Furthermore,
1
M x = λx ⇔ M −1 x = x.
λ
So all eigenvalues of (I + αT )−1 are in (0, 1). 2
10
Conclusion
(I + αT )−1
(I + αT )um+1 = um + αbm .
11
Solution Methods
12
Solution Methods
12
Solution Methods
12
LU-method
13
The implicit finite
difference method
I + αT = L · U
Solution
Errors
Stability
gives
Conclusion
Solution methods
LU-method
y1 = 1 + 2α, l1 = −α/y1 , u1 = −α,
Examples
l1 u1 + y2 = 1 + 2α ⇒
α2
y2 = 1 + 2α − , l2 = −α/y2 , u2 = −α.
y1
Continue this way: y1 = 1 + 2α and for all j = 1, 2, · · ·
α2 α
yj+1 = 1 + 2α − , lj = − , uj = −α.
yj yj
14
Now (I + αT )um+1 = um + αbm translates to
The implicit finite
difference method
Solution
L · U um+1 = um + αbm .
Errors
Stability
Conclusion
Solution methods
LU-method
First solve Lq m = um + αbm , then solve U um+1 = q m . Denote
Examples
c1 q1
cm = um + αbm = ... , qm = ... .
ck qk
with k = N − + N + − 1.
15
The implicit finite
difference method
Then Lq m = cm can be solved top-to-bottom:
Solution
α
q1m = cm qjm = cm m m m
Errors
Stability 1 , j − lj qj−1 = c j + qj−1 .
Conclusion
yj−1
Solution methods
LU-method
And from that U um+1 = q m can be solved from the bottom up:
Examples
16
Examples
17
The implicit finite 10
prijs Europese put
0
Approximation of Delta
Solution 8 −0.2
Errors 7 −0.3
Stability 6 −0.4
5 −0.5
Conclusion
4 −0.6
Solution methods
3 −0.7
LU-method
2 −0.8
Examples 1 −0.9
0 −1
10 15 20 25 30 10 15 20 25 30
9 −0.1
8 −0.2
7 −0.3
6 −0.4
5 −0.5
4 −0.6
3 −0.7
2 −0.8
1 −0.9
0 −1
10 15 20 25 30 10 15 20 25 30