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; and subtract it from f(x_{1}).
(2!)^{-1}(x_{1} - x_{0})^{2}(1 - 1/b) [ ¶_{x}^{2}f ]_{0} | = | [ f(x_{1}) - f(x_{0}) ] - b [ f(x_{-1}) - f(x_{0}) ] |
- { (3!)^{-1}(x_{1} - x_{0})^{3} (1 - 1/b^{2}) [ ¶_{x}^{3} f ]_{0} + ... } | ||
[ ¶_{x}^{2}f ]_{0} | » | [ f(x_{1}) - (1 - b)f(x_{0}) - bf(x_{-1})] 2 (x_{1} - x_{0})^{-2}(1 - 1/b)^{-1} |
- { (3)^{-1}(x_{1} - x_{0}) (1 - 1/b^{2})(1 - 1/b)^{-1} [ ¶_{x}^{3} f ]_{0} + ... } |
With this expression, then, we have a FD expression for [ ¶_{x}^{2}f ]_{0} that is accurate to 1^{st}-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 . The coefficient of the third-derivative term goes to zero, and we obtain,
[ ¶_{x}^{2}f ]_{0} » [ f(x_{1}) - 2 f(x_{0}) + f(x_{-1})] (x_{1} - x_{0})^{-2} + order[ (Dx)^{2} ] |
Hence, we are (accidently) able to achieve 2^{nd}-order accuracy from just a 3-point FD stencil.