A finite difference is a mathematical expression of the form f(x + b) − f(x + a). Finite differences (or the associated difference quotients) are often used as approximations of derivatives, such as in numerical differentiation. The difference operator, commonly denoted Δ (uppercase Delta), is the operator that maps a function f to the function Δ[f] defined by Δ[f](x)=f(x+1)−f(x). A difference equation is a functional equation that involves the finite difference operator in the same way as a differential equation involves derivatives. There are many similarities between difference equations and differential equations. Certain recurrence relations can be written as difference equations by replacing iteration notation with finite differences. In numerical analysis, finite differences are widely used for approximating derivatives, and the term "finite difference" is often used as an abbreviation of "finite difference approximation of derivatives". Finite differences were introduced by Brook Taylor in 1715 and have also been studied as abstract self-standing mathematical objects in works by George Boole (1860), L. M. Milne-Thomson (1933), and Károly Jordan (1939). Finite differences trace their origins back to one of Jost Bürgi's algorithms (c. 1592) and work by others including Isaac Newton. The formal calculus of finite differences can be viewed as an alternative to the calculus of infinitesimals.
Basic types
Three basic types are commonly considered: forward, backward, and central finite differences. A forward difference, denoted Δh[f] of a function f is a function defined as Δh[f](x)=f(x+h)−f(x). Depending on the application, the spacing h may be variable or constant. When not specified, the default value for h is 1; that is, Δ[f](x)=Δ1[f](x)=f(x+1)−f(x). A backward difference uses the function values at x and x − h, instead of the values at x + h and x: ∇h[f](x)=f(x)−f(x−h)=Δh[f](x−h). Finally, the central difference is given by δh[f](x)=f(x+h2)−f(x−h2)=Δh2[f](x)+∇h2[f](x).
Relation with derivatives
The approximation of derivatives by finite differences plays a central role in finite difference methods for the numerical solution of differential equations, especially boundary value problems. The derivative of a function f at a point x is defined by the limit f′(x)=limh→0f(x+h)−f(x)h. If h has a fixed (non-zero) value instead of approaching zero, then the right-hand side of the above equation would be written f(x+h)−f(x)h=Δh[f](x)h. 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 twice differentiable, we have Δh[f](x)h−f′(x)=o(h)→0as h→0. The same formula holds for the backward difference: ∇h[f](x)h−f′(x)=o(h)→0as h→0. However, the central (also called centered) difference yields a more accurate approximation. If f is three times differentiable, δh[f](x)h−f′(x)=o(h2). The main problem with the central difference method, however, is that oscillating functions can yield derivatives equal to zero. If f(nh) = 1 for n odd, and f(nh) = 2 for n even, then f′(nh) = 0 if it is calculated with the central difference scheme. This is particularly troublesome if the domain of f is discrete. See also Symmetric derivative. Authors for whom finite differences mean finite difference approximations define the forward/backward/central differences as the quotients given in this section (instead of employing the definitions given in the previous section).
Higher-order differences 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 for f ′(x + h/2) and f ′(x − h/2) and applying a central difference formula for the derivative of f ′ at x, we obtain the central difference approximation of the second derivative of f :
Second-order central f″(x)≈δh2[f](x)h2=f(x+h)−f(x)h−f(x)−f(x−h)hh=f(x+h)−2f(x)+f(x−h)h2 . Similarly we can apply other differencing formulas in a recursive manner.
Second-order forward f″(x)≈Δh2[f](x)h2=f(x+2h)−f(x+h)h−f(x+h)−f(x)hh=f(x+2h)−2f(x+h)+f(x)h2 . Second-order backward f″(x)≈∇h2[f](x)h2=f(x)−f(x−h)h−f(x−h)−f(x−2h)hh=f(x)−2f(x−h)+f(x−2h)h2 . More generally, the n-th order forward, backward, and central differences are given by, respectively,
… excerpt ends here. Continue reading the full article.
