In Part 3, we displayed solutions of an SIR model without any hint of solution formulas. This suggests the use of a numerical solution method, such as Euler's Method, which we assume you have seen in the context of a single differential equation. Nevertheless, we review the basic idea here.

Recall the *idea* of Euler's Method: If we have a "slope formula," i.e., a way to calculate **dy/dt** at any point **(t,y)**, then we can generate a sequence of **y**-values,

**y**_{0}, y_{1}, y_{2}, y_{3}, ...

by starting from a given **y**_{0} and computing each *rise* as *slope* x *run*. That is,

**y**_{n} = y_{n-1} + slope_{n-1} Delta_t

where **Delta_t** is a suitably small step size in the time domain.

It really doesn't matter in this calculation if the slope formula happens to depend not just on **t** and **y** but on other variables, say **x** and **z** -- as long as we know how **x** and **z** are related to **t** and **y**. If **x** and **z** happen to be other dependent variables in a system of differential equations, we can generate values of **x** and **z** in the same way.

Of course, for the SIR model, we want the dependent variable names to be **s**, **i**, and **r**. Thus we have three Euler formulas of the form

**s**_{n} = s_{n-1} + s-slope_{n-1} Delta_t,

**i**_{n} = i_{n-1} + i-slope_{n-1} Delta_t,

**r**_{n} = R_{n-1 }+ r-slope_{n-1} Delta_t,

More specifically, given the SIR equations,

the Euler formulas become

Of course, to calculate something from these formulas, we must have explicit values for **b**, **k**, **s(0)**,

**i(0)**, **r(0)**, and **Delta_t**. In this part we explore the adequacy of these formulas for generating solutions of the SIR model. If your helper application has Euler's Method as an option, we will use that rather than construct the formulas from scratch.

- In your helper application (CAS) worksheet, you will find commands to use the built-in differential equations solver. Use these commands, with the sample values of
**b = 1/2** and **k = 1/3** in your worksheet, to generate graphical solutions of the SIR equations, starting from **s(0) = 1, i(0) = 1.27 x 10**^{-6}, and **r(0) = 0**.

- Now generate Euler's Method solutions for the three sectors of the population. Start with a relatively coarse step size of
**Delta_t = 10** days, and let **t** range up to **150** days. Superimpose these solutions on the "exact" solutions from Step 1. Do you think the Euler solutions closely track true solutions of the system? Why or why not? What characteristic of Euler's Method causes the approximate solutions to behave the way they do?

- Change the step size to
**1** day and replot the Euler solutions. Now do they closely track true solutions of the system? Why or why not?

- Find a step size for which the Euler solutions appear to closely track true solutions of the system.