Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Numerical Solutions to the COVID-19 Pandemic using

Runge-Kutta Methods

Christian McBride Jordan

13 April 2020

1 Introduction
The recent corona-virus formally known as COVID-19 has caused mass confusion globally and we
have since seen the lock down of airports, schools and global businesses. It is the first time in
history that we have been challenged with a global pandemic with access to the mathematics, data
and computing power that we have today.

Mathematicians, data scientists, epidemiologists, health executives and world leaders have pledged
to work together to predict the trajectory of this disease. The objective of this project is to provide
some mathematical insight to these claims and provide numerical solutions to a basic epidemic
model.

2 SIR Model
In 1927, a paper published by W Kermack and G McKendrick [2] proposed a model which today
forms the foundations of most infectious disease models.

The basis of this model is built on the fact an individual can fall into one of three categories,
susceptible, infected or recovered. In the simplest of the models, we can assume that the course of
an epidemic is short and therefore the population can be considered a constant with the exception
of people who die specifically from the disease [2]. The three categories representing a number in a
population can be written as functions of time.
S = St , I = It , R = Rt (1)
It may be easier for us to work with proportions of the population, for example, before anybody
became infected, the proportion of the susceptibles would be 1 (or 100% of the population).
St It Rt
st = , it = , rt = (2)
N N N

2.1 System of Differential Equations


Logically, we can make assumptions based on our outstanding knowledge of infectious diseases about
how these three functions might change with respect to time. Smith and Moore [4] provide a nice

1
introduction to the derivation of these equations that I will explain below.
We also know that since each individual must belong to one of these groups, this also means that
the sum of the rate of change in each of these groups must be 0.
∂s ∂i ∂r
st + it + rt = 1, + + =0 (3)
∂t ∂t ∂t
2.1.1 Susceptible Equation
The number of susceptibles can only decrease by becoming infected, that is, once infected, an
individual cannot become susceptible once more. Susceptibles must become infected at a given
ratio, say β, which means each infected individual generates βst new infections per progression in
time.
We know that the change in susceptibles must be equal to the gain in infecteds, so we can formu-
late.
∂s
= −βst it (4)
∂t
2.1.2 Recovered Equation
Again, the only way that an individual can enter the recovered category is if they have once been
infected. The number of susceptibles has no relation to the number of recovered. All we need to
know is the rate at which infecteds move to recovered, be it by death or recovery. This ratio of
recovery can be denoted by γ.
∂i
= γit (5)
∂t
2.1.3 Infected Equation
In equations (3), we noted that the sum of all derivatives must be 0 since all cases can only transition
between the three variables. This means that the change in infecteds must be equal to the negative
of our other functions. That is, + the change of suscetible to infected and − the change of infected
to recovered.
∂i
= βst it − γit (6)
∂t

2.2 Variable Parameters


In [1], Dietz talks about a basic reproduction number, R0 , which essentially is the number of
secondary infections that are caused by a single infection in a population of only susceptible indi-
viduals. He states that if this value R0 ≤ 1, then the outbreak will only be minor with a probability
1 of extinction. However, if this value R0 > 1, then there is a chance of a large outbreak affecting
nearly the total population.

From our parameters β, the infection ratio, and γ, the recovery ratio, we can understand that the
basic reproduction number for a disease using the SIR Model is,
β
R0 = (7)
γ
*R0 is not to be confused with the number of recovereds at time 0.

2
We can prove this by looking back at equation (6). At the beginning of a new infectious disease, we
can assume that st ≈ 1, therefore it only increases if βγ > 1.
This leaves us with two ways to alter the trajectory of an infectious disease:
1. Decrease the infection ratio
2. Increase the recovery ratio
With no current cure for the COVID-19 virus, increasing the recovery ratio is near impossible, so
government steps are being taken to try and decrease the infection ratio. We will discuss the effects
of this further in the results.

3 Runge-Kutta Fourth Order Method


There are many methods in which we can solve the differential equations that have been outlined for
the SIR Model. One of which is know as the Runge-Kutta fourth order method, or RK4. The Runge-
Kutta methods are derived from the Taylor Series and using this method we can solve a system of
differential equations. This is an iterative method to establish results at different points.

3.0.1 The Method


The formula for this method will provide an approximation for yn+1 given yn and y = f (x, y).
The values of n will range as 0, 1, 2, ...., (x − x0 )/h where h is the step size. It then follows that
xn+1 = xn + h. Now, the formula is as below.
1
yn+1 = yn + (k1 + 2k2 + 2k3 + k4 ) (8)
6
Where,

