u
0
k ¼
u k þ 1 À u kÀ1
2h
u
00
k ¼
1
h
u k þ 1 À u k
h
À
u k À u kÀ1
h
¼
u k þ 1 À 2u k þ u kÀ1
h 2
u
000
k ¼
u k þ 2 À 2u k þ 1 þ 2u kÀ1 À u kÀ2
h 3
u
0000
k ¼
u k þ 2 À 4u k þ 1 þ 6u k À 4u kÀ1 þ u kÀ2
h 4
:
ð2:91Þ
In general, a simple central difference approximation of a u k
(m) may be written:
u
ðmÞ
k ¼
D
m u kÀðm þ 1Þ=2 þ D
m u kÀðmÀ1Þ=2
.
h
m
; m odd
D
m u kÀm=2
.
h
m
;
m even ;
8
<
:
ð2:92Þ
where D denotes the difference operator: Du(x) = u(x + h) – u(x), or:
Du k ¼ u k þ 1 À u k ;
ð2:93Þ
so that, for example:
D
2 u k ¼ D Du k
ð
Þ ¼ D u k þ 1 À u k
À
Á
¼ u k þ 2 À u k þ 1
À
Á À u k þ 1 À u k
À
Á ¼ u k þ 2 À 2u k þ 1 þ u k
D
3 u k ¼ D D
2 u k
À
Á ¼ u k þ 3 À 3u k þ 2 þ 3u k þ 1 À u k
D
4 u k ¼ D
2
D
2 u k
À
Á ¼ u k þ 4 À 4u k þ 3 þ 6u k þ 2 À 4u k þ 1 þ u k :
ð2:94Þ
Derivatives are approximated in the differential equation and boundary conditions of the EVP. A differential equation of order 2m on x 2 [a;b] thus becomes a
finite difference equation on the mesh x k , k = 0, n.
There will be 2m boundary conditions, of order up to r a and r b at, respectively,
the left and right boundary, r a ,r b
2m–1. If r a > 0 we need to extend the mesh at
the left end to x A
x 0 (i.e. A 0), so as to express the corresponding boundary
condition in difference form. (Example: With a boundary condition u′(x a ) =
′ 0 = 0 so that r a = 1, application of (2.91) for k = 0 gives u 1 = u −1 , and thus
A = −1, i.e. the mesh needs extension to x –1 , left of the physical boundary at x 0 .)
Similarly for the other end – if r b > 0 we need to extend the mesh at the right end, to
x B where B ! n.
Thus the extended mesh holds N = B – A + 1 ! n + 1 points x A , …, x B . To
solve for the N corresponding discretized function values u A , …, u B we need
N independent algebraic equations. Of these, 2m equations are provided by the
boundary conditions, while the remaining N − 2m are provided by iterating the
difference equation approximating the differential equation – starting with an index
value of k that involves the leftmost mesh point A (and no lower), and ending with
an index value that involves the rightmost mesh point B (and no higher).
2.8 Methods of Solution
81
Précédent

- 100/539

Suivant