Finite Difference Coefficients
   HOME

TheInfoList



OR:

In mathematics, to approximate a derivative to an arbitrary order of accuracy, it is possible to use the
finite difference A finite difference is a mathematical expression of the form . If a finite difference is divided by , one gets a difference quotient. The approximation of derivatives by finite differences plays a central role in finite difference methods for t ...
. A finite difference can be central, forward or backward.


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 : f(x_) \approx \frac + O\left(h_x^2 \right), where h_x represents a uniform grid spacing between each finite difference interval, and x_n = x_0 + n h_x. For the m-th derivative with accuracy n, there are 2p + 1 = 2 \left\lfloor \frac \right\rfloor - 1 + n central coefficients a_, a_, ..., a_, a_p. These are given by the solution of the linear equation system : \begin 1 & 1 & ... & 1 & 1 \\ -p & -p+1 & ... & p-1 & p \\ (-p)^2 & (-p+1)^2 &... & (p-1)^2 & p^2 \\ ... & ... &...&...&... \\ ... & ... &...&...&... \\ ... & ... &...&...&... \\ (-p)^ & (-p+1)^ & ... & (p-1)^ & p^ \end \begin a_ \\ a_ \\ a_ \\ ... \\ ... \\ ... \\ a_p \end = \begin 0 \\ 0 \\ 0 \\ ... \\ m! \\ ...\\ 0 \end, where the only non-zero value on the right hand side is in the (m+1)-th row. An open source implementation for calculating finite difference coefficients of arbitrary derivates and accuracy order in one dimension is available.


Forward 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 : \displaystyle f'(x_) \approx \displaystyle \frac + O\left(h_^3 \right), : \displaystyle f''(x_) \approx \displaystyle \frac + O\left(h_^2 \right), while the corresponding backward approximations are given by : \displaystyle f'(x_) \approx \displaystyle \frac + O\left(h_^3 \right), : \displaystyle f''(x_) \approx \displaystyle \frac + O\left(h_^2 \right),


Backward finite difference

To get the coefficients of the backward approximations from those of the forward ones, give all ''odd'' derivatives listed in the table in the previous section the opposite sign, whereas for ''even'' derivatives the signs stay the same. The following table illustrates this:


Arbitrary stencil points

For a given arbitrary stencil points \displaystyle s of length \displaystyle N with the order of derivatives \displaystyle d < N , the finite difference coefficients can be obtained by solving the linear equations : \begin s_1^0 & \cdots & s_N^0 \\ \vdots & \ddots & \vdots \\ s_1^ & \cdots & s_N^ \end \begin a_1 \\ \vdots \\ a_N \end = d! \begin \delta_ \\ \vdots\\ \delta_\\ \vdots\\ \delta_ \end, where \delta_ is the
Kronecker delta In mathematics, the Kronecker delta (named after Leopold Kronecker) is a function of two variables, usually just non-negative integers. The function is 1 if the variables are equal, and 0 otherwise: \delta_ = \begin 0 &\text i \neq j, \\ 1 &\ ...
, equal to one if i = j, and zero otherwise. Example, for s = 3, -2, -1, 0, 1/math>, order of differentiation d = 4: : \begin a_ \\ a_ \\ a_ \\ a_4 \\ a_5 \end = \begin 1 & 1 & 1 & 1 & 1 \\ -3 & -2 & -1 & 0 & 1 \\ 9 & 4 & 1 & 0 & 1 \\ -27 & -8 & -1 & 0 & 1 \\ 81 & 16 & 1 & 0 & 1 \\ \end^ \begin 0 \\ 0 \\ 0 \\ 0 \\ 24 \end = \begin 1 \\ -4 \\ 6 \\ -4\\ 1 \end. The order of accuracy of the approximation takes the usual form O\left(h_^\right).


See also

*
Finite difference method In numerical analysis, finite-difference methods (FDM) are a class of numerical techniques for solving differential equations by approximating derivatives with finite differences. Both the spatial domain and time interval (if applicable) are di ...
*
Finite difference A finite difference is a mathematical expression of the form . If a finite difference is divided by , one gets a difference quotient. The approximation of derivatives by finite differences plays a central role in finite difference methods for t ...
*
Five-point stencil In numerical analysis, given a square grid in one or two dimensions, the five-point stencil of a point in the grid is a stencil made up of the point itself together with its four "neighbors". It is used to write finite difference approximations to ...
*
Numerical differentiation In numerical analysis, numerical differentiation algorithms estimate the derivative of a mathematical function or function subroutine using values of the function and perhaps other knowledge about the function. Finite differences The simplest ...


References

{{DEFAULTSORT:Finite Difference Coefficient Finite differences Numerical differential equations