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.
The two figures below from the module Euler's Method in Pictures illustrate our goal with the example
dy -- - 0.05 (65 - y), y(0) = 180 dt on the interval [0, 30]
with n = 8 and n = 16.


b - a h = ------- n ti = a + i h, i = 0, 1, 2, ... n
as shown in the figure below. The number h represents the time between the "midcourse corrections." Notice that t0 = a and tn = b.

dy -- (t0) = f(t0, w0) dt
Visually this gives us the slope or, in our lake analogy, the direction of the current shown in red in the figure below.

Our step takes us h units in the t direction, from t = t0 to t = t1 and, because the slope of this line segment f(t0, w0) it takes us
units in the y-direction, from the point w0 to the point
as shown in the figure below.

as shown in the figure below.

We determine the slope of this step (indicated in red in the figure above) by computing
Then we step from ti - 1 to ti in the t direction and from wi - 1 to
in the y direction. This takes us to the point
shown in the figure above.
Euler's method is summarized in the box below.
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.
dy -- = y, y(0) = 1 dt on the interval [0, 1]
using n = 4 steps.
dy -- = y, y(0) = 1 dt on the interval [0, 1]
using n = 8 steps.
dy -- = t - y, y(0) = 0 dt on the interval [0, 10]
using n = 5 steps.
dy -- = t - y, y(0) = 0 dt on the interval [0, 10]
using n = 10 steps.
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