Spread a rumor math project

profileGhostcrazy
SpreadaDisease-teacher-final.pdf

TEACHER VERSION

Spread of a Disease

Shinemin Lin

Department of Mathematics

Savannah State University

3219 College Street

Savannah GA 31404

[email protected]

Abstract:

Many of students fear the term “Differential Equations”. They think it is a

scary mathematics. At this project I want to use Algebra based concept

“Difference Quotient” to solve Differential Equations models with the help

of Excel. That means even students only have College Algebra background,

they still can enjoy differential equation models. Derivative of a function is

the limit of difference quotient, 𝑓(𝑥+ℎ)−𝑓(𝑥)

ℎ of the function. If we choose h

small enough, we can approximate the derivative by difference quotient.

Spread of a Disease project can be use not only the spread of a disease, it

also can simulate the spread of a rumor. Sleeping Beauties project can

connect classroom mathematics and real-world applications. It is a modified

SIR model. It can also model disease control.

Keywords: Derivative, Difference Quotient, Proportion, Sleeping Beauty.

Tags: Spread, Contagious Disease

STATEMENT

Spread of a Disease

A contagious disease such as a flu virus is spread throughout a

community by people encountering other people. Let y(t) denote

the number of people who have infected disease and x(t) denote

the number of people who are healthy. It is reasonable to assume

that the rate 𝑑𝑦

𝑑𝑡 at which the disease spreads are proportional to the

number of interaction between those two groups of people. That

means 𝑑𝑦

𝑑𝑡 is jointly proportional to x(t) and y(t). Therefore, we

have the equation 𝑑𝑦

𝑑𝑡 = 𝑘𝑥𝑦, where k > 0 is the proportional

constant. Likewise, 𝑑𝑥

𝑑𝑡 = 𝑘𝑥𝑦, where k < 0 is the proportional

constant.

The diagram shows the rate of change of infected people is equal

to the product of infection rate k and the number of interaction of

healthy people x(t) and infected people y(t).

Example: Let assume that initially x (0) = 100, y (0) = 5 and the

infected rate is 0.05.

We approximate the derivative 𝑑𝑦

𝑑𝑡 by the difference quotient

𝑦(𝑡+ℎ)−𝑦(𝑡)

ℎ , and hence

𝑦(𝑡+ℎ)−𝑦(𝑡)

ℎ ≈ 0.05*x(t)*y(t). We solve for y (t

+ h) and have the formula (a).

y (t + h) ≈ y(t) + h*0.05*x(t)*y(t). ….. (a)

Healthy

People

Infected

PeopleInfection

Infection Rate

Similarly, 𝑑𝑥

𝑑𝑡 ≈

𝑥(𝑡+ℎ)−𝑥(𝑡)

ℎ ≈ -0.05*x(t)*y(t) and

x (t + h) ≈ x(t) – 0.05*x(t)*y(t) ………… (b)

In this example we will let h = 0.2. Later, we can try several values

for h to explore the differences of the solutions.

Equations (a) and (b) are the formula that we need to enter Excel

Worksheet.

i. Initially set up Excel Worksheet row 1, row 2 and row 3 as the

worksheet below.

ii. At row three enter initial conditions

iii. At cell A5, enter formula =A4+J$2; At B4 enter formula

=ROUNDDOWN(B4-H$2*J$2*B4*C4,0); At cell C4 enter

formula =ROUNDUP(C4+H$2*J$2*B4*C4,0).

iv. B4 and C4 are the formula (b) and (a) respectively and Round

function to round decimals do integers.

v. Copy formulas of B4 and C4 down until you see 0 at the

column B.

vi. Select cells A3 to C13 as data for the graph.

Sample Solution Using EXCEL:

Initial Conditions x(0) = 100 y(0) = 5

Infection

Rate = 0.05 h = 0.2

