Read this material on mathematical modeling. Try to complete the exercise at the end of the chapters. Don't worry if you have not yet learned the math necessary to complete the exercises. Rather, notice how many physical systems can be represented by mathematical models. We can then implement these models using programming languages like Python and R. We will discuss those later. Think about the types of systems you interact with, personally or in business situations. How might you use a mathematical model to help you understand this system?
2. Bounded growth (Phase line, Stable equilibrium)
2.4 Practice problem (Flu!)
Problem
Flu on Ledom island
In the previous section you encountered the Htam people on Ledom Island:
Ledom Island is inhabited by the native Htam. The island and its people was discovered in the 15th century by a group of 20 explorers. The explorers recorded that when they reached the island there were 980 Htam.
Unfortunately, the explorers all were sick with the flu when they arrived. They decided to stay for some time on the island and only to continue their travels after they'd have recovered.
The explorers infected the Htam people and all of them got the flu as well. In no time, the whole island was ill with the flu. Fortunately, no one died.
Some years ago, a group of modern-day explorers went to Ledom Island, and found evidence of the flu epidemic recorded on the wall of a cave deep in the forest. Translated from the language Relue, this text read:
Twenty days after the foreigners arrived, already 730 Htami have fallen ill to this strange sickness.
Mathematical model
In Section 2.2 you derived the differential equation for the fraction of people X(t) on Ledom Island infected with the flu virus
\(\dfrac{dX}{dt} = kX (t) (1 - X(t))\),
with the initial condition
X(0)=0.02.
Unfortunately, the parameter k was at that time unknown. However, because of the text in the cave you can now find a value for k!
Calculation
In the previous section you formulated a new problem:
Find a value for k such that
\(\left\{\begin{aligned}
\frac{d X}{d t} & =k X(1-X), \\
X(0) & =0.02, \\
X(20) & =0.75
\end{aligned}\right.\)
To solve this problem, you are going to use Euler's Method. Make a new copy of Basic_Euler_program.py and adapt it for this problem. First, we have to find an appropriate stepsize.
Validation
In this section you have found that the model dX/dt=kX(1−X) with k=0.25 can describe the two historical datapoints in this story: X(0)=0.02and X(20)=0.75.
So now you can tell your teacher that you have a model for the epidemic. The red lines in the graph indicate X(11)≈0.25 and X(20)=0.75. You could summarize this epidemic by saying that it probably had three phases of approximately 10 days each. The first and the third phases were relatively slow: a quarter of the people got infected. The second phase was fast: half of the population got infected.
In searching for the right value for k, you have experienced the sensitivity of the results to parameter k. You could also consider the reverse: what happens with your k-value, when one of the two datapoints used is a little off, for example because of a measurement error. A model fitted to just two datapoints is probably not very robust in that sense. On the next page, we would like you to think further about what you could do when you have more datapoints.