# Finite difference

 related topics {math, number, function} {math, energy, light} {rate, high, increase}

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 a difference quotient. 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.

Recurrence relations can be written as difference equations by replacing iteration notation with finite differences.

## Contents

### 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 may be variable or constant.

A backward difference uses the function values at x and xh, instead of the values at x + h and x:

Finally, the central difference is given by

### 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