Next:Solution of Tridiagonal systems: Up:Main Previous:Derivation of an exact difference formula

 

Explicit Formulae


An explicit formula involves only one grid point at the advanced time level

t=(n+1)k

Consider the heat equation given by

$\displaystyle \frac{\partial u}{\partial t}=\frac{\partial^{2}u}{\partial x^{2}}$ (5)

Here $ L=D^{2}$ and equation(2) becomes

(6)

and from equation (3), we have

$\displaystyle D^{2}=\frac{1}{h^{2}}\left(\delta^{2}_{x}-\frac{1}{12}\delta^{4}_{ x}+\frac{1}{90}\delta^{6}_{x}......\right)$ (7)

Substituting this value of $ D^{2}$ in equation (6) followed by expansion leads to

$\displaystyle u^{n+1}_{m}=\left[1+r\delta^{2}_{x} + \frac{1}{2}r\left(r-\frac{1}{6}\right)\delta^{4}_{x} + ...... \right]u^{n}_{m }$ (8)

where $ \displaystyle r=\frac{k}{h^{2}}$ is the mesh ratio. From equation (8), if we retain only second order central differences, the forward difference formula

$\displaystyle U^{n+1}_{m}=(1+r\delta^{2}_{x})U^{n}_{m}$ (9)

is obtained which, on substitution for $ \delta^{2}_{x}$ leads to

$\displaystyle U^{n+1}_{m}=(1-2r)U^{n}_{m}+r(U^{n}_{m+1}+U^{n}_{m-1})$ (10)

where $ U^{n}_{m}$ is an approximation to $ u^{n}_{m}.$
Truncation Error:
Let us investigate the local accuracy of the finite difference formula(10). Introduce the difference between the exact solution of the differential and difference equations at the grid point $ (mh, nk)$ as

$\displaystyle Z^{n}_{m}=u^{n}_{m}-U^{n}_{m}$ (11)

Using Taylor's theorem

$\displaystyle u^{n}_{m\pm1}=u^{n}_{m}\pm h\left(\frac{\partial u}{\partial
x}\r...
...}{24}h^{4}\left(\frac{\partial^{4}u}{\partial
x^{4}}\right)^{n}_{m}\pm.........$

and so

(12)

>From equation (5), (10), (11) and (12), the result

is obtained. The quantity

(13)

is defined as the local truncation error of formula (10) and the principal part of the truncation error is

(14)

Implicit Formulae:
An implicit formula involves more than one grid point at the advanced time level . These formulae can often be obtained from equation (2) written in the central form

(15)

For the heat equation

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

the equation (15) becomes

(16)

correct to second differences

$\displaystyle D^{2}=\frac{1}{h^{2}}\delta^{2}_{x}$

and substitution in equation (16) followed by expansion leads to the central difference formula

(17)

with a principal truncation error of $ O(k^{3}+kh^{2})$. This is the Crank-Nicolson formula and may be written in the form

(18)

Next:Solution of Tridiagonal systems: :Up:Main Previous:Derivation of an exact difference formula