High-precision second-order difference quotient of 2 variables functions

calculusderivativesfinite differencesmultivariable-calculusnumerical methods

For one variable function, 2th order difference quotient can be:
$$
\frac{f(x+h) – 2f(x) + f(x-h)}{h^2},
$$

which can also be:
$$
\frac{-f(x-2h) + 16f(x-h) – 30f(x) + 16f(x+h) – f(x+2h)}{12h^2}
$$

with a higher precision.

For two variables function, difference quotient of
$\displaystyle \smash[t]{\frac{\partial^2 f}{\partial x \, \partial y}}$ can be:
$$
\frac{f(x+h,y+h) – f(x+h,y-h) – f(x-h,y-h) + f(x-h,y+h)}{4h^2}.
$$

Is there some other form of this difference quotient with a higher precision?

Best Answer

The idea is that the Taylor series of $-f \! \left(x -2 h \right)+16 f \! \left(x -h \right)-30 f \! \left(x \right)+16 f \! \left(x +h \right)-f \! \left(x +2 h \right)$ about $h=0$ is $12 f''(x) + O(h^4)$.

For the two-variable case you might try e.g. $$ \frac{f \! \left(x -h , y\right)}{h^{2}}-\frac{2 f \! \left(x , y\right)}{h^{2}}+\frac{f \! \left(x +h , y\right)}{h^{2}}+\frac{f \! \left(x -2 h , y -2 h \right)}{12 h^{2}}-\frac{f \! \left(x -h , y -2 h \right)}{3 h^{2}}+\frac{f \! \left(x , y -2 h \right)}{2 h^{2}}-\frac{f \! \left(x +h , y -2 h \right)}{3 h^{2}}+\frac{f \! \left(x +2 h , y -2 h \right)}{12 h^{2}}-\frac{f \! \left(x -2 h , y -h \right)}{6 h^{2}}+\frac{2 f \! \left(x -h , y -h \right)}{3 h^{2}}-\frac{f \! \left(x , y -h \right)}{h^{2}}+\frac{2 f \! \left(x +h , y -h \right)}{3 h^{2}}-\frac{f \! \left(x +2 h , y -h \right)}{6 h^{2}} $$ whose Taylor series about $h=0$ is $\dfrac{\partial^2 f}{\partial x \; \partial y}(x,y) + O(h^4)$.