Page 74 - Standard Handbook Of Petroleum & Natural Gas Engineering
P. 74
Numerical Methods 63
Sf, = 1/2 (Af, + Vf,) = 1/2 (fi+, - f,.,)
The first derivative off at x, may then be given in terms of the central difference
expression as
f', = (6f,)/h + O(hz)
and is accurate to a greater degree than the forward or backward expressions
of f'. Central difference expressions for derivatives of any order in terms of
forward and backward differences are given by
f:") = [Vnfi+"/* + A"fi_,,,]/(2h") + O(h2), n even
and
f:") = [Vnf,+(n.1)/2 + A"fi.(n_,,zl/(2h") + O(h2), n odd
Coefficients of central difference expressions for derivatives up to order four
of O(h2) are given in Figure 1-56 and of O(h4) in Figure 1-57.
-
Figure 1-56. Central difference coefficients of o(h)2.
Figure 1-57. Central difference coefficients of ~(h)~