Finite difference
From Wikipedia, the free encyclopedia
A finite difference is a mathematical expression of the form f(x + b) − f(x +a). If a finite difference is divided by b − a, one gets an expression similar to a differential quotient, except that it uses finite quantities instead of infinitesimal ones. The approximation of derivatives by finite differences plays a central role in finite difference methods for the numerical solution of partial differential equations.
Contents |
[edit] Forward, backward and central differences
Only three forms are commonly considered: forward, backward and central differences.
A forward difference is an expression of the form
Depending on the application, the spacing h is held constant, or the limit h → 0 is taken.
A backward difference arises when h is replaced by −h:
Finally, the central difference is the average of the forward and backward differences. It is given by
[edit] Relation with derivatives
The derivative of a function f at a point x is defined by the limit
If h has a fixed (non-zero) value, instead of approaching zero, then the right-hand side is
Hence, the forward difference divided by h approximates the derivative when h is small. The error in this approximation can be derived from Taylor's theorem. Assuming that f is continuously differentiable, the error is
The same formula holds for the backward difference:
However, the central difference yields a more accurate approximation. Its error is proportional to square of the spacing (if f is twice continuously differentiable):
[edit] Calculus of finite differences
The forward difference can be considered as a difference operator, which maps the function f to Δf. Taylor's theorem can be expressed by the formula
where D denotes the derivative operator, mapping f to its derivative f'. Formally inverting the exponential suggests that
This formula holds in the sense that both operators give the same result when applied to a polynomial. Even for analytic functions, the series on the right is not guaranteed to converge; it may be an asymptotic series. However, it can be used to obtain more accurate approximations for the derivative. For instance, retaining the first two terms of the series yields
The error in this approximation is of the order h2.
The analogous formulas for the backward and central difference operators are
[edit] Higher order derivatives
In an analogous way one can obtain finite difference approximations to higher order derivatives and differential operators. For example, by using the above central difference formula with step h / 2 for f'(x + h / 2) and f'(x − h / 2) and then applying a central difference formula for the derivative of f' at x, we obtain the central difference approximation of the second derivative of f:
[edit] Finite difference methods
Another important aspect is that finite differences approach differential quotients as h goes to zero. Thus, we can use finite differences to approximate derivatives. This is often used in numerical analysis, especially in numerical ordinary differential equations and numerical partial differential equations, which aim at the numerical solution of ordinary and partial differential equations respectively. The resulting methods are called finite difference methods.
Common applications of the finite difference method are in computational science and engineering disciplines, such as thermal engineering, fluid mechanics, etc.
[edit] See also
[edit] References
- William F. Ames, Numerical Method for Partial Differential Equations, Section 1.6. Academic Press, New York, 1977. ISBN 0-12-056760-1.
- Francis B. Hildebrand, Finite-Difference Equations and Simulations, Section 2.2. Prentice-Hall, Englewood Cliffs, New Jersey, 1968.
[edit] Further Reading
- Boole, George, A Treatise On The Calculus of Finite Differences, 2nd Ed., Macmillan and Company, 1872. [See also: Dover edition 1960].