Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So, I used Mathematica to create a basic SIR Disease model using the following equations:



S'[t] == b N[t] - u S[t] - B S[t](I[t] / N[t]),

I'[t] == B S[t] (I[t] / N[t]) - u I[t] - a I[t] - g I[t],

R'[t] == g I[t] - u R[t],

N'[t] == b N[t] - u N[t] - a I[t],

S[0] == N[0] - I[0],

I[0] == 1,

R[0] == 0,

N[0] == n


I then used Manipulate to find the solution using NDSolve and then plot it. This code all worked and I have some neat sliders for $u$, $B$, $g$, and $n$ that are pretty fun to play around with.

Now, I am supposed to solve for the equilibrium, or when the disease spreads ($dI/dt > 0$), and plot the isoclines for $S$ and $I$ populations. I tried to write an if loop to do this, but I am really confused and it just gives me errors. Does anyone know a way to approach this? Any help is appreciated!

share|cite|improve this question
up vote 1 down vote accepted

Is that "BSt" supposed to be B*S[t] or is it B*S[t]*t? If the latter, this is a time-dependent system, not an autonomous system, and there is no such thing as an equilibrium. All the SIR models I've seen would have a term involving S[t]*I[t], to model susceptibles becoming infective by contact with infectives.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.