next up previous contents index

2.3.14 Truncation error

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

\rho \! \left( x + \Delta x, t \right)
...rt _{x,t}} \Delta x
+ O \left( \Delta x^2 \right)
\enspace .
\end{displaymath} (105)
Solving for \bgroup\color{DEFcolor}$ \frac{\partial \rho}{\partial x} $\egroup gives
\frac{\partial \rho}{\partial x}
\frac{\rho \! \left( ...
... t \right)}{\Delta x}
O \left( \Delta x\right)
\enspace .
\end{displaymath} (106)
Repeating this for the time derivative and applying it to an entire PDE (FTFS) gives
\underbrace{ \frac{\partial \rho}{\partial t} + v_{}   \fr...
...elta t, \Delta x\right)}_{\mbox{truncation error}}
\enspace .
\end{displaymath} (107)
The order of the truncation error is \bgroup\color{DEFcolor}$O \left( \Delta t, \Delta x\right)$\egroup in this case (FTFS).

A high order of the truncation error (both in \bgroup\color{DEFcolor}$\Delta t$\egroup and \bgroup\color{DEFcolor}$\Delta x$\egroup) hints at good accuracy for smooth functions.