2nd-order Accurate, FD Approximation to [ xf ]0

From the Taylor series expansion, we can write f(x1) in terms of f(x0) and its derivatives as follows:

f(x1) = f(x0) + (x1 - x0)[ xf ]0 + (2!)-1(x1 - x0)2 [ x2 f ]0 + (3!)-1(x1 - x0)3 [ x3 f ]0 + ...

We can also write f(x-1) in terms of f(x0) and its derivatives as follows:

f(x-1) = f(x0) + (x-1 - x0)[ xf ]0 + (2!)-1(x-1 - x0)2 [ x2 f ]0 + (3!)-1(x-1 - x0)3 [ x3 f ]0 + ...

Now, let b (x1 - x0)/(x-1 - x0); multiply f(x-1) by b2; and subtract it from f(x1).

(x1 - x0)(1 - b) [ xf ]0 = [ f(x1) - f(x0) ] - b2 [ f(x-1) - f(x0) ] - { (3!)-1(x1 - x0)3 (1 - 1/b) [ x3 f ]0 + ... }
[ xf ]0 [ f(x1) - (1 - b2)f(x0) - b2f(x-1)] (x1 - x0)-1(1 - b)-1 + order[ (Dx)2 ]

With this expression, then, we have a FD expression for [ xf ]0 that is accurate to 2nd-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 :

[ xf ]0 [ f(x1) - f(x-1)] (x1 - x0)-1(2)-1 + order[ (Dx)2 ]

Hence, we are able to achieve 2nd-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:

[ xf ]1/2 [ f(x1) - f(x0)] (x1 - x0)-1 + order[ (Dx)2 ]

This 2-point FD stencil then gives us a 2nd-order accurate expression for f'(x) at a spatial location that is half-way between the two grid locations, x0 and x1, as illustrated in the following figure.

[ xf ]1/2 [ f(x1) - f(x0)] (x1 - x0)-1 + order[ (Dx)2 ]


PHYS7412 Index | Finite Difference Schemes