- #1
tomc612
- 17
- 0
Question on SIR Model and using Eulers method for approximating a solution.
Given the 3 ODEs of the SIR model
dS/dt = -\betaSI
dI/dt= -\betaSI - \gammaI
dR/dt = \gammaI
Ive been asked to produce in excel Eulers method for axproximate solutions. Given some initial values for S(0) and I(0) as well values for the constants for \beta and \gamma, and increments of time (t)
What I would like to know, is do I need to use Matrix/Linear Algebra to produce a generic solution for the system of equations? is this then used with Eulers method?
If not how do I use Eulers method when the equations have a product if S and I
See below for the actual questionImplement Euler's method in MS Excel or MATLAB to produce approximate solutions
for the system of dierential equations of the SIR model. Use initial conditions of S(0) =
S0 = 249995=250000 and I(0) = I0 = 5=250000, with = 2 and
= 0:5. Use a time
step of 0.25 to ensure the graphs display a smooth curve. Iterate Euler's method for the
duration of the epidemic (halt the simulation when In approaches zero). Plot S; I and R
against time.
any help appreciated
Given the 3 ODEs of the SIR model
dS/dt = -\betaSI
dI/dt= -\betaSI - \gammaI
dR/dt = \gammaI
Ive been asked to produce in excel Eulers method for axproximate solutions. Given some initial values for S(0) and I(0) as well values for the constants for \beta and \gamma, and increments of time (t)
What I would like to know, is do I need to use Matrix/Linear Algebra to produce a generic solution for the system of equations? is this then used with Eulers method?
If not how do I use Eulers method when the equations have a product if S and I
See below for the actual questionImplement Euler's method in MS Excel or MATLAB to produce approximate solutions
for the system of dierential equations of the SIR model. Use initial conditions of S(0) =
S0 = 249995=250000 and I(0) = I0 = 5=250000, with = 2 and
= 0:5. Use a time
step of 0.25 to ensure the graphs display a smooth curve. Iterate Euler's method for the
duration of the epidemic (halt the simulation when In approaches zero). Plot S; I and R
against time.
any help appreciated