Euler's Method -- Formulas

This module is about two numerical methods for estimating solutions to initial value problems of the form


                               dy
                               -- = f(t, y),   y(a) = w
                               dt

                               on the interval [a, b].

Euler's Method is the basis for most numerical methods -- it is simple and easy-to-understand. But it is somewhat crude and inefficient. For that reason we usually use one of the more sophisticated methods like those built in to Mathematica, Maple, or the one included in the TI-92 window. Once you understand Euler's Method you will have a good understanding of the general principles behind these more sophisticated methods.

Euler's Method

The formulas we develop here represent algebraically the work we did in the last module, Euler's Method in Pictures.

Euler's method is summarized in the box below.


Summary of Euler's Method in Formulas

To estimate the solution of the initial value problem


                              dy
                              -- = f(t, y),  y(a) = w
                              dt

                              on the interval [a, b]

using n steps, compute


                              b - a
                         h = -------
                                n

                         ti = a + i h,   i = 0, 1, 2, ... n

                         w0 = w

                         wi = wi - 1 + f(ti - 1, wi - 1) h,   i = 1, 2, ... n.


The example below illustrates these calculations for the initial value problem


                         dy
                         -- = 2t + y,   y(1) = 0
                         dt

                         on the interval [1, 3] 

using n = 10 steps.

First notice that h = 0.2.


     -------------------------------------------------------------------
     Step    ti - 1      ti        wi - 1      f(ti - 1, wi - 1)         wi
     ------------------------------------------------------------------- 
       1      1.0       1.2        .0000          2.0000           .4000
       2      1.2       1.4        .4000          2.8000           .9600
       3      1.4       1.6        .9600          3.7600          1.7120
       4      1.6       1.8       1.7120          4.9120          2.6944
       5      1.8       2.0       2.6944          6.2944          3.9533
       6      2.0       2.2       3.9533          7.9533          5.5439
       7      2.2       2.4       5.5439          9.9439          7.5327
       8      2.4       2.6       7.5327         12.3327          9.9993
       9      2.6       2.8       9.9993         15.1993         13.0391
      10      2.8       3.0      13.0391         18.6391         16.7669
     -------------------------------------------------------------------


Do each of the following problems step-by-step "by hand" using a calculator or your CAS window only to do the individual calculations. After you've done each problem "by hand" you can check your answers using your CAS window.


More Sophisticated Computer-Based Numerical Methods

Euler's Method is a relatively crude method for estimating solutions to intial value problems. For differential equations of the form


                         dy
                         -- = f(t),  y(a) = 0
                         dt

                         on the interval [a, b]

it is equivalent to the left endpoint method of estimating the area under the curve y = f(t) between the lines t = a and t = b.

There are many, more sophisticated and efficient, methods of estimating solutions to initial value problems. Your CAS window explains how to use one such method.


Use your CAS window to investigate solutions to the three differential equations below with various different initial conditions. These three differential equations are variations of Newton's Model of Cooling with different ambient temperatures. Do a lot of experimentation and try to discover the impact of the parameters k, m, w, and q. Describe these three differential equations physically and the behavior that you see, especially the impact of the parameters k, m, w, and q.


                         dT
                         -- = k[m t -T]
                         dt


                         dT
                         -- = k[sin (2 pi w t) - T]
                         dt


                         dT      qt
                         -- = k(e   - T)
                         dt


Copyright c 1997 by Frank Wattenberg, Department of Mathematics, Montana State University, Bozeman, MT 59717