next up previous
Next: Order of Accuracy Up: Ordinary Differential Equations Previous: Types of Differential Equation


Euler Method

Consider an approximate solution of (1.8) over a small interval $\delta t = t_{n+1} - t_n$ by writing the integral as
\begin{displaymath}
\int_{t_n}^{t_{n+1}}\bi{f}(\bi{y}(t'), t')\,\d t'
\approx \delta t\,\bi{f}(\bi{y}(t_n), t_n).
\end{displaymath} (1.10)

to obtain

\begin{displaymath}
\bi{y}(t_{n+1}) = \bi{y}(t_n) - \delta t\, \bi{f}(\bi{y}(t_n), t_n).
\end{displaymath}

or, in a more concise notation,
\begin{displaymath}
\bi{y}_{n+1} = \bi{y}_n - \delta t\, \bi{f}(\bi{y}_n, t_n)
= \bi{y}_n - \delta t\, \bi{f}_n.
\end{displaymath} (1.11)

We can integrate over any larger interval by subdividing the range into sections of width $\delta t$ and repeating (1.11) for each part. Equivalently we can consider that we have approximated the derivative with a forward difference
\begin{displaymath}
\left.\d\bi{y}\over\d t\right\vert _n
\approx {\bi{y}_{n+1} - \bi{y}_n\over\delta t}.
\end{displaymath} (1.12)

We will also come across centred and backward differences,
\begin{displaymath}
\left.\d\bi{y}\over\d t\right\vert _n \approx
\begin{case...
...\bi{y}_n - \bi{y}_{n-1}\over\delta t}& backward
\end{cases}
\end{displaymath} (1.13)

respectively. Here we have used a notation which is very common in computational physics, in which we calculate $\bi{y}_n = \bi{y}(t_n)$ at discrete values of $t$ given by $t_n = n \delta t$, and $\bi{f}_n =
\bi{f}(\bi{y}_n, t_n)$. In what follows we will drop the vector notation $\bi{y}$ except when it is important for the discussion.

Subsections
next up previous
Next: Order of Accuracy Up: Ordinary Differential Equations Previous: Types of Differential Equation