The SIR model is
Where \(S\) represent the susceptible population and \(I\) the infected population and \(R\) the recovered population, and \(\beta \) is the transmission rate from \(S\) to \(I\) and \(\upsilon \) is the recovery rate from \(I\) to \(R\).
This animation shows what happens as the transmission rate increases (while the recovery rate is kept fixed). This uses initial conditions of \(S(0)=1000\) and \(I(0)=1\). Which means one person is infected only initially.
The recovery rate is kept at \(0.05\) while the transmission rate is changed from \(0.0003\) to \(0.03\).
This animation shows what happens as the transmission rate is kept fixed at \(0.005\), while the recovery rate is increased from \(0.001\) to \(0.3\)
The above program is avaliable as Mathematica notebook below. Here is screen shot
Here is the notebook
Source code
Manipulate[ Module[{ic, eq1, eq2, eq3, S, R, I0, t, sol}, ic = {S[0] == 1000, I0[0] == 1, R[0] == 0}; eq1 = S'[t] == -beta S[t]*I0[t]; eq2 = I0'[t] == beta*S[t] I0[t] - v I0[t]; eq3 = R'[t] == v*I0[t]; sol = NDSolve[{eq1, eq2, eq3, ic}, {S, I0, R}, {t, 0, 60}]; Grid[{{Grid[{{"Transmission rate (beta) ", NumberForm[beta, {4, 4}]}, {"Recovery rate (v) ", NumberForm[v, {3, 3}]}}]}, {Plot[{ Evaluate[S[t] /. sol], Evaluate[I0[t] /. sol], Evaluate[R[t] /. sol] }, {t, 0, 60}, PlotLegends -> {"susceptible", "Infected", "Recovered"}, PlotStyle -> {Blue, Red, Green}, GridLines -> Automatic, GridLinesStyle -> LightGray, AxesLabel -> {"Time (days)", "Population size"}, ImageSize -> 500] }}] ], {{beta, 0.0005, "Transmission rate (beta)"}, 0.0001, 0.003, 0.0001, Appearance -> "Labeled"}, {{v, 0.05, "Recovery rate (v)"}, 0.001, 0.4, 0.001, Appearance -> "Labeled"}, TrackedSymbols :> {beta, v} ]