![]() |
|||||||||||||||
Mathematics & Science
Learning Center |
|||||||||||||||
Applications of Systems of Differential EquationsEpidemiology: The Spread of Disease(continued from last page...) Making the Problem "Computer Friendly"We're working with the system:
However, in it's current form, the problem doesn't lend itself to computer solution since it contains the unknown constants a and b. We'll make the problem more concrete by using known values for a and b. In fact we'll use a = 0.001, and b = 0.3. (In reality we would need to do an extensive study of a particular situation in order to arrive at values for these two constants.) An additional difficulty for us is the fact that we're working with three differential equations instead of just two. While there is nothing theoretically wrong with three, (or even fifty-three,) equation systems, graphing becomes more difficult since we would have to deal with four variables in all (t is a variable too,) which makes us run out of physical dimensions that we can easily visualize. In many problems this difficulty cannot be avoided, but in this case there is a work-around available. Notice that the first two equations are coupled, i.e. they share variables with one another, but neither of them contain the third variable, R. This means that they form a subsystem of our original system that can be dealt with independently. i.e. Unless we are really interested in the dynamics of the recovered population, we could eliminate the third equation from our consideration, along with the corresponding initial condition. Implementing these changes, we arrive at the following system:
which is a little reminiscent of the predator-prey system we worked with earlier. In fact, what you will be doing for the rest of this laboratory is mimicking the steps you took in the Predator-Prey Laboratory in order to create plots of susceptibles vs. time, infecteds vs. time, and lastly a phase-plane diagram of susceptible-infected space. Creating Susceptibles vs. Time and Infecteds vs. Time GraphsIn order to start we need some specific initial conditions. Let's say that at the beginning of our experiment there are 600 susceptible people, and 50 infected people, or symbolically:
If we put these into our initial value problem, it becomes:
which is in just the right form to feed into Mathematica's numerical solver. So let's do so, with the command: disease1=NDSolve[{s'[t]==-0.001s[t]i[t], (Notice that we're capturing the solution to the system into the variable disease1, and that I've chosen the interval 0 ≤ t ≤ 30 for the plot. Also, I've used lower case i instead of I, since I is a reserved Mathematica constant.) Now jump into Mathematica and try it. Now let's go see what you should have gotten... |
|||||||||||||||
ODE Laboratories: A Sabbatical Project by Christopher A. Barker ©2009 San Joaquin Delta College, 5151 Pacific Ave., Stockton, CA 95207, USA e-mail: cbarker@deltacollege.edu |
|||||||||||||||