next up previous
Next: The Predictor-Corrector Method Up: Ordinary Differential Equations Previous: The Leap-Frog Method


The Runge-Kutta Method

So far we have found one method which is stable for the decay equation and another for the oscillatory equation. Can we combine the advantages of both? As a possible compromise consider the following two step algorithm (ignoring vectors)
$\displaystyle y'_{n+{\mathchoice{{\textstyle{\frac12}}}{{\textstyle{\frac12}}}{{\scriptstyle{1/2}}}{{\scriptscriptstyle{1/2}}}}}$ $\textstyle =$ $\displaystyle y_n - {\mathchoice{{\textstyle{\frac12}}}{{\textstyle{\frac12}}}{{\scriptstyle{1/2}}}{{\scriptscriptstyle{1/2}}}}\delta t f(y_n, t_n)$ (1.35)
$\displaystyle y_{n+1}$ $\textstyle =$ $\displaystyle y_n - \delta t f(y'_{n+{\mathchoice{{\textstyle{\frac12}}}{{\text...
...2}}}{{\textstyle{\frac12}}}{{\scriptstyle{1/2}}}{{\scriptscriptstyle{1/2}}}}}).$ (1.36)

In practice the intermediate value $y'_{n+{\mathchoice{{\textstyle{\frac12}}}{{\textstyle{\frac12}}}{{\scriptstyle{1/2}}}{{\scriptscriptstyle{1/2}}}}}$ is discarded after each step. We see that this method consists of an Euler step followed by a Leap-Frog step. This is called the 2nd order Runge-Kutta or two-step method. It is in fact one of a hierarchy of related methods of different accuracies. The stability analysis for (1.4) is carried out in the same way as before. Here we simply quote the result
\begin{displaymath}
\delta y_{n+1} = \left[1 - \delta t{\partial f\over\partial...
...ta t {\partial f\over\partial y}\right)^2\right]
\delta y_n.
\end{displaymath} (1.37)

In deriving this result it is necessary to assume that the derivatives, $\partial f/\partial y$ are independent of $t$. This is not usually a problem. From (1.37) we conclude the stability conditions


Decay Growth Oscillation
$\delta t \le 2/\alpha$ unstable $1 + {\mathchoice{{\textstyle{\frac14}}}{{\textstyle{\frac14}}}{{\scriptstyle{1/4}}}{{\scriptscriptstyle{1/4}}}}(\delta t\omega)^4 \le 1$
Note that in the oscillatory case the method is strictly speaking unstable but the effect is so small that it can be ignored in most cases, as long as $\omega\delta t < 1$. This method is often used for damped oscillatory equations.
next up previous
Next: The Predictor-Corrector Method Up: Ordinary Differential Equations Previous: The Leap-Frog Method