Epidemiology Problems - Page 3

Applications of Systems of Differential Equations

Epidemiology: The Spread of Disease

(continued from last page...)

Your command should have eventually resulted in:

disease1=NDSolve[{s'[t]==-0.001s[t]i[t],
   i'[t]==0.001s[t]i[t]-0.3i[t],
   s[0]==600,i[0]==50},
   {s[t],i[t]},{t,0,30}]


Solution Part 1
Solution Part 2

Which is the kind of solution we expect to get from NDSolve by now. We immediately extract the required information into two new variables with the two commands:

sus1=disease1[[1,1,2]]

inf1=disease1[[1,2,2]]

Jump back to Mathematica, and issue them both in separate cells, hitting [ENTER] after each one.

Let's move on to the fun part—graphing...


Compass If you're lost, impatient, want an overview of this laboratory assignment, or maybe even all three, you can click on the compass button on the left to go to the table of contents for this laboratory assignment.