# Math Insight

### Sketch evolution of an SIR model

Elementary dynamical systems
Name:
ID #:
Due date:
Table/group #:
Group members:
Total points: 3
1. Consider the SIR model for an infectious disease, \begin{align*} S'(t) &= - SI\\ I'(t) &= SI - 0.5 I \end{align*} where we've set the parameters $\alpha=1$ and $\mu=0.5$. Since $S(t)$ and $I(t)$ represent the fraction of the population that is susceptible and infected, these state variables are always between
and
1. Is the fraction of susceptibles $S(t)$ increasing or decreasing? $S(t)$ is always
.

Under what conditions is the fraction of susceptibles not changing? $S(t)$ is unchanging if $S'(t)=$
. At any instant during which this condition is satisfied, the fraction is susceptibles holding still.

Let's derive an expression that will tell us for what values of $S(t)$ and $I(t)$ the fraction of susceptible stops changing. For simplicity, we'll drop the $t$ from the state variables, and just write them as $S$ and $I$. Given the above equation for $S'(t)$, the condition in terms of $S$ and $I$ is
$=0$. You can get rid of the minus sign to simplify the condition to
$=0$.

Your answer for the fraction of susceptibles being constant (at least for an instant) should be a product of two factors, one involving $S$ and the other $I$. This product can be zero only if one of the factors is zero. Therefore the fraction of susceptibles is holding still if either
$=0$ or if
$=0$ (enter answer involving $S$ first).

We can interpret this condition as meaning that the number of susceptibles will stay the same when either
or
.

2. Under what conditions is the rate of change in the fraction of infectives, $I'(t)$, equal to zero? When $I'(t)=$
. Plugging in the above expression for $I'(t)$, this condition, in terms of $S$ and $I$, becomes
$= 0$. Factor this expression to rewrite it as
$=0$.

Your answer for the fraction of infectives being constant (at least for an instant) should be a product of two factors, one involving $S$ and the other $I$. This product can be zero only if one of the factors is zero. Therefore there is no change in the fraction of infectives when either $S=$
or if $I=$
.

Under what conditions does the fraction of infectives increase? It increases if $I >0$ and
. (Answer is an inequality involving $S$.)

Under what conditions does the fraction of infectives decrease? It decreases if $I >0$ and
. (Answer is an inequality involving $S$.)

3. Since we have two differential equations, we cannot use a single phase line to describe the system. We need two dimensions to specify the values of the two state variables $S$ and $I$. To represent our two-dimensional state space, we'll use a phase plane, as shown to the right. The two axes of the phase plane are $S$ and $I$. A point $(S,I)$ on the phase plane corresponds to a particular state of the system.
Feedback from applet
direction of vectors:
location of vectors:
nullclines:

