Geometric mean of finite difference upwind and downwind

286 Views Asked by At

For numerical approximation of a first derivative of some function $f$, there are three standard finite difference schemes: the upwind $(f(x+h)-f(x))/h$, downwind $(f(x)-f(x-h))/h$, and central $(f(x+h)-f(x-h))/2h$, differences. The latter has the advantage of $\mathcal{O}(h^2)$ error, whereas the first two have $\mathcal{O}(h)$ error. One way to think of the central difference scheme is as an average of the upwind and downwind differences, for which the leading $\mathcal{O}(h)$ error terms cancel.

However, for application to finite difference schemes for differential equations, there is a practical disadvantage to central differencing in that it does not couple even and odd sites of the underlying lattice. This can allow for period 2 oscillations which have to be smoothed out somehow. This has gotten me wondering whether taking a geometric mean rather than an arithmetic mean of the upwind and downwind differences would be better than the central difference.

The geometric mean of upwind and downwind differences can be expressed as $$ \sqrt{\frac{f(x+h)-f(x)}{h}\frac{f(x)-f(x-h)}{h}} = \sqrt{\left(f'(x)+ \frac{h}{2}f''(x) + \frac{h^2}{6}f'''(x) +\cdots\right)\left(f'(x)- \frac{h}{2}f''(x) + \frac{h^2}{6}f'''(x) +\cdots\right)} = f'(x)+h^2\left(\frac{f'''(x)f'(x)}{6} - \frac{f''(x)^2}{8}\right) + \mathcal{o}(h^2) $$

So the approximation is $\mathcal{O}(h^2)$, as good as the central difference. Moreover, since it includes terms on both even and odd lattice sites, one might hope that it avoids the oscillations produced by central differencing.

My question is has anyone studied this difference scheme, and how does it perform compared to the others mentioned above?

(Note that the scheme as outlined above may not be well defined at a maximum of $f$, as then the term under the $\sqrt{}$ could be negative. So a fully defined scheme should account for this possibility, e.g. by setting the derivative to 0 at such points. Also, the sign of the square root should be chosen to match the sign of either the upwind or downwind difference when they have the same sign.)