Calculus: The Language of Change

Exercise Set 2.1
Using Calculus to Model Epidemics

by Kevra Tanke

Exercise 1

Use the daily change above to compute 4 days of a rubella epidemic.  You need the specific parameters,  a, b, and c.

part a

For rubella, we know that (1/b) = 11 and the average contact number is c=6.8.  Use these values to compute the parameter  a.

Solution of part a

We are asked to find a, which is the daily rate of contacts per infective.

From the text, we learned that 
	 a=b*c
where

c= the average number of contacts per infective during the whole infectious period
and
b=1/(the average number of days infectious)

The problem tells us
	(1/b) = 11
So,
	b=(1/11)
and
	c=6.8

So to find a we multiply b and c,
	a=(1/11)*6.8

(1/11)*6.8

Therefore,

	a=.618182

part b

Suppose a population initially (at t=0) has
	S=10,000
	I=1,000
	R=19,000

Use the equations of change above to complete a table showing the first four days of the epidemic.

Solution of part b

Using the equations from part a, we obtain:

(1/b) = 11   or   b=(1/11)

a=.618182

To find n (the population) we need to add the number of people up:
	
	n = S + I + R

n  =  10000  +  1000  +  19000

To fill out our table we need the equations for S, I, and R, obtained from the text:

	tomorrow's increase in S = -a(S/n)I
	
	tomorrow's increase in I = a(S/n)I - bI

To compute (Subscript[S, 1])

On the first day we use

	 (Subscript[S, 1])=(Subscript[S, 0]) -a((Subscript[S, 0])/n)(Subscript[I, 0])
	
so putting in the values of a, n, and I we obtain:

	S= 10000-.618182(10000/30000)*1000

10000-.618182(10000/30000)*1000

So  (Subscript[S, 1])  on the first day is

	(Subscript[S, 1]) = 9793.94

To compute (Subscript[I, 1])

On the first day we use

	(Subscript[I, 1]) =(Subscript[I, 0])+ a((Subscript[S, 0])/n)  (Subscript[I, 0]) - b(Subscript[I, 0])
	
so putting in the values of a, n, and I we obtain:

	I=1000+ .618182(10000/30000)*1000 - (1/11)*1000

1000+ .618182(10000/30000)*1000 - (1/11)*1000

So (Subscript[I, 1])on the first day is:

	(Subscript[I, 1]) = 1115.15

To compute  (Subscript[R, 1])

On the first day we use
					(Subscript[R, 1])   =  n - (Subscript[S, 1]) - (Subscript[I, 1])
	\(so\ putting\ in\ the\ values\ of\ b\ and\ I\ we\ 
            \(obtain : 
	
					R\_1\)\  = \ \ 
          30000 - 9793.94 - 1115.15\)
										(Subscript[R, 1]) =  19090.91

So far, our table is:

({{t, 0, 1, 2, 3, 4}, {S, 10000, 9793.94, □, □, □}, {I, 1000, 1115.15, □, □, □}, {R, 19000,  19090.91, □, □, □}})

Computing the rest of the Table

Using the following computations we can fill in the rest of the table:
(note:  S=sNr, I=iNr, and R=rNr)
Press Enter.

\(sNr = 10000; 
iNr = 1000; 
rNr = 19000; 
n = sNr + iNr + rNr; 


    b = 1/11; 
c\  = \ 6.8; 
a\  = \ b\ c; 
t = 0.0; 


    iPairs\  = \ {{t, iNr}}; 
sPairs\  = \ {{t, sNr}}; 

    rPairs\  = \ {{t, rNr}}; 

Print[\ "Day ", \ t\ ]\ ; 

    Print[\ "S[", t, "] = ", sNr\ ]\ ; 

    Print[\ "I[", t, "] = ", iNr\ ]\ ; 

    Print["R[", t, "] = ", \ rNr\ ]; 

finalTime\  = \ N[4]; 


    Do[
snr\  = \ sNr\  - \ a\ sNr/n\ iNr; 

      inr\  = \ iNr\  + \ a\ sNr/n\ iNr\  - \ b\ iNr; 

      rnr\  = \ n\  - \ snr\  - \ inr; 
sNr = snr\ ; 
iNr = inr; 

      rNr = rnr; 

Print[\ "Day ", \ t\ ]\ ; 

      Print[\ "S[", t, "] = ", sNr\ ]\ ; 

      Print[\ "I[", t, "] = ", iNr\ ]\ ; 

      Print["R[", t, "] = ", \ rNr\ ]; 


      iPairs\  = \ AppendTo[iPairs, {t, iNr}]; 

      sPairs\  = \ AppendTo[sPairs, {t, sNr}]; 

      \(rPairs\  = \ AppendTo[rPairs, {t, rNr}]; \)
	, {t, 1, finalTime}]
      \)

