centraldifference
Central difference is a symmetric finite difference scheme used to approximate derivatives by evaluating a function at points equidistant from the target location. It is commonly described as the symmetric difference quotient.
For a function f defined on a grid with spacing h, the simplest central difference estimate of
f′(x) ≈ [f(x + h) − f(x − h)] / (2h).
This estimator is second-order accurate, with a leading error term proportional to h^2.
The central difference for the second derivative is
f″(x) ≈ [f(x + h) − 2f(x) + f(x − h)] / h^2,
also second-order accurate, with a leading error term proportional to h^2.
Compared with forward or backward differences, central differences are more accurate for the same grid spacing
Common applications include numerical differentiation and the discretization of differential equations via finite difference methods. Central
Limitations include reduced applicability near domain boundaries without one-sided formulas, and diminished accuracy for non-smooth or