Paras31

25 Reputation

0 Badges

0 years, 56 days
Hellenic Open University

Social Networks and Content at Maplesoft.com

Teacher of Mathematics with a proven track record of working in education management. Proficient in Ease of Adaptation, Course Design, and Instructional Technology. Strong education professional with a Bachelor's degree with an emphasis in Mathematics from the University of Aegean. Currently, he is pursuing a Master's degree in Applied Mathematics at the Hellenic Open University, with a specific focus on Ordinary and Partial Differential equations. His enthusiasm lies in the application of mathematical models to real-world contexts, such as epidemiology and population growth. His academic exploration led them to participate in a specialized course on Mathematical Modeling with Differential Equations at Delft University, broadening their horizons. His overarching goal is to leverage their adeptness in modeling to enhance their teaching approach and provide valuable contributions to the field through insightful perspective

MaplePrimes Activity


These are Posts that have been published by Paras31

In our recent project, we're diving deep into understanding the SIR model—a fundamental framework in epidemiology that helps us analyze how diseases spread through populations. The SIR model categorizes individuals into three groups: Susceptible (S), Infected (I), and Recovered (R). By tracking how people move through these categories, we can predict disease dynamics and evaluate interventions.

Key Points of the SIR Model:

  • Susceptible (S): Individuals who can catch the disease.
  • Infected (I): Those currently infected and capable of spreading the disease.
  • Recovered (R): Individuals who have recovered and developed immunity.

Vaccination Impact: One of the critical interventions in disease control is vaccination, which moves individuals directly from the susceptible to the recovered group. This simple action reduces the number of people at risk, thereby lowering the overall spread of the disease.

We're experimenting with a simple model to understand how different vaccination rates can significantly alter the dynamics of an outbreak. By simulating scenarios with varying vaccination coverage, students can observe how herd immunity plays a crucial role in controlling diseases. Our goal is to make these abstract concepts clear and relatable through practical modeling exercises.


 

In this exercise, we are going back to the simple SIR model, without births or deaths, to look at the effect of vaccination. The aim of this activity is to represent vaccination in a very simple way - we are assuming it already happened before we run our model! By changing the initial conditions, we can prepare the population so that it has received a certain coverage of vaccination.

We are starting with the transmission and recovery parameters  b = .4/daysand c = .1/days . To incorporate immunity from vaccination in the model, we assume that a proportion p of the total population starts in the recovered compartment, representing the vaccine coverage and assuming the vaccine is perfectly effective. Again, we assume the epidemic starts with a single infected case introduced into the population.​
We are going to model this scenario for a duration of 2 years, assuming that the vaccine coverage is 50%, and plot the prevalence in each compartment over time.

 

restart
with(plots)

b := .4; c := .1; n := 10^6; p := .5

deS := diff(S(t), t) = -b*S(t)*I0(t); deI := diff(I0(t), t) = b*S(t)*I0(t)-c*I0(t); deR := diff(R(t), t) = c*I0(t)

diff(R(t), t) = .1*I0(t)

(1)

F := dsolve([deS, deI, deR, S(0) = 1-p, I0(0) = 1/n, R(0) = p], [S(t), I0(t), R(t)], numeric, method = rkf45, maxfun = 100000)

odeplot(F, [[t, S(t)], [t, I0(t)], [t, R(t)]], t = 0 .. 730, colour = [blue, red, green], legend = ["S(t)", "I0(t)", "R(t)"], labels = ["Time (days)", "  Proportion\nof Population "], title = "SIR Model with vaccine coverage 50 %", size = [500, 300])

 

F(100)

[t = 100., S(t) = HFloat(0.46146837378273076), I0(t) = HFloat(0.018483974421123688), R(t) = HFloat(0.5200486517961457)]

(2)

eval(S(:-t), F(100))

HFloat(0.46146837378273076)

(3)

Reff := proc (s) options operator, arrow; b*(eval(S(:-t), F(s)))/(c*n) end proc; Reff(100)

HFloat(1.845873495130923e-6)

(4)

plot(Reff, 0 .. 730, size = [500, 300])

 

Increasing the vaccine coverage to 75%

NULL

restart
with(plots)

b := .4; c := .1; n := 10^6; p := .75

deS := diff(S(t), t) = -b*S(t)*I0(t); deI := diff(I0(t), t) = b*S(t)*I0(t)-c*I0(t); deR := diff(R(t), t) = c*I0(t)

diff(R(t), t) = .1*I0(t)

(5)

NULL

F1 := dsolve([deS, deI, deR, S(0) = 1-p, I0(0) = 1/n, R(0) = p], [S(t), I0(t), R(t)], numeric, method = rkf45, maxfun = 100000)

odeplot(F1, [[t, S(t)], [t, I0(t)], [t, R(t)]], t = 0 .. 730, colour = [blue, red, green], legend = ["S(t)", "I0(t)", "R(t)"], labels = ["Time (days)", "  Proportion\nof Population "], title = "SIR Model with vaccine coverage 75%", size = [500, 300])

 

F(1100)

eval(S(:-t), F1(100))

HFloat(0.249990000844159)

(6)

Reff := proc (s) options operator, arrow; b*(eval(S(:-t), F1(s)))/(c*n) end proc; Reff(100)

HFloat(9.99960003376636e-7)

(7)

plot(Reff, 0 .. 730, size = [500, 300])

 

