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}]


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...







