next up previous
Next: Example: the nonlinear pendulum Up: tutorial6 Previous: tutorial6

Overview

In Tutorial 5, we studied the 2nd order Runge-Kutta method, which uses the iteration

\begin{eqnarray*}
k_1 &=& h f(t_n,y_n) \\
k_2 &=& h f \left( t_n+ {h \over 2}, y_n + {k_1 \over 2} \right ) \\
y_{n+1} &=& y_n + k_2
\end{eqnarray*}



to solve the ODE $dy/dt=f(t,y)$ for some specified $y(0)$.

This week we apply this method to solve a system of two equations, arising from a second order differential equation, and compare the results with those obtained from the inbuilt MATLAB routine ode45.m.



Charlie Macaskill 2004-07-26