0:00:00.000,0:00:04.000
Now, let's look at the solution for a problem concerning waning immunity.
0:00:04.000,0:00:10.000
First things first, the constant waning time should be defined as 2 times the infectious time.
0:00:10.000,0:00:13.000
We can show this mathematically using the equations we have for the
0:00:13.000,0:00:16.000
derivatives of S, I, and R with their respective time.
0:00:16.000,0:00:20.000
We know that after a long period of time you want to attain a steady state situation
0:00:20.000,0:00:23.000
and there's a number of people in each portion to the population--
0:00:23.000,0:00:27.000
susceptible, infected, and recover stays constant.
0:00:27.000,0:00:30.000
Since they want to find out how long people should spend in the recovered stage,
0:00:30.000,0:00:34.000
we start with the time derivative of R and set that equal to zero.
0:00:34.000,0:00:40.000
Since you know that Rdot now has an extra term added to it or actually subtracted from it
0:00:40.000,0:00:43.000
showing the number of people that are leaving the recovered population
0:00:43.000,0:00:45.000
and going back to the infected population.
0:00:45.000,0:00:49.000
We can set these to terms right here equal to zero as well.
0:00:49.000,0:00:53.000
Just to note, I've used CINF to stand for the infectious time
0:00:53.000,0:00:56.000
and CWAN to stand for the waning time.
0:00:56.000,0:01:01.000
Now with just a little bit of Algebra, we come up with the answer that R=2I.
0:01:01.000,0:01:04.000
Since we know that we want the number of recovered people to be twice the number
0:01:04.000,0:01:09.000
of infected people, we can plug in this extra information to the equation above
0:01:09.000,0:01:13.000
and end up with the answer that the waning time is equal to twice the infectious time.
0:01:13.000,0:01:16.000
This put us directly into the next part of the problem.
0:01:16.000,0:01:22.000
We defined R to S in the same way that I to R is defined except that we replace infectious time
0:01:22.000,0:01:27.000
as the waning time and I step with R step as you can see right here.
0:01:27.000,0:01:32.000
Then moving on to our recursive relations, for each element in a step plus one position,
0:01:32.000,0:01:36.000
we need to take into account the value of the previous element in the number of people
0:01:36.000,0:01:39.000
added and subtracted from the population during each time step.
0:01:39.000,0:01:43.000
We know that the one thing that has changed in this model from the standard SIR model
0:01:43.000,0:01:48.000
is that people are now moving from the recovered population back to the susceptible population.
0:01:48.000,0:01:55.000
This is why we've needed to add in this extra term R to S, which we subtract from R and add to S.
0:01:55.000,0:01:57.000
Now, let's run the program and see what we get.
0:01:57.000,0:02:00.000
Here we see we end up with this fancy graph,
0:02:00.000,0:02:04.000
which has three different series for the three different parts of the population we're looking at.
0:02:04.000,0:02:08.000
Remembering how we set the initial values for S, I, and R.
0:02:08.000,0:02:12.000
Remember that the blue line here stands for the susceptible population.
0:02:12.000,0:02:15.000
The green line stands for the infected population,
0:02:15.000,0:02:18.000
and the red line stands for the recovered population.
0:02:18.000,0:02:20.000
And the maximum time that we're looking at 60 days,
0:02:20.000,0:02:25.000
you can see that the red line is graphing twice as many people over here
0:02:25.000,0:02:30.000
as the green line is marking, which is exactly the answer that we wanted to end up with.
0:02:30.000,9:59:59.000
Congratulations on successfully completing the first problem of Unit 3.