Modeling Midterm Exam Take Home Exam
Modeling Midterm Exam Take Home Exam
Modeling Midterm Exam Take Home Exam
Midterm EXAMINATION
EnE 143 – Environmental Modelling
First semester S.Y. 2023-2024
Direction: Show the codes using the chosen Language together with your answer, and graphs.
1. The Kermack-Mckendrick model for the course of an epidemic in a population is given by the system of
ODEs
𝒚′𝟏 = −𝒄𝒚𝟏 𝒚𝟐 ,
𝒚′𝟑 = 𝒅𝒚𝟐 ,
𝒚′𝟏 = 𝝈(𝒚𝟏 − 𝒚𝟐 ),
𝒚′𝟐 = 𝒓𝒚𝟏 − 𝒚𝟐 − 𝒚𝟏 𝒚𝟑 ,
𝒚′𝟑 = 𝒚𝟏 𝒚𝟐 − 𝒃𝒚𝟑
Taking 𝝈 = 𝟏𝟎, 𝒃 = 𝟖/𝟑, 𝒓 = 𝟐𝟖, and initial values 𝒚𝟏 (𝟎) = 𝒚𝟑 (𝟎) = 𝟎 and 𝒚𝟐 (𝟎) = 𝟏, integrate this
ODE using Euler’s method from 𝒕 = 𝟎 to 𝒕 = 𝟏𝟎𝟎 with step size 𝒉 = 𝟎. 𝟎𝟎𝟏. Plot each of 𝒚𝟏 , and 𝒚𝟐 , and
𝒚𝟑 as a function of 𝒕, and also each of the trajectories (𝒚𝟏 (𝒕), 𝒚𝟐 (𝒕)), (𝒚𝟏 (𝒕), 𝒚𝟑 (𝒕)), and (𝒚𝟐 (𝒕), 𝒚𝟑 (𝒕))
as a function of 𝒕, each on a separate plot.