Our table is:

({{t, 0, 1, 2, 3, 4}, {S, 10000, 9793.94, 9568.88563875671493`, 9324.61723149397592`, 9061.28908700643442`}, {I, 1000, 1115.15, 1238.82785986587617`, 1370.47555259535291`, 1509.21501048331663`}, {R, 19000,  19090.9, 19192.2865013774099`, 19304.9072159106742`, 19429.4959025102471`}})

part c

Use your completed table to graph S versus t, I versus t, and R versus t.

Solution of part c

Graph S vs. t:

Press enter.

ListPlot[sPairs , PlotJoined -> True]TableForm[sPairs]

Graph T vs. t:

Press enter.

ListPlot[iPairs, PlotJoined -> True]TableForm[iPairs]

Graph R vs. t:

Press enter.

ListPlot[rPairs, PlotJoined -> True]TableForm[rPairs]

Exercise 2

Write formulas for (an unknown) S[t+1], I[t+1], and R[t+1] in terms of a (known) S[t], I[t], and R[t].  Write your formulas so that S[t+1], I[t+1], and R[t+1] are on the left-hand side of the equalities and expressions in S[t], I[t], and R[t] are on the right.

Solution

Finding S[t+1]

Recall, from the text pg .  26, \(the\ \(formula : 
					new\ cases\ tommorw\)\)= a(S/n)ITake the number of suseptable people today,  S[t],  
        and take away the number people that are infected tomorrow
           					tomorrow' s increase in  S = -a(S/n)I and get the suseptable people for tomorrow,  S[t + 1]:

S[t + 1] = S[t] - (aS[t]/n I[t])

Finding I[t+1]

Recall, from the text pg .  27, \(the\ \(formula : 
				tomorrow' s\ increase\ in\ \ I\)\) = a(S/n)I - bI						I[t + 1] = I[t] +( aS[t]/n I[t] - b*I[t])

Finding R[t+1]

R is the number of individuals removed.  Since everyone in our population has to be in one of the S-I-R categories we can compute R knowing n, S, and I.  We find R by taking the total population (n) and subtracting the number suseptable (S) and subtracting the number infected (I):

	R[t+1] = n - S[t+1] - I[t+1]

Exercise 3

The equations of change are not needed to compute all three compartment sizes.  If S[t] and I[t] are known, express R[t] in terms of n, S[t], and I[t].   (Hint:  What is the total population in terms of categories?)

Solution

\(TextForm\`Find\ R[t] interms\ of\ n, S[t], \ 
    and\ I[t] . \ \ n\ is\ the\ total\ population . \ \ If\ \ S[t]\ is\ the\ 
        number\ of\ susceptible\ people\ and\ I[t]\ is\ the\ number\ of\ 
        infectious\ people\ then\ the\ remaining\ population\ is\ the\ number
        \ of\ removed\ individuals . 
		
R[t]\  = \ 
      n - S[t]\  - \ I[t]\)

Exercise 4

What are the units of the expression:

part a

What does       a * I      measure?

Solution of part a

The units a and I are:
	a = the daily rate of contacts per day
	I = number of infectious people on a particular day

So,
	a * I = the total number of adequate contacts per day

part b

What does 
	
	a * I * (S/n)
	
measure?

Solution of part b

The units a, I, S, and n are:
	a = the daily rate of contacts per day
	I = number of infectious people on a particular day
	S = the number of susptable people 
	n = total number of people in the population

We multiply the total number of adequate contacts per day (a * I) times the fraction of suseptable people ((S/n)) which gives us the number of new cases of the disease (a * I * (S/n)).

So,
	a * I * (S/n) = number of new cases of  the disease

part c

What does
	
	b * I
	
measure?

Solution of part c

The units I and b are:
	I = number of infectious people on a particular day
	b = 1/(average number of days infectious)

We multiply number of infectious people on a particular day ( I ) times 1/(average number of days infectious) (b) which gives us the number of infectious people on a particular day divided by the average number of days infectious (I * b).  
Also, I * b is the formula for finding tomorrow's increase in R, which is the number of removed individuals.

So,
	I * b = new removed induviduals

Exercise 5

Computer Project

Exercise 6: Conjectures

We want you to speculate on the course of different kinds of diseases.  Suppose disease "A" is very virulent; that is, it is very easily spread.  Sketch the graph of I versus t for such a disease.  Now do the same for disease "B," which is not so virulent.  Suppose both diseases have an infectious period of 14 days.  What is the value of b for both models of these diseases?  How does the parameter a for disease A, (Subscript[a, a])compare to the parameter a for disease B, (Subscript[a, b])?  Later in this chapter, you should compare your speculations with computed results.

Solution

Disease A

If the disease is very virulent then the number of people coming in contact with it are greater.  So we increased c to 15.

\(TextForm
    \`Sketch\ the\ graph\ of\ I\ versus\ t\ for\ disease\ \(A . \)\)

\(Needs["Graphics`Colors`"]; 
sNr = 10000. ; 
iNr = 1000. ; 

    rNr = 19000. ; 
n = sNr + iNr + rNr; 

b = 1/14. ; 
c\  = \ 15. ; 

    a\  = \ b\ c; 
t = 0.0; 

iPairs\  = \ {{t, iNr}}; 

    sPairs\  = \ {{t, sNr}}; 
rPairs\  = \ {{t, rNr}}; 


    finalTime\  = \ N[50]; 


    Do[
snr\  = \ sNr\  - \ a\ sNr/n\ iNr; 

      inr\  = \ iNr\  + \ a\ sNr/n\ iNr\  - \ b\ iNr; 

      rnr\  = \ n\  - \ snr\  - \ inr; 
sNr = snr\ ; 
iNr = inr; 

      rNr = rnr; 

\(iPairs\  = \ AppendTo[iPairs, {t, iNr}]; \)

      	, {t, 1, finalTime}]
	\)virulent = 
      ListPlot[iPairs , PlotJoined -> True, 
        PlotStyle -> {AbsoluteThickness[3], Red}];

Disease B

This disease is not easily spread so we decreased c.

\(TextForm
    \`Sketch\ the\ graph\ of\ I\ versus\ t\ for\ disease\ \(B . \)\)

\(sNr = 10000. ; 
iNr = 1000. ; 
rNr = 19000. ; 
n = sNr + iNr + rNr; 
    

b = 1/14. ; 
c\  = \ 5. ; 
a\  = \ b\ c; 
t = 0.0; 


    iPairs\  = \ {{t, iNr}}; 
sPairs\  = \ {{t, sNr}}; 

    rPairs\  = \ {{t, rNr}}; 

finalTime\  = \ 50; 


    Do[
snr\  = \ sNr\  - \ a\ sNr/n\ iNr; 

      inr\  = \ iNr\  + \ a\ sNr/n\ iNr\  - \ b\ iNr; 

      rnr\  = \ n\  - \ snr\  - \ inr; 
sNr = snr\ ; 
iNr = inr; 

      rNr = rnr; 
	
\(iPairs\  = \ AppendTo[iPairs, {t, iNr}]; \)

      	, {t, 1, finalTime}]
	\)nonvirulent = 
      ListPlot[iPairs , PlotJoined -> True, PlotStyle -> Blue];

Compare the graphs of the two diseases.

Show[virulent, nonvirulent];

Comparethe parameters a and b for two diseases.

The value of b for both diseases is ((1 )/days)  =  (1/14).

In disease A,

(Subscript[a, A]) =  (1/14.) * 15.

And in disease B,

(Subscript[a, B])=  (1/14.) * 5.

Exercise 7

Which parts of our model are invalid for describing a flu epidemic on our campus that begins just before Thanksgiving break?  Is our model valid for a flu epidemic that begins just after Thanksgiving break?

Solution

Begin before Thanksgiving break-
If we look back in the text on pg .  24 and  read part b of Basic Assumptions  we recall that the population is fixed in size and confined to a well-defined region.   If we tried to model a flu epidemic that began before Thanksgiving break the population wouldchange once Thanksgiving break began .   During this time 
          many students and professors would be traveling away from 
          the campus to visit their relatives so the fixed population of a 
        college campus would no longer exist .

The students and professors who travel are not only causing the fixed population to no longer be fixed but they may also be changing the number of people that they come in contact with.  If we look back in the text on pg. 24 and  read part c of Basic Assumptions we recall that everyone comes in contact with the same fraction of people in each category every day.

If we go on vacation for Thanksgiving we change the population we are working with and we change the people that we come in contact with.  So our model would not be valid.

Begin after Thanksgiving break-
If we begin after break a student may have caught it somewhere away from the campus, however, the model is not a measure of orgins of the epidemic but a measure of how the disease spreads.  When we begin the model after Thanksgiving break we will have a fixed population as the students and professors go back to classes and keep a consistent number of contacts each day.  No matter when we begin the model, as long as the Basic Assumptions (stated on pg. 24) are kept, we have a valid model.