SciMS - Applied Mathematical Analysis The University of Queensland

Euler's method


Euler's method is one of the simplest numerical methods for approximating solutions of first-order initial-value problems \[ y'=f(x,y),\quad y(x_0)=y_0. \] The idea behind this method is to find approximate values for the solution at equally spaced numbers

$$x_0, \;x_1=x_0+h, \;x_2=x_1+h, \;x_3=x_2+h, \ldots$$
where $h$ is the step size. The differential equation tells us that the slope at $(x_0,y_0)$ is $y'=f(x_0,y_0)$, so the approximate value of the solution when $x=x_1$ is $$y_1=y_0+h\,f(x_0,y_0)$$ as it is shown in Figure 1.
Euler's diagram
Figure 1: Approximate value of the solution.
Similarly, $$y_2=y_1+h\,f(x_1,y_1).$$ In general $$y_n=y_{n-1}+h\,f(x_{n-1},y_{n-1}).$$


Simulation

The following simulation shows exact solutions and approximate solutions of first-order initial-value problems $y'=f(x,y)$, $ y(x_0)=y_0$.

Things to try:

Sorry, the simulation is not supported for small screens.


Open separate tab Download

Worksheet exemplar

The following file contains activities and problems associated with the simulation.