k1 = hf (xn , yn )
 
h k1
k2 = hf xn + , yn +
2 2
  (9)
h k2
k3 = hf xn + , yn +
2 2
k4 = hf (xn + h, yn + k3)

3.1 Application to SIR Model


In order for this method to be applicable to the SIR model, we must apply it to each of our variables,
st , it , rt . The different functions will look the same as above, but slightly varied due to the number
of functions in the system.
1
st+1 = st + (k1 + 2k2 + 2k3 + k4 )
6
1
it+1 = it + (l1 + 2l2 + 2l3 + l4 ) (10)
6
1
rt+1 = rt + (m1 + 2m2 + 2m3 + m4 )
6

3
Where,
∂s
k1 = h (t, st , it , rt )
∂t
∂i
l1 = h (t, st , it , rt )
∂t
∂r
m1 = h (t, st , it , rt )
∂t  
∂s h k1 l1 m1
k2 =h t + , st + , it + , rt +
∂t 2 2 2 2
 
∂i h k1 l1 m1
l2 =h t + , st + , it + , rt +
∂t 2 2 2 2
 
∂r h k1 l1 m1
m2 =h t + , st + , it + , rt +
∂t 2 2 2 2
  (11)
∂s h k2 l2 m2
k3 =h t + , st + , it + , rt +
∂t 2 2 2 2
 
∂i h k2 l2 m2
l3 =h t + , st + , it + , rt +
∂t 2 2 2 2
 
∂r h k2 l2 m2
m3 =h t + , st + , it + , rt +
∂t 2 2 2 2
∂s
k4 = h (t + h, st + k3 , it + l3 , rt + m3 )
∂t
∂i
l4 = h (t + h, st + k3 , it + l3 , rt + m3 )
∂t
∂r
m4 = h (t + h, st + k3 , it + l3 , rt + m3 )
∂t
This can now be programmed into Python (my preference) to form solutions to the system of
differential equations.

4 Numerical Solution for COVID-19


If we could record every case in every location at the exact time of infection and recovery (or death),
then we could produce the most accurate version of this basic SIR model. However, in reality,
nobody knows the exact values of these parameters whilst a disease is still active.
A February 2020 study in [3] looks at a collection of other studies for estimating the value of the
basic reproduction number, R0 . The article found that the range of estimations for R0 were large,
specifically between 1.40 and 6.49. Taking considerations from all of the studies [3] expects a realistic
value to be 2 > R0 > 3.

4.0.1 Establishing Variables


Real data for COVID-19 is being published online by John Hopkins University [5], this allows me
to model the pandemic using some real data.
An early report from the World Health Organisation [6] suggests that the average period for clinical
recovery is around 2 weeks, though the infectious period might be less than this. Government

4
guidelines in the UK have stated that the infectious period is likely to be between 7 and 14 days.
When R0 is between 2 and 3 we can find the following values. The table shows approximate real
values for the UK, as estimated on 1st March 2020.
Variable Value Source
N 67, 811, 413 Worldometers
β 0.142858 < β < 0.428571 None
γ 0.071429 < γ < 0.142857 None
S0 67, 811, 377 John Hopkins University [5]
I0 36 John Hopkins University [5]
R0 0 John Hopkins University [5]

5
References
[1] Klaus Dietz. The estimation of the basic reproduction number for infectious diseases. Statistical
methods in medical research, 2(1):23–41, 1993.
[2] William Ogilvy Kermack and Anderson G McKendrick. A contribution to the mathematical
theory of epidemics. Proceedings of the royal society of london. Series A, Containing papers of
a mathematical and physical character, 115(772):700–721, 1927.
[3] Ying Liu, Albert A Gayle, Annelies Wilder-Smith, and Joacim Rocklöv. The reproductive
number of covid-19 is higher compared to sars coronavirus. Journal of travel medicine, 2020.
[4] David Smith and Lang Moore. The sir model for spread of disease: The differential equation
model. Loci.(originally Convergence.) https://www. maa. org/press/periodicals/loci/joma/the-
sir-model-for-spread-of-disease-the-differential-equation-model, 2004.
[5] John Hopkins University. Novel coronavirus (covid-19) cases, provided by jhu csse. Obtained
from: https://github.com/CSSEGISandData/COVID-19.
[6] WHO. Coronavirus disease 2019 (covid-19) situation report—56, 2020. Ob-
tained from: https://www.who.int/docs/default-source/coronaviruse/who-china-joint-mission-
on-covid-19-final-report.pdf.

You might also like