Time, t x((t) y(t)

0 100 5

0.2 95 10

0.4 85 20

0.6 68 37

0.8 43 62

1 16 89

1.2 2 103

1.4 0 105

1.6 0 105

1.8 0 105

2 0 105

2.2 0 105

2.4 0 105

2.6 0 105

2.8 0 105 When h = 0.2, at time =1.4 all people got infected. If you use smaller h,

3 0 105 you can get more acurate time when all people got infected.

Spread of a Disease

0

20

40

60

80

100

120

1 2 3 4 5 6 7 8 9

Spread of a Disease The decreasing line is x(t)

x((t ) y(t) t =1.4

Feed Back

1. Suppose a student carrying a flu virus returns to an isolated college

campus of 1000 student. Determine a differential equation for the

number of students y(t) who have contracted the flu if the rate of

change at which the flu spreads is proportional to the number of

interactions between the number of students who have the flu and

the number of student who have not yet been exposed to it.

Without medication when will all students have flu?

Instructions:

i. This is a similar question as previous example with initial

condition x (0) = 1000, and y (0) = 1.

ii. Submit your Excel worksheet with appropriate graph to earn

your grades.

2. Suppose a small community has a fixed population of n people. If

one person who wants to spread a rumor is introduced into this

community. If y(t) denote the number of people who know the

rumor, and x(t) denote the people who does not know the rumor. It

is reasonable to assume that the rate 𝑑𝑦

𝑑𝑡 at which the rumor spreads

is proportional to the number of encounters between the two

groups of people. How to define the differential equation to

interpret this situation? Assume the proportional constant is 0.05,

how long the rumor will spread to everyone in the community?

Instructions:

i. This is a similar question as previous example with

conditions x + y = n + 1, x (0) = n and y (0) = 1. n = xx00

where xx is your last two digits of your social security

number.

ii. Submit your Excel worksheet with graph to earn your

grades.

3. Modified SIR Model - Sleeping Beauty [2]

The SIR model assumes a disease runs its course quickly enough

that births and deaths (from other causes) will not affect the population

and that the disease itself will not kill the population. The SIR model

also assumes recovered persons will not infect others, or that a disease

will not mutate and infect the same person multiple times.

If we assume recovered persons are back to S group that is recovered

persons have equal chance as healthy people to get infected. It becomes

Sleeping Beauty Model except the interaction is between Princess and

Witches, instead of between Princess and Sleeping Beauties.

Sleeping beauty is a well-known fiction. The main idea is that

princess (P) got poisoned by a witch (W) became sleeping beauty (B).

There came a prince (K) who kissed sleeping beauty and turned

sleeping beauty back to princess. At this story princess and sleeping

beauty are major variables because they had change in quantities.

Witch and prince are auxiliary variables. They are constants. The

parameters are rate of poisoned by witch (r1) and rate of kissed by

prince (r2).

The diagram is as following [2]:

The rate of change of Sleeping Beauty B is the difference of, 𝑑𝐵

𝑑𝑡 =

r1*W*P - r2*K*B and the rate of change of Pis 𝑑𝑃

𝑑𝑡 = r2*K*B –r1*P*W.

Princesses Sleeping

Beauties

Poisoned Princess

Kissed by a Prince

Witches

Princes

Again, we approximate 𝑑𝐵

𝑑𝑡 by

𝐵(𝑡+ℎ)−𝐵(𝑡)

ℎ and approximate

𝑑𝑃

𝑑𝑡 by

𝑃(𝑡+ℎ)−𝑃(𝑡)

ℎ . Therefore, we have the formula (c) and (d) to enter to

Excel Worksheet.

B (t + h) ≈ B(t) +h*(r1*P(t)*W – r2*B(t)*K); …. (c) P (t + h) ≈ P(t) +h*(r2*B(t)*P(t) – r1*P(t)*W); …(d)

Example: If we assume initially there are 50 princesses, 2 witches and 4

princes and further assume that the poisoned rate is 0.4 and kissed rate are 0.2.

We will use h = 1 at this example. You can try other smaller values to explore

the differences of solutions. After we implement the above formulas to Excel

worksheet, we have solution as following:

i. Initially set up Excel Worksheet row 1, row 2 and parameters

rates as the worksheet below.

ii. At row two enter initial conditions

iii. At cell E2, enter formula =ROUND(G5*G$2*G$4*C2,0); At

D2 enter formula =ROUND(G5*G$1*G$3*B2,0); At cell C2

enter formula =ROUND(C2+D3-E2,0); At cell B2 enter

formula =ROUND(B2+E2-D3,0). Use Excel Round function to

round all decimal entries to integers.

iv. C2 and B2 are the formula (a) and (b) respectively.

v. Copy formulas of B2, C2, D2, and E2 down.

vi. Select cells B2 to C20 as data to insert the graph.

Sample Excel Solution:

Time Princesses

Sleeping

Beauties Poisoned Kissed

Poisoned

Rate = 0.4

0 50 0 0 0 Kissed Rate = 0.2

1 10 40 40 0 Witch = 2

2 2 48 8 32 Prince = 4

3 32 18 2 38

4 44 6 26 14

5 23 27 35 5

6 10 40 18 22

7 24 26 8 32

8 37 13 19 21

9 28 22 30 10

10 16 34 22 18

11 21 29 13 27

12 31 19 17 23

13 29 21 25 15

14 21 29 23 17

15 21 23 17 23

16 27 22 17 18

17 23 26 22 18

18 23 23 18 21

0

10

20

30

40

50

60

1 2 3 4 5 6 7 8 9

Chart Title

Princ esses Sleeping Beaut ies

Remarks:

1. You may want to use smaller h values to explore the difference of the

solutions.

2. Because of rounding error, you may have negative numbers for

princesses or negative numbers for sleeping beauties. How would

you explain those negative numbers?

3. If we replace princesses by healthy people in a community, witches by

virus, sleeping beauties by infected patients, and princes by medical

treatments, it is a simple model of disease control. Certainly, students

can add more conditions to make the model be better representation

of real situations.

Feedback:

4. Suppose three students carrying a flu virus returns to an isolated college campus of 1000 student. Th infection rate is 0.4. There are 60% chance

students can get well if students get doctor’s treatment. How many

doctors do we need to control the outbreak of the flu?

REFERENCES

1. Bob Pannof, Workshop Notes at West Virginia State University, 1-3 August 2016

2. Zill, Wright, “Differential Equations with Boundary-valued Problems 8th Edition, 2013.

3. Jack Andenoro, “The Spread of Infectious Disease”, http://home2.fvcc.edu/~dhicketh/DiffEqns/

Spring2012Projects/M274FinalProjectJackAndenoro/RuftDraft.pdf,

May 11, 2012

4. Lin, Thomas, “Inquiry-Based Science and Mathematics Using Dynamic Modeling” submit to Journal of Modern Education Review

(ISSN 2155-7993), USA. AMC, 3/18/2017

COMMENTS

1. Excel Tutorial:

Basic Excel

Create scroll bars.

2. Solutions of Feedback Questions

i. Suppose a student carrying a flu virus returns to an isolated

college campus of 1000 student. Determine a differential

equation for the number of students y(t) who have contracted

the flu if the rate of change at which the flu spreads is

proportional to the number of interactions between the number

of students who have the flu and the number of student who

have not yet been exposed to it. Without medication when will

all students have flu?

Assume the infection rate is 0.3, then the differential equation

represents the relationship of y(t) and x(t) is 𝑑𝑦

𝑑𝑡 = 𝑘𝑥𝑦, where k

= 0.3. We use the Excel Worksheet from the previous example

and enter new parameters, k = 0.3, x(0) = 1000, and y(0) = 1.

We have the Excel Worksheet and the solution. With h = 0.01,

approximately t = 5.4, all students get infected.

Initial Conditions x(0) = 1000 y(0) = 1

Infection

Rate = 0.3 h = 0.01

Time, t x((t) y(t)

0 1000 1

0.01 997 4

0.02 985 16

0.03 937 63

0.04 760 240

0.05 213 787

0.06 -290 1290

0.07 832 168

0.08 413 587

0.09 -314 1314

0.1 923 77

0.11 709 291

0.12 90 910

0.13 -155 1156

0.14 382 619 When h = 0.01, at time =5.4 all people got infected. If you use smaller h,

0.15 -327 1329 you can get more acurate time when all people got infected.

Spread of a Disease

-400

-200

0

200

400

600

800

1000

1200

1400

1 2 3 4 5 6 7 8 9

Spread of a Disease The decreasing line is x(t)

x((t ) y(t) t =5.4

ii. Suppose a small community has a fixed population of n people.

If one person who wants to spread a rumor is introduced into

this community. If y(t) denote the number of people who

know the rumor, and x(t) denote the people who does not

know the rumor. It is reasonable to assume that the rate 𝑑𝑦

𝑑𝑡 at

which the rumor spreads is proportional to the number of

encounters between the two groups of people. How to define

the differential equation to interpret this situation? Assume

the proportional constant is 0.05, how long the rumor will

spread to everyone in the community?

Solution:

Since the rate of change of y(t) is proportional to the number of

encounter between x(t) and y(t), we have the differential

equation 𝑑𝑦

𝑑𝑡 = 𝑘𝑥𝑦, where k = 0.05. We use the Excel

Worksheet from the previous example and enter new

parameters, k = 0.05, n = x (0) = 3200, and y (0) = 1.

Initial Conditions x(0) = 3200 y(0) = 1

Infection

Rate = 0.05 h = 0.02

Time, t x((t) y(t)

0 3200 1

0.02 3196 4

0.04 3183 17

0.06 3128 71

0.08 2906 293

0.1 2055 1144

0.12 -296 3495

0.14 739 2460

0.16 -1079 4278

0.18 3536 -338

0.2 4731 -1534

0.22 11988 -8792

0.24 117386 -114191

0.26 13521810 -1.4E+07

0.28 1.83E+11 -1.8E+11 When h = 0.02, at time = 5.8 all people got infected. If you use smaller h,

0.3 3.34E+19 -3.3E+19 you can get more acurate time when all people got infected.

Spread of a Disease

-2000

-1000

0

1000

2000

3000

4000

5000

1 2 3 4 5 6 7 8 9

Spread of a Rumor The decreasing line is x(t)

x((t ) y(t) t = 5.8

With h = 0.02, approximately when t = 6.8 all people in this

village know the rumor.

Note: The graph starts at t = 1 at t axis. The vertical line

through t = 6.8, the solution is t = 5.8 units

iii. Suppose three students carrying a flu virus returns to an isolated college campus of 1000 student. Th infection rate is 0.4. There

are 60% chance students can get well if students get doctor’s

treatment. The college has two medical doctors available for

students. When the flu will be totally controlled after flu

outbreak out?

Solution:

We use the Excel Worksheet from the Sleeping Beauty and enter

new parameters, r1 = 0.04, r2 = 0.6, x (0) = 1000, and y (0) = 3.

Witch count = 3, and Doctor count = 2.

With h = 0.2, we have solution when approximately t = 3.7, the

flu is totally being controlled after it outbreaks.

Time

Healthy

Student

Infected

Student

Infected

at time t

Get Well

after

treatment

Infected

rate 0.4

0 1000 0 0 0

Recover

rate 0.6

1 760 240 240 0 Flu 3

2 -152 1152 912 288 Doctor 2

3 318 682 -182 1382 h = 0.2

4 1318 -318 382 818

5 554 446 1582 -382

6 -493 1493 665 535

7 634 366 -592 1792

8 1665 -665 761 439

9 106 894 1998 -798

10 -819 1819 127 1073

11 1237 -237 -983 2183

12 1936 -936 1484 -284

13 -671 1671 2323 -1123

14 -989 1989 -805 2005

15 2203 -1585 -1187 2387

16 1946 2961 2644 -1902

17 -2291 1743 2335 3553

18 4011 -3098 -2749 2092

19 1290 5433 4813 -3718

20 -3976 461 1548 6520

21 7315 -4863 -4771 553

-1500

-1000

-500

0

500

1000

1500

1 2 3 4 5 6 7 8 9

Sleeping Beauties The line starts at 1000, represents students

Healthy Student Infected Student

t = 3.7

REFERENCES

1. MICROSOFT EXCEL TUTORIAL HANDOUT

http://www.gravenhurst.ca/en/library/resources/Excel_Handout.pdf

2. Add a scroll bar or spin button to a worksheet

https://support.office.com/en-us/article/add-a-scroll-bar-or-spin-

button-to-a-worksheet-f8443be3-ff00-4cad-bb2f-bf0f88ebf5bb