2nd-order Accurate, FD Approximation to [ x2f ]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 b; and subtract it from f(x1).

(2!)-1(x1 - x0)2(1 - 1/b) [ x2f ]0 = [ f(x1) - f(x0) ] - b [ f(x-1) - f(x0) ]
- { (3!)-1(x1 - x0)3 (1 - 1/b2) [ x3 f ]0 + ... }
[ x2f ]0 [ f(x1) - (1 - b)f(x0) - bf(x-1)] 2 (x1 - x0)-2(1 - 1/b)-1
- { (3)-1(x1 - x0) (1 - 1/b2)(1 - 1/b)-1 [ x3 f ]0 + ... }

With this expression, then, we have a FD expression for [ x2f ]0 that is accurate to 1st-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,

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

Hence, we are (accidently) able to achieve 2nd-order accuracy from just a 3-point FD stencil.


PHYS7412 Index | Finite Difference Schemes