It is used to write finite difference approximations to derivatives at grid points.
But for this calculation, it is left like that since the order of error estimation is not treated here (cf below).
Note: the coefficients of f in this formula, (8, -8,-1,1), represent a specific example of the more general Savitzky–Golay filter.
That can be seen from the expansion[2] which can be obtained by expanding the left-hand side in a Taylor series.
Alternatively, apply Richardson extrapolation to the central difference approximation to
[2] As an alternative to deriving the finite difference weights from the Taylor series, they may be obtained by differentiating the Lagrange polynomials where the interpolation points are Then, the quartic polynomial
This method can be more flexible as the extension to a non-uniform grid is quite straightforward.
This stencil is often used to approximate the Laplacian of a function of two variables: The error in this approximation is O(h 2),[3] which may be explained as follows: From the 3 point stencils for the second derivative of a function with respect to x and y: If we assume