Does everyone in the population need to be vaccinated in order to prevent an epidemic?What do you observe if you model the infection dynamics with different values for p?

No, not everyone in the population needs to be vaccinated in order to prevent an epidemic . In this scenario, if p equals 0.75 or higher, no epidemic occurs - 75 % is the critical vaccination/herd immunity threshold . Remember,, herd immunity describes the phenomenon in which there is sufficient immunity in a population to interrupt transmission . Because of this, not everyone needs to be vaccinated to prevent an outbreak .

What proportion of the population needs to be vaccinated in order to prevent an epidemic if b = .4and c = .2/days? What if b = .6 and "c=0.1 days^(-1)?"

In the context of the SIR model, the critical proportion of the population that needs to be vaccinated in order to prevent an epidemic is often referred to as the "herd immunity threshold" or "critical vaccination coverage."

• 

Scenario 1: b = .4and c = .2/days

``

restart
with(plots)

b := .4; c := .2; n := 10^6; p := .5``

deS := diff(S(t), t) = -b*S(t)*I0(t); deI := diff(I0(t), t) = b*S(t)*I0(t)-c*I0(t); deR := diff(R(t), t) = c*I0(t)

diff(R(t), t) = .2*I0(t)

(8)

F1 := dsolve([deS, deI, deR, S(0) = 1-p, I0(0) = 1/n, R(0) = p], [S(t), I0(t), R(t)], numeric, method = rkf45, maxfun = 100000)

odeplot(F1, [[t, S(t)], [t, I0(t)], [t, R(t)]], t = 0 .. 730, colour = [blue, red, green], legend = ["S(t)", "I0(t)", "R(t)"], labels = ["Time (days)", "  Proportion\nof Population "], title = "SIR Model with vaccine coverage 50 %", size = [500, 300])

 


The required vaccination coverage is around 50% .

• 

Scenario 1: b = .6and c = .1/days

restart
with(plots)

b := .6; c := .1; n := 10^6; p := .83NULL

deS := diff(S(t), t) = -b*S(t)*I0(t); deI := diff(I0(t), t) = b*S(t)*I0(t)-c*I0(t); deR := diff(R(t), t) = c*I0(t)

diff(R(t), t) = .1*I0(t)

(9)

NULL

F1 := dsolve([deS, deI, deR, S(0) = 1-p, I0(0) = 1/n, R(0) = p], [S(t), I0(t), R(t)], numeric, method = rkf45, maxfun = 100000)

odeplot(F1, [[t, S(t)], [t, I0(t)], [t, R(t)]], t = 0 .. 730, colour = [blue, red, green], legend = ["S(t)", "I0(t)", "R(t)"], labels = ["Time (days)", "  Proportion\nof Population "], title = "SIR Model with vaccine coverage 83% ", size = [500, 300])

 

"The required vaccination coverage is around 83 `%` ."


Download SIR_simple_vaccination_example.mw


 

When a derivative can be written as a function of the independent variable only for example

y'=f(x)

y''=f(x)

y'''(x)=f(x)

etc.

 

We call that a directly integrable equation.

 

Example 1:

 

Find the general solution for the following directly integrable equation

diff(y, x) = 6*x^2+4*y(1) and 6*x^2+4*y(1) = 0

That means

int(6*x^2+4, x)

y = 2*x^3+c+4*x", where" c is an arbitary solution

``

 

 
equation1 := diff(y(x), x) = 6*x^2+4

diff(y(x), x) = 6*x^2+4

(1)

NULL

NULL

sol1 := dsolve(equation1, y(x))

y(x) = 2*x^3+c__1+4*x

(2)

And  if we have the initial condition
y(1) = 0
particular_sol1 := dsolve({equation1, y(1) = 0}, y(x))

y(x) = 2*x^3+4*x-6

(3)

"(->)"

 

 

 

 

 

"Example 2:"NULL

NULL

"  Find the particular solution for the following equation with condition"

 

x^2*(diff(y(x), x)) = -1

y(1)=3

So we will need to get the y' by itself

int(-1/x^2, x)

so,

y = 1/x+c , where c is an arbitary constant

And this is our general solution. Now we plug in the initial condition when x = 1, y = 3.

 

That means c = 2.

 

Thus, the particular solution is

 

y = 1/x+2``

eq := x^2*(diff(y(x), x)) = -1

x^2*(diff(y(x), x)) = -1

(4)

NULL

NULL

sol := dsolve(eq, y(x))

y(x) = 1/x+c__1

(5)

NULL

particular_sol := dsolve({eq, y(1) = 3}, y(x))

y(x) = 1/x+2

(6)

NULL

NULL

plot(1/x+2, x = -20 .. 20, color = "Red", axes = normal, legend = [typeset(1/x+2)])

 

NULL

NULL

NULL

NULL

" Example 3:"

 

" Find the particular solution for the following equation with condition"

 

diff(y, t, t) = cost, (D(y))(0) = 0, y(0) = 1

eq1 := diff(y(t), t, t) = cos(t)

diff(diff(y(t), t), t) = cos(t)

(7)

particular_sol := dsolve({eq1, y(0) = 1, (D(y))(0) = 0}, y(t))

y(t) = -cos(t)+2

(8)

"(->)"

 

 

 

 

NULL


 

Download integral.mw

 

Page 1 of 1