4
1 Idea and Derivation of the Method
or
du
dX
i
=
u i − u i−1
X
+
1
2
d
2 u
dX 2
i
X −
1
6
d
3 u
dX 3
i
X
2
+ · · ·
O((X 2 )
,
(1.11)
where the second order derivative can be replaced by a backward approximation
2
with truncation error of order X
2 , i.e.
d
2 u
dX 2
i
=
u i − 2u i−1 + u i−2
X 2
+
d
3 u
dX 3
i
X − O((X
2
) .
(1.12)
Thus, the backward approximation of the first order derivative with truncation error
of order X
2 is obtained as:
du
dX
i
=
u i − u i−1
X
+
u i − 2u i−1 + u i−2
2X
+
1
2
d
3 u
dX 3
i
X
2
− O((X
3
)
=
3u i − 4u i−1 + u i−2
2X
+ O((X
2
) .
(1.13)
Some common expressions for derivatives of different order and the respective
truncation errors are summarized in Table 1.1.
It is possible to derive the finite difference approximations based on a special type
of collocation method [3]. This so-called cell collocation method [6] considers a cell
as shown in Fig. 1.3. Let us remind here that the point collocation method uses as
weight function the Dirac delta function, i.e.,
δ(X − X k ) =
0 for X = X k
∞ for X = X k
.
(1.14)
To approximate, for example, a second order derivative
d
2 u
dX 2 , a local approximate
function can be written as
u =
i
k = i−1
N k × u k = N i−1 u i−1 + N i u i + N i+1 u i+1 ,
(1.15)
where u i−1 , . . . , u i+1 are the values of the function at the nodes. The interpolation
functions N k are given in natural coordinates (−1 ≤ ξ ≤ 1) and can take the following quadratic form (cf. Fig. 1.4), [3]:
2 This formulation can be obtained based on a Taylor’s series expansion for i − 2 up to
d 6 u
dX 6 and
introducing a backward difference approximation of the first order derivative which contains the
terms up to
d 6 u
dX 6 .
1 Idea and Derivation of the Method
or
du
dX
i
=
u i − u i−1
X
+
1
2
d
2 u
dX 2
i
X −
1
6
d
3 u
dX 3
i
X
2
+ · · ·
O((X 2 )
,
(1.11)
where the second order derivative can be replaced by a backward approximation
2
with truncation error of order X
2 , i.e.
d
2 u
dX 2
i
=
u i − 2u i−1 + u i−2
X 2
+
d
3 u
dX 3
i
X − O((X
2
) .
(1.12)
Thus, the backward approximation of the first order derivative with truncation error
of order X
2 is obtained as:
du
dX
i
=
u i − u i−1
X
+
u i − 2u i−1 + u i−2
2X
+
1
2
d
3 u
dX 3
i
X
2
− O((X
3
)
=
3u i − 4u i−1 + u i−2
2X
+ O((X
2
) .
(1.13)
Some common expressions for derivatives of different order and the respective
truncation errors are summarized in Table 1.1.
It is possible to derive the finite difference approximations based on a special type
of collocation method [3]. This so-called cell collocation method [6] considers a cell
as shown in Fig. 1.3. Let us remind here that the point collocation method uses as
weight function the Dirac delta function, i.e.,
δ(X − X k ) =
0 for X = X k
∞ for X = X k
.
(1.14)
To approximate, for example, a second order derivative
d
2 u
dX 2 , a local approximate
function can be written as
u =
i
k = i−1
N k × u k = N i−1 u i−1 + N i u i + N i+1 u i+1 ,
(1.15)
where u i−1 , . . . , u i+1 are the values of the function at the nodes. The interpolation
functions N k are given in natural coordinates (−1 ≤ ξ ≤ 1) and can take the following quadratic form (cf. Fig. 1.4), [3]:
2 This formulation can be obtained based on a Taylor’s series expansion for i − 2 up to
d 6 u
dX 6 and
introducing a backward difference approximation of the first order derivative which contains the
terms up to
d 6 u
dX 6 .
