next up previous contents index

2.3.9 Truncation error

A sufficiently smooth function can be expanded in a Taylor series:

\begin{displaymath}
\rho \left( x + \Delta x, t \right)
=
\sum_{l=0}^{\infty}...
...rt _{x,t}} \Delta x
+ O \left( \Delta x^2 \right)
\enspace .
\end{displaymath} (95)
Solving for \bgroup\color{DEFcolor}$ \frac{\partial \rho}{\partial x} $\egroup gives
\begin{displaymath}
\frac{\partial \rho}{\partial x}
=
\frac{\rho \left( x +...
... t \right)}{\Delta x}
+
O \left( \Delta x\right)
\enspace .
\end{displaymath} (96)
Repeating this for the time derivative and applying it to an entire PDE (FTCS) gives
\begin{displaymath}
\underbrace{ \frac{\partial \rho}{\partial t} + v_{}   \fr...
...a t, \Delta x^2 \right)}_{\mbox{truncation error}}
\enspace .
\end{displaymath} (97)
The order of the truncation error is \bgroup\color{DEFcolor}$O \left( \Delta t, \Delta x^2 \right)$\egroup in this case.