Last modified on 26 November 2013, at 22:01

Advanced Mathematics for Engineers and Scientists/Finite Difference Method

Finite Difference MethodEdit

The finite difference method is a basic numeric method which is based on the approximation of a derivative as a difference quotient. We all know that, by definition:


u'(x) = \lim_{\Delta x \to 0}\frac{u(x + \Delta x) - u(x)}{\Delta x}

The basic idea is that if \Delta x is "small", then


u'(x) \approx \frac{u(x + \Delta x) - u(x)}{\Delta x}

Similarly,


u''(x) = \lim_{\Delta x \to 0}\frac{u(x + \Delta x) - 2 u(x) + u(x - \Delta x)}{\Delta x^2}

u''(x) \approx \frac{u(x + \Delta x) - 2 u(x) + u(x - \Delta x)}{\Delta x^2}

It's a step backwards from calculus. Instead of taking the limit and getting the exact rate of change, we approximate the derivative as a difference quotient. Generally, the "difference" showing up in the difference quotient (ie, the quantity in the numeriator) is called a finite difference which is a discrete analog of the derivative and approximates the n^\text{th} derivative when divided by \Delta x^n.

Replacing all of the derivatives in a differential equation ditches differentiation and results in algebraic equations, which may be coupled depending on how the discretization is applied.

For example, the equation


\frac{\partial u}{\partial t} = \frac{\partial^2 u}{\partial x^2}

may be discretized into:


\frac{u(x, t + \Delta t) - u(x, t)}{\Delta t} = \frac{u(x + \Delta x, t) - 2 u(x, t) + u(x - \Delta x, t)}{\Delta x^2}

\Big\Downarrow

u(x, t + \Delta t) = u(x, t) + \frac{\Delta t}{\Delta x^2} (u(x + \Delta x, t) - 2 u(x, t) + u(x - \Delta x, t))

This discretization is nice because the "next" value (temporally) may be expressed in terms of "older" values at different positions.