next up previous
Next: The Growth Equation Up: Euler Method Previous: Order of Accuracy


Stability

The Euler method is 1st order accurate. However there is another important consideration in analysing the method: stability. Let us suppose that at some time the actual numerical solution deviates from the true solution of the difference equation (1.11) (N.B. not the original differential equation (1.7)) by some small amount $\delta y$, due, for example, to the finite accuracy of the computer. Then adding this into (1.11) gives
\begin{displaymath}
y_{n+1} + \delta y_{n+1}
= y_n + \delta y_n
- \delta t \l...
...ft.\partial f\over\partial y\right\vert _n \delta y_n\right],
\end{displaymath} (1.17)

where the term in brackets, $[]$, is the Taylor expansion of $f(y,t)$ with respect to $y$. Subtracting (1.11) we obtain a linear equation for $\delta y$
\begin{displaymath}
\delta y_{n+1} = \left[1 -
\delta t \left.\partial f\over\partial y\right\vert _n\right] \delta y_n ,
\end{displaymath} (1.18)

which it is convenient to write in the form
\begin{displaymath}
\delta y_{n+1} = g \delta y_n .
\end{displaymath} (1.19)

If $g$ has a magnitude greater than one then $\delta y_n$ will tend to grow with increasing $n$ and may eventually dominate over the required solution. Hence the Euler method is stable only if $\vert g\vert\le 1$ or
\begin{displaymath}
-1 \le 1 - \delta t {\partial f\over\partial y} \le +1.
\end{displaymath} (1.20)

As $\delta t$ is positive by definition the 2nd inequality implies that the derivative must also be positive. The 1st inequality leads to a restriction on $\delta t$, namely
\begin{displaymath}
\delta t \le 2/{\partial f\over\partial y}.
\end{displaymath} (1.21)

When the derivative is complex more care is required in the calculation of $\vert g\vert$. In this case it is easier to look for solutions of the condition $\vert g\vert^2\le 1$. For the oscillation equation (1.1c) the condition becomes
\begin{displaymath}
1 + \delta t^2 \omega^2 \le 1
\end{displaymath} (1.22)

which is impossible to fulfil for real $\delta t$ and $\omega$. Comparing these result with our 3 types of differential equations (1.1) we find the following stability conditions


Decay Growth Oscillation
$\delta t \le 2/\alpha$ unstable unstable


The Euler method is conditionally stable for the decay equation. A method is stable if a small deviation from the true solution does not tend to grow as the solution is iterated.


next up previous
Next: The Growth Equation Up: Euler Method Previous: Order of Accuracy