Use the phase plane to summarize your above results. First, draw lines corresponding to the values of $(S$ and $I$ where $S$ is not changing, i.e., where $S'(t)=0$. (Online, use the thick sold blue lines.) You derived two conditions for $S'(t)=0$, each of which is the equation for a line. (On the phase plane, $S$ acts like $x$ and $I$ acts like $y$.) Taken together, these lines are called the $S$ nullcline.

Next, draw lines corresponding to the values of $(S,I)$ where $I$ is not changing, i.e., where $I'(t)=0$. (Online, use the thin dashed green lines.) The two equations that you derived for the condition $I'(t)=0$ are each an equation for a line. Taken together, these lines are called the $I$ nullcline.

The last step is to draw vector (arrows) to represent whether $S$ is increasing or decreasing and whether $I$ is increasing or decreasing. A rightward pointing vector indicates $S$ is increasing and a leftward pointing vector indicates $S$ is decreasing (since $S$ is acting like $x$). A upward pointing vector indicates $I$ is increasing and a downward pointing vector indicates $I$ is decreasing (since $I$ is acting like $y$.) Therefore, a vector pointing downward and to the right indicates that, in that region of the phase plane, $S$ is decreasing while $I$ is increasing.

Since we only care about physical values of $S$ and $I$ (in particular, we can ignore negative values), the nullclines divide the phase plane into two regions. Draw a vector in each of those to regions indicating whether $S$ and $I$ are increasing or decreasing.

2. For the same SIR model, we will use Forward Euler with a time step of $\Delta t=3$ to sketch the solution with the initial conditions $S(0)=0.9$ and $I(0)=0.1$, i.e., when starting with 10% of the people infected.
1. We are going to create two plots, one of $I$ versus $t$ and another of $S$ versus $t$, where we'll plot the evolution of the disease for the first 9 units of time. Begin by drawing the initial condition these axes.
Feedback from applet
values of solution 1:
values of solution 2:
2. Given the initial conditions, calculate the derivatives $S'(0)$ and $I'(0)$. $S'(0) =$
, $I'(0)=$

Is the infection increasing or decreasing?
Draw the lines with these slopes from the initial conditions, above.

3. Estimate $S(3)$ as $S(0) + S'(0)\Delta t$ and $I(3)$ as $I(0) + I'(0)\Delta t$, where $\Delta t=3$. (This is a Forward Euler step.) $S(3) \approx$
, $I(3) \approx$
. Plot the results on your above graphs. The new points should be along the lines you drew.
4. Estimate the slopes $S'(3)$ and $I'(3)$ by plugging in your values for $I(3)$ and $S(3)$ into the differential equation. $S'(3) \approx$
, $I'(3) \approx$

Take another Forward Euler step with $\Delta t=3$ to estimate $S(6)$ and $I(6)$, and plot the results on your graphs. (Use the formulas $S(6)=S(3)+S'(3)\Delta t$ and $I(6)=I(3)+I'(3)\Delta t$.) $S(6) \approx$
, $I(6) \approx$

5. Estimate the slopes $S'(6)$ and $I'(6)$ by plugging in your values for $I(6)$ and $S(6)$ into the differential equation. $S'(6) \approx$
, $I'(6) \approx$
6. Is there anything significantly different about the derivatives at time $t=6$ than at previous times?
What does this mean about the evolution of the disease?
If one had a single autonomous differential equation, is it possible to see such a change in the behavior of a state variable like $I(t)$?
7. Take another Forward Euler step to approximate the values of $S(9)$ and $I(9)$ and add them to your graphs. $S(9) \approx$
, $I(9) \approx$

3. We will replot the Forward Euler solution on the phase plane, shown again here.
Feedback from applet
number of points:
number of steps:
values of solution:
vectors:
1. The first step is to rewrite the above values you calculated, $S(3)$, $I(3)$, $S(6)$, $I(6)$, $S(9)$, and $I(9)$, as points of the form $(S,I)$. The initial condition is the point $(S(0),I(0)) = (0.9,0.1)$. Rewrite the remainder of values as points.

$(S(3),I(3))=$

$(S(6),I(6))=$

$(S(9),I(9)) =$

2. Plot an initial condition point on the above phase plane at the coordinates $(S(0),I(0)) = (0.9,0.1)$. Plot three points based on the values you calculated above: $(S(3),I(3))$, $(S(6),I(6))$ and $(S(9),I(9))$.
3. At each of those four points, you also know the rates of change $S'(t)$ and $I'(t)$. For example, you should have calculated that $S'(0)=-0.09$ and $I'(0)=0.04$. The solution $(S(t),I(t))$, starting at $(S(0),I(0))$ must be moving leftward and upward (northwest), angling more leftward than upward. Draw an arrow at the point $(S(0),I(0))= (0.9,0.1)$ angling upward and to the left. (The arrow should be pointing toward the second point $(I(3),S(3))$ you drew above.) Repeat this process, drawing arrows corresponding to the direction of movement at each of the four points you drew in the phase plane. These arrows are called a vector field. (A vector is an arrow.)
4. Connect the four points in the phase plane with lines, showing the movement of the state variables $S(t)$ and $I(t)$ from time $t=0$ to $t=9$. The lines should correspond to the vectors you drew above.
5. You can illustrate what would happen if you had different initial conditions by drawing vectors at different points $(S,I)$. Plot vectors at $(S,I)=(0.2,0.4)$, $(S,I)=(0.8,0.2)$, $(S,I)=(0.3,0.1)$, $(S,I)=(0.5,0.3)$, and $(S,I)=(1,0)$. For at each point, plug in the values of $I$ and $S$ into the differential equations to determine the direction of movement. (If both $S'(t)$ and $I'(t)$ are zero, just draw a point with no arrow.)
6. If $S=0.5$, you should be on one of the nullclines you drew above. Redraw the nullclines on this phase plane. If $S=0.5$, what direction should the vectors point (assuming $I>0$)?
.