
In mathematics, to approximate a derivative to an arbitrary order of accuracy, it is possible to use the finite difference. A finite difference can be central, forward or backward.
Video Finite difference coefficient
Central finite difference
This table contains the coefficients of the central differences, for several orders of accuracy and with uniform grid spacing:
For example, the third derivative with a second-order accuracy is
where represents a uniform grid spacing between each finite difference interval, and .
For the -th derivative with accuracy , there are central coefficients .These are given by the solution of the linear equation system
where the only non-zero value on the right hand side is in the -th row.
A Python implementation for using finite difference approximations in any dimension and accuracy order on uniform and non-uniform grids is the findiff project.
Maps Finite difference coefficient
Forward and backward finite difference
This table contains the coefficients of the forward differences, for several orders of accuracy and with uniform grid spacing:
For example, the first derivative with a third-order accuracy and the second derivative with a second-order accuracy are
while the corresponding backward approximations are given by
In general, to get the coefficients of the backward approximations, give all odd derivatives listed in the table the opposite sign, whereas for even derivatives the signs stay the same. The following table illustrates this:
src: i.ytimg.com
Arbitrary stencil points
For a given arbitrary stencil points of length with the order of derivatives , the Finite-Different coefficients can be obtained by solving the linear equations
Example, for , order of differentiation ,
The order of accuracy of the approximation takes the usual form .
src: i.stack.imgur.com
See also
- Finite difference method
- Finite difference
- Five-point stencil
- Numerical differentiation
src: i.ytimg.com
References
Source of the article : Wikipedia