Professional Documents
Culture Documents
Runge-Kutta Method of 4 Order in Numeric Solution of The Tuberculosis Disease Spreading Model
Runge-Kutta Method of 4 Order in Numeric Solution of The Tuberculosis Disease Spreading Model
……, 2021 | …… -
Education ……
Abstract. This research aims to solve the problem of a mathematical epidemic model with
a numerical solution. The mathematical epidemic model that will be solved in this research
is the SIR, SITR, and SEIR models. The numerical method that is considered quite good in
finding a numerical solution to the mathematical epidemic model is the Runge-Kutta
Method of Order 4. This method has a fairly high accuracy, does not require more initial
values, and does not require a derivative function in its solution.
Keyword: Runge-Kutta Method, Runge-Kutta Method 4th Order, Tuberculosis, SIR model,
SITR model, SEIR model.
Abstrak. Penelitian ini bertujuan untuk menyelesaikan masalah model epidemi matematika
dengan penyelesaian numerik. Model epidemi matematika yang akan diselesaikan dalam
penelitian ini adalah model model SIR, SITR, dan SEIR. Metode numerik yang dipandang
cukup baik dalam mencari solusi numerik model epidemi matematika ialah Metode Runge-
Kutta Orde 4. Metode ini memiliki ketelitian yang cukup tinggi, tidak membutuhkan lebih
banyak nilai awal, dan tidak memerlukan turunan fungsi dalam penyelesaiannya.
Kata Kunci: Metode Runge-Kutta, Metode Runge-Kutta Orde 4, Tuberkulosis, SIR, SITR,
SEIR.
Received date month year. | Revised date month year | Accepted date month year
*Corresponding author at: Department Mathematics, Faculty of Mathematics and Natural Sciences, University of
Sumatera Utara, Medan, Indonesia
The Runge-Kutta method is a numerical method that can be used to solve ordinary differential
equations involving initial values with varying time step sizes. Solving ordinary differential
equations using the Runge-Kutta method of 4th Order is the process of finding the value of a
function y ( x ) at a certain point x from a known ordinary differential equation. f ( x , y ).
Ordinary differential equations are often applied to various mathematical models that describe
real-life problems, one of which is the mathematical epidemic model.
The Runge-Kutta method of 4th Order is considered quite good in finding a numerical solution
to the mathematical epidemic model because it has a fairly high accuracy compared to other
numerical methods [1]. Another advantage of the Runge-Kutta method of 4th Order is that it
does not require more initial values and does not require a derivative function in its completion
[2].
Mathematical epidemic models are often used in infectious disease modeling. One disease
that can be modeled is Tuberculosis. Mathematical epidemic models that are often used in
modeling Tuberculosis are the SIR (Susceptible, Infected, Recovered) and SEIR
(Susceptible, Exposed, Infected, Recovered) epidemic models. Which have been discussed in
the Global Stability of SIR and SEIR Model for Tuberculosis Disease Transmission with
Lyapunov Function Method [3].
Mathematical epidemic models can be solved analytically and numerically. There are several
previous studies on solving mathematical epidemic models analytically.Yong and Owen who
have discussed the formulation of homothophy analysis methods in determining the
approximate analytical solution of several epidemic models such as SI, SIR, and SEIR models
[4].
Christyanti and Syahdan who discussed the adomian decomposition method used to solve the
SEIR model equation system in Tuberculosis, and after that the behavior would be observed
through numerical simulations based on certain given parameters [5]. However, solving the
epidemic model analytically has a weakness, namely the analytical solution of ordinary
differential equations usually results in a solution in the form of a mathematical function which
can then be evaluated to produce a value in the form of numbers. This makes analytical
solutions difficult to complete considering that not all functions are easy to calculate derivatives
[3].
Because of this, several previous studies also discussed the solutionand a numerical
mathematical epidemic model. Kuzairi, Yulianto, and Safitri which discusses the application of
the Adams Bashforth-Moulthon method to the mathematical epidemic model [6]. But because
the Adams Bashforth-Moulthon method is a multi-step method, so that the research Kuzairi,
Jurnal of Mathematics Technology and Education Vol. ……., No. ……., ……….. 3
Yulianto, and Safitri Runge-Kutta method is used to find the initial value.
Previous research has also been carried out by Nur and Abdal which discusses the numerical
solution using the Milne-Simpson method [7]. However, because this method requires more
initial values before iterating with the milne-simpson method, in this study the author uses the
Runge-Kutta method to find the initial value, so that in this study the method used is called the
modified milne-simpson method.
2. Related Work
Ordinary Differential Equation is a differential equation which has only one independent
variable. The independent variable is usually symbolized by t. If x is a function of t, the general
form of the differential equation is usually written as in equation (2.1) and equation (2.2) below:
F ( t , x , x , x , x ,, … , x ) =0
' '' '' ' (n )
(2.1)
( )
2 3 n
dx d x d x d x
F t,x, , , , … , n =0 (2.2)
dt dt 2 dt 3 dt
dx 2
=t cos x (2.3)
dt
Where the equation has the order of one. The order of the differential equation is the highest
derivative of the unknown function (the dependent variable) that appears in the differential
equation. Based on the linearity of the dependent variable, ordinary differential equations can be
divided into linear ordinary differential equations and nonlinear ordinary differential equations
[8].
⋮ (2.4)
dx n
=f n (t , x1 , x2 , … , x n )
dt
with x 1 , x 2 , … , x n is the independent variable and t is the dependent variable, so
dx n
x 1=x 1 ( t ) , x 2=x 2 ( t ) , … , x n=x n ( t ) , in this case it is the derivative of the function x nwith
dt
respect to t , and is a function that depends on the variable and x 1 , x 2 , … , x n and t [9].
The initial value problem is a problem in solving a differential equation [10]. A differential
equation of order n has n auxiliary conditions for the same initial value of the independent
variable, where the initial value is a boundary condition at a point. The initial value problem
plays an important role in the theory and application of differential equations. In short, the
initial value problem is the initial auxiliary value needed as an initial reference to determine the
next step of solving a differential equation. For example, in the case of determining the
numerical solution of the Tuberculosis disease spread model. The initial value is the auxiliary
value needed in the numerical solution of the epidemic model to see the next treatment for the
spread of Tuberculosis.
In general, consider a differential equation that can be written in the form:
n
y =f ¿.
Then, the initial value problem for the differential equation of the order n can be written as
equation (2.8) below:
solve
n
d x ' ( )
n
=f (x , y , y , … , y n−1 )
dx (2.5)
condition
y ( x 0 )= y 0 , y ' ( x 0 ) = y 1 , … , y ( n−1) ( x 0 )= y n −1
Numerical method is a technique used to formulate mathematical problems so that they can be
solved by ordinary arithmetic or arithmetic operations. Method means method, while numeric
means number. So, numerical method literally means a way of counting using numbers.
Jurnal of Mathematics Technology and Education Vol. ……., No. ……., ……….. 5
Numerical method is used to find the numerical solution of a mathematical model. Numerical
method is used when a mathematical model is difficult to solve with analytical solution, so
that the completion takes a long time.
The Runge-Kutta method was invented by German mathematicians, Carl Runge (1856-1927)
and Wilhelm Kutta (1867-1944). The rationale of this method is to maintain the Taylor
approximation, but in solving ordinary differential equations using the Taylor method is not
practical because the method requires the calculation of the derivative f ( x , y ). Moreover, not
all functions can be calculated as derivatives easily, especially for functions with complex
shapes. The higher the order of the Taylor series method, the higher the derivative of the
function that must be calculated.
The Runge-Kutta method is a method that provides greater accuracy of results and the also does
not require derivatives of functions. The general form of the Runge-Kutta method is:
x i+1=x i +ϕ ( t i , x i , h ) h (2.6)
Where ϕ ( t i , x i , h ) is an addition function which is the average slope of the interval and is used to
extrapolate from old x ivalues to new values x i+1throughout the interval h . The increment
function can be written in the general form:
ϕ =a1 k 1 +a2 k 2 +…+ an k n (2.7)
where a 1 , a2 , … , an is a constant and is a constant and is:a 1 , a2 , … , an k
k 1=f ( t i , x i )
k 2=f ( t i + pi h , x i +q 11 k 1 h)
k 3=f (t i + pi h , x i +q 21 k 1 h+q 22 k 2 h)
⋮ (2.8)
k n=f (t i + pn−1 h , x i +q n−1,1 k 1 h+ qn−1,2 k 2 h+…+ qn−1 , n−1 k n −1 h)
with p and q are constants. Values k indicate a sequential relationship. The value k 1 appears in
equation k 2, both of which appear in equation k 3, and so on. This sequential relationship makes
the Runge-Kutta method efficient for computations with computers.
There are several Runge-Kutta methods that depend on the value of n (order) used. For
example, for n=1 it is called the Runge-Kutta method of 1 st Order or also called the Euler
method, which is obtainedk 1=f ( t i , x i ) and equation (2.24).
ϕ =a1 k 1=a1 f (t i , x i)
So the equation a 1=1 becomes:
x i+1=x i + f (t i , xi )h
Jurnal of Mathematics Technology and Education Vol. ……., No. ……., ……….. 6
In the Runge-Kutta method, after the value n is determined, then the value a , p , q is found by
equating equation (2.23) with the terms of the Taylor series.
The Runge-Kutta method of 4th Order is a more accurate method than the Runge-Kutta method
of 2nd Order and the Runge-Kutta method of 3rd Order. Therefore, the Runge-Kutta method of 4th
Order is often used to solve differential equations. Runge-Kutta method of 4th Order is derived
in the same way as the Runge-Kutta method of 2nd Order for the value of n=4. The Runge-
Kutta method of 4th has the following equation:
1
x i+1=x i + ( k 1+ 2 k 2+ 2k 3+ k 4 ) h (2.9)
6
In this case it k is:
k 1=f (t i , x i )
1 1
k 2=f (t i + h , xi + k 1 h)
2 2
1 1
k 3=f (t i + h , x i+ k 2 h)
2 2
k 4=f (t i+ h , x i +k 3 h)
The SIR epidemic model was first introduced by Kermack and Mc. Kendrick in 1927. The
model consists of three categories, namely Susceptible ( S) or groups that have the potential to
be infected with the disease. Infectious ( I ) or a group that has been infected and can spread the
disease to susceptible individuals. Recovered ( R) or the group that has recovered or the
immune system has returned to normal so that it is immune to the Tuberculosis disease. The SIR
model was first developed to determine the rate of spread and extinction of a disease outbreak in
a closed and epidemic population.
According to Yau and Nweze, the SIR model is built based on the following assumptions:
1. The population is fixed (constant).
2. The only way an individual can leave a vulnerable group is by becoming infected with a
disease. The only way an infected individual wants to recover is through the recovery
process. After that, the individual can recover, and have immunity.
3. Age, sex and race do not affect a person being infected.
4. There is no inherited immunity.
5. Members of a mixed population have similar interactions with each other to an equal
degree.
Jurnal of Mathematics Technology and Education Vol. ……., No. ……., ……….. 7
The total population ( N ) is assumed to be constant because births and deaths are assumed to
have the same rate and external influences are not considered. Then the equation is
N=S+ I + R
The SITR epidemic model is a disease spread model that divides the population into four
subpopulations, namely Susceptible (S) or groups that have the potential to be infected with the
disease. Infectious (I ) or a group that has been infected and can spread the disease to
susceptible individuals. Treatment (T ) or the group that did the treatment. Recovered (R) or the
group that has recovered or the immune system has returned to normal so that it is immune to
the Tuberculosis disease. The SITR epidemic model is a development of the SIR model. But
what distinguishes it is that the SIR epidemic model assumes that individuals infected with the
disease will recover, while the SITR model represents a situation when infected individuals
must take treatment to recover.
There are several assumptions used in the formation of the SITR model, that is :
1. There are births and deaths in a population ( N )
2. Every individual born will be part of the vulnerable population
3. Including a dangerous disease, if infected can cause death
4. Individuals who have been infected, if given treatment (treatment) will be immune to TB
disease and will not become susceptible again
The SEIR epidemic model is a development of the SIR model. The SEIR epidemic model is a
disease spread model that divides the population into four subpopulations. Namely Susceptible
(S) or groups that have the potential to be infected with the disease. Exposed (E) or groups
that have been exposed but not yet fully infected. Infectious (I ) or groups that have been
infected and can spread the disease to susceptible individuals. Recovered (R) or groups that
have recovered or their immunity has returned to normal so they are immune to disease.
Jurnal of Mathematics Technology and Education Vol. ……., No. ……., ……….. 8
3. Methodology
The following are the research steps presented in the form of a flowchart for the Runge-Kutta
Method of 4th Order on the Numerical Solution of the Tuberculosis Disease Spreading Model.
Study of literature
Program Simulation
4.1 Numerical Solution of the SIR Epidemic Model for the Spread of Tuberculosis
with the Runge-Kutta Method of 4th Order
The SIR epidemic model on the spread of Tuberculosis can be seen in the following equation:
dS I
=−b S−μS+ π (4.1)
dt N
dI I
=b S−( μ+c ) I (4.2)
dt N
dR
=cI −μR (4.3)
dt
Furthermore, the equation (4.1) – (4.3) above is solved by following the steps for solving the
Runge-Kutta method of 4th order, so that the value of each subpopulation is obtained as equation
(4.4) – (4.6) below.
1
Si+ 1=S i + ( k 1 S +2 k 2 S +2 k 3 S + k 4 S ) h (4.4)
6
1
I i+1=I i+ ( k 1 I +2 k 2 I +2 k 3 I +k 4 I ) h (4.5)
6
1
Ri +1=Ri + ( k 1 R +2 k 2 R + 2 k 3 R + k 4 R ) h (4.6)
6
4.2 Determination of Initial Requirements for the SIR Epidemic Model on the Spread of
Tuberculosis
Table 1. Initial conditions used in the SIR Epidemic Model on the Spread of Tuberculosis
Disease
Thus, the formulation of the SIR Epidemic Model on the Spread of Tuberculosis in North
Sumatra Province is as in equation (4.7) – (4.9) below.
dS −0.8
= IS−0.001214 S+14.420 .000 (4.7)
dt 14.420 .000
dI 0.8
= IS−( 0.001214 +0.111111 ) I (4.8)
dt 14.420 .000
dR
=0.111111 I −0.001214 R (4.9)
dt
4.3 Numerical Solution of the SITR Epidemic Model on the Spread of Tuberculosis
with the Runge-Kutta Method of 4th Order
The SITR epidemic model on the spread of Tuberculosis can be seen in the following equation:
dS I
=−b S−μS+ π (4.10)
dt N
dI I
=b S−( μ+ a ) I (4.11)
dt N
dT
=aI −(μ+ c) T (4.12)
dt
dR
=cT −μR (4.13)
dt
Furthermore, the equation (4.10) – (4.13) above is solved by following the steps for solving the
Runge-Kutta method of 4th order, so that the value of each subpopulation is obtained as equation
(4.14) – (4.17) below.
1
Si+ 1=S i + ( k 1 S +2 k 2 S +2 k 3 S + k 4 S ) h (4.14)
6
1
I i+1=I i+ ( k 1 I +2 k 2 I +2 k 3 I +k 4 I ) h (4.15)
6
1
T i+1=I i + ( k 1T + 2 k 2 T +2 k 3 T + k 4 T ) h (4.16)
6
1
Ri +1=Ri + ( k 1 R +2 k 2 R + 2 k 3 R + k 4 R ) h (4.17)
6
4.4 Determination of Initial Requirements for the SITR Epidemic Model on the
Spread of Tuberculosis
Jurnal of Mathematics Technology and Education Vol. ……., No. ……., ……….. 11
Table 2. Initial Terms used in the SITR Epidemic Model on the Spread of Tuberculosis Disease
SITR Model Initial Requirements
Variables and Parameters Score Source
Thus, the SITR Epidemic Model Formulation on the Spread of Tuberculosis in North Sumatra
Province is as in equation (4.18) – (4.21) below.
dS −0.8
= IS−0.001214 S+14.420 .000 (4.18)
dt 14.420 .000
dI 0.8
= IS−( 0.001214 +0.00183 ) I (4.19)
dt 14.420 .000
dT
=0.00183 I −( 0.001214+0.111111 ) T (4.20)
dt
dR
=0.111111 T −0.001214 R (4.21)
dt
4.5 Numerical Solution of the SEIR Epidemic Model on the Spread of Tuberculosis
with the Runge-Kutta Method of 4th Order
Jurnal of Mathematics Technology and Education Vol. ……., No. ……., ……….. 12
The SEIR epidemic model on the spread of Tuberculosis can be seen in the following equation:
dS
=−bSI −μS+(1+ p) π (4.22)
dt
dE
=bSI − ( μ+ a ) E (4.23)
dt
dI
=aI −( μ +c) I (4.24)
dt
dR
=πp−(I −μR) (4.25)
dt
Furthermore, the equation (4.22) – (4.25) above is solved by following the steps for solving the
Runge-Kutta method of order 4, so that the value of each subpopulation is obtained as equation
(4.26) – (4.29) below.
1
Si+ 1=S i + ( k 1 S +2 k 2 S +2 k 3 S + k 4 S ) h (4.26)
6
1
Ei +1=Ei + ( k 1 I +2 k 2 I + 2 k 3 I +k 4 I ) h (4.27)
6
1
I i+1=I i+ ( k 1T + 2 k 2 T +2 k 3 T + k 4 T ) h (4.28)
6
1
Ri +1=Ri + ( k 1 R +2 k 2 R + 2 k 3 R + k 4 R ) h (4.29)
6
4.6 Determination of Prerequisites for the SEIR Epidemic Model on the Spread of
Tuberculosis
Table 3. Initial conditions used in the SEIR Epidemic Model on the Spread of Tuberculosis
Thus, the SEIR Epidemic Model Formulation on the Spread of Tuberculosis in North Sumatra
Province is as in the following equation (4.30) – (4.33).
dS
=−0.8 SI −0.001214 S+ (1−0.8 ) 14.420.000 (4.30)
dt
dS
=−0.8 SI −0.001214 S+ 2.884 .000
dt
dE
=0.8 SI −( 0.001214+ 0.5 ) E (4.31)
dt
dI
=0.5 I− ( 0.001214+0.111111 ) I (4.32)
dt
dR
=( 14.420 .000 ) ( 0.8 ) +0.001214 R (4.33)
dt
dR
=11.536 .000+0.001214 R
dt
Conclusion
Jurnal of Mathematics Technology and Education Vol. ……., No. ……., ……….. 14
From the numerical simulation results of the SIR, SITR, and SEIR epidemic models on the
spread of Tuberculosis by using the Runge-Kutta Method of Order 4, and by using the initial
conditions based on the data obtained, it can be concluded that, the larger the time interval used,
the more It is also clear that the movement of each (t) group Susceptible, Infectious, Treatment,
Exposed, and Recovered.
In the SIR epidemic model, we get, group Susceptible and group Infectious decrease occurred.
However, there was an increase ingroup recovered.
In the SITR epidemic model obtained, group Susceptible and group recovered, there is a
decrease. However, there was an increase ingroup Infectious and Treatment.
In the SEIR epidemic model obtained, group Susceptible, group exposed, group Infectious, and
group recovered, there is an increase.
Future Research
1. Completion of various other models, such as in the epidemic model, adding variables, for
example adding the vaccinated variable with a certain type of vaccine in the epidemic model,
completing the predator-pray model, and other models.
2. Numerical solutions using other modified Runge-Kutta Methods, such as the 5th Order
Runge-Kutta Method, 6th Order Runge-Kutta Method, Merson Runge-Kutta Method, or
other Runge-Kutta Methods.
REFERENCES
[2] Munir, R. 2015. Metode Numerik Revisi Keempat. Bandung. Penerbit Informatika.
[3] Side S, Sanusi W, Aidid MK, Sidraja S, 2016. Global Stability of SIR and SEIR Model for
Tuberculosis Disease Transmission with Lyapunov Function Method. Asian Journal of
Applied Sciences, 9 (3): 87-96.
[4] Yong B, Owen L, 2017. Hampiran Solusi Analitik pada Model Epidemik dengan
menggunakan Metode Analisis Homotofi. Bandung : LPPM Universitas Katolik
Parahyangan.
[5] Christyanti RD, Syahdan St, 2019. Solusi Numerik Model Epidemi SEIR Pada Penyebaran
Tuberkulosis Dengan Metode Dekomposisi Adomian. Jurnal Matematika dan
Pendidikan Matematika, 4 (2): 137-145.
Jurnal of Mathematics Technology and Education Vol. ……., No. ……., ……….. 15
[6] Kuzairi K, Yulianto T, Safitri L, 2016. Aplikasi Metode adams Bashforth-Moulton Pada
Model Penyakit Kanker. Jurnal Matematika “Mantik”, 2 (1): 14-21.
[7] Nur W, Mukhlisah N, 2016. Solusi Numerik Model Umum Epidemik Susceptible, Infected,
Recovered (SIR) dengan Menggunakan Metode Modified Milne-Simpson. Jurnal
Saintifik, 2 (2): 142-146.
[8] Kartono, 2012. Persamaan Diferensial Biasa: Model Matematika Fenomena Perubahan.
Yogyakarta. Graha Ilmu.
[9] Neuhauser C, 2004. Calculus for Biology and Medicine. New Jersey. Pearson Education.
[11] Yau A, Nweze ON, 2011. A Simulation of an SIR Mathematical Model of HIV
Transmission Dynamics Using the Classical Euler’s Method. Shiraz E-Medical Journal,
12 (4): 196-202.