Natural Blogarithms Ramblings of a Christian Mathematician and Bioinformaticist

19Oct/090

Euler’s Method in Excel – Very Simple

During Calculus last week, we covered slope fields and Euler’s method of first order initial-value problems of the form

 \begin{array}{rcl} \displaystyle \frac{dy}{dx} & = & f(x,y) \\[2ex] y(x_0) & = & y_0. \end{array}

During class we demonstrated the use of slope field to perform a basic qualitative analysis. We utilized a couple of different online applets as well as Maple 13.

Visualizing Slope Fields and solutions
Another similar page, with zoom

Direction Fields - A Maple 13 Worksheet

Below is a short demonstration of how we set up a simple application of Euler's Method in Excel 2007. Consider the simple initial value problem:

 \begin{array}{rcl} \displaystyle \frac{dy}{dx} & = & x(6-y) \\[2ex] y(0) & = & 0. \end{array}

Recall that Euler's Method is given by

 \begin{array}{rcl} x_i &=& x_{i-1}+h\\[2ex] y_i &=& y_{i-1} + hf(x_{i-1},y_{i-1}) \end{array}

Watch the demo:

image

This is just a quick and dirty implementation of Euler’s method in Excel but it gets the job done.

Filed under: Mathematics No Comments