From the Taylor series expansion, we can write f(x_{1}) in terms of f(x_{0}) and its derivatives as follows:
We can also write f(x_{-1}) in terms of f(x_{0}) and its derivatives as follows:
Now, let b º (x_{1} - x_{0})/(x_{-1} - x_{0}); multiply f(x_{-1}) by b^{2}; and subtract it from f(x_{1}).
(x_{1} - x_{0})(1 - b) [ ¶_{x}f ]_{0} | = | [ f(x_{1}) - f(x_{0}) ] - b^{2} [ f(x_{-1}) - f(x_{0}) ] - { (3!)^{-1}(x_{1} - x_{0})^{3} (1 - 1/b) [ ¶_{x}^{3} f ]_{0} + ... } |
[ ¶_{x}f ]_{0} | » | [ f(x_{1}) - (1 - b^{2})f(x_{0}) - b^{2}f(x_{-1})] (x_{1} - x_{0})^{-1}(1 - b)^{-1} + order[ (Dx)^{2} ] |
With this expression, then, we have a FD expression for [ ¶_{x}f ]_{0} that is accurate to 2^{nd}-order in Dx for a discrete grid with arbitrary grid spacing.
Now, notice what happens when the discrete grid has uniform spacing, i.e., when b = -1 :
Hence, we are able to achieve 2^{nd}-order accuracy from just a 2-point FD stencil! More appropriately in the context of the function values that are known at the discrete grid locations shown in the figure above, this last expression can also be written as:
This 2-point FD stencil then gives us a 2^{nd}-order accurate expression for f'(x) at a spatial location that is half-way between the two grid locations, x_{0} and x_{1}, as illustrated in the following figure.
[ ¶_{x}f ]_{1/2} » [ f(x_{1}) - f(x_{0})] (x_{1} - x_{0})^{-1} + order[ (Dx)^{2} ] |