MAT629 Reference Notes
MAT629 Reference Notes
Prepared by:
Milliward Maliyoni, PhD (Appl. Math − Math Bio)
October 2024
2 Mathematical Modelling: Introduction and Applications
dy
= f 0 (x)
dx
is a function of x itself and is found by some appropriate rule. In differential equations, given an equa-
dy
tion = f (x) we want to find a function y = f (x) that satisfies the given equation.
dx
This is an equation containing the derivatives or differentials of one or more dependent variables with
respect to one or more independent variables. Examples of DEs are:
dy ∂ 2y ∂ 2u
= −2xy and = − .
dx ∂x2 ∂t2
i. If an equation contains only ordinary derivatives of one or more dependent variables with re-
spect to a single independent variable, then it is said to be an ordinary differential equation
(ODE). For example,
dy dy
+ 10y = e2x and − xy = 0 are ODEs.
dx dx
ii. An equation involving the partial derivatives of one or more dependent variables with respect
two or more independent variables, is called a partial differential equation (PDE). For example,
∂t ∂u ∂u ∂u
=− and x +y =u are PDEs.
∂y ∂x ∂x ∂y
(b) Classification by Order
The order of a DE is the order of the highest derivative in a DE. For example,
d2 y dy
i. + − y = 0 is a second-order DE.
dx dx
dy
ii. (y − x) + 4x = 0 is a first-order DE.
dx
A general nth − order ODE is often represented by
dn y
dy
F x, y, , · · · , n = 0 (1)
dx dx
or equivalently F x, y, y 0 , · · · , y (n) = 0.
dn y dn−1 y dy
an (x) n
+ a n−1 (x) n−1
+ · · · + a1 (x) + a0 (x)y = g(x). (2)
dx dx dx
A similar definition applies to PDEs.
i. The dependent variable y and all its derivatives are of degree 1 i.e. the power of each term
containing y is 1.
ii. Each coefficient depends only on the independent variable x. In other words, all coefficients are
functions of x.
For example
The situation is simpler for first-order ODEs since we only have the first derivative of y.
Recall that a first-order ODE takes the form
dy
a1 (x) + a0 (x)y = g(x). (3)
dx
where a1 (x) 6= 0. Dividing (3) through by a1 (x) leads to
dy
+ p(x)y = q(x) (4)
dx
a0 (x) g(x)
where p(x) = and q(x) = . We wish to discuss methods for solving equation (4).
a1 (x) a1 (x)
Solution
We integrate both sides of the equation and apply substitution technique. Hence,
Z
y = cos 2x dx (5)
Z
y = cos 2x dx
Z Z
du 1
= cos u = cos u du
2 2
1
= sin u + C
2
1
= sin 2x + C.
2
Exercise
dy 2
Solve the equation = xe−x .
dx
1 2
Answer: y = − e−x + C.
2
Now, if y = f (x) denotes a solution of (7), h(f (x))f 0 (x) = g(x) and therefore
Z Z
0
h(f (x))f (x) dx = g(x) dx + C. (8)
Equation (9) is used to solve separable differential equations. This is achieved by integrating both sides of
the equation.
Note: Only one constant of integration should be used in the integration of separable equations.
dy
Example 3 Solve the equation = y.
dx
Solution
Re-writing the equations by separating the variables and integrating both sides yield
Z Z
dy
= dx
y
Z Z
1
=⇒ dy = dx
y
ln |y| = x + C
=⇒ eln |y| = ex+C
Thus, y = ex .eC
∴ y = Cex .
Exercise
Solve (1 + x) dy − y dx = 0.
Answer: y = C(1 + x).
An equation
M (x, y) dx + N (x, y) dy = 0
∂f ∂f
Note: If z = f (x, y), then dz = dx + dy.
∂x ∂y
Thus,
∂f ∂f
M (x, y) dx + N (x, y) dy = dx + dy.
∂x ∂y
where
∂f
• M (x, y) dx = dx.
∂x
∂f
• N (x, y) dy = dy.
∂y
1 4 4
d xy = x3 y 4 dx + x4 y 3 dy
4
M (x, y) dx = x3 y 4 .
N (x, y) dy = x4 y 3 .
Reading Exercise
Read about total differential, test for an exact differential and method of solution for solving exact differ-
ential equation.
Solution
∂M
M (x, y) = 5x + 4y =⇒ = 4.
∂y
∂N
N (x, y) = 4x − 8y 3 =⇒ = 4.
∂x
∂M ∂N
=⇒ = = 4.
∂y ∂x
Now
∂f ∂f
(5x + 4y) dx + (4x − 8y 3 ) dy = dx + dy
∂x ∂y
∂f
Thus, = M (x, y) = 5x + 4y.
∂x
Z
=⇒ f (x, y) = (5x + 4y) dx + g(y) (10)
5x2
= + 4xy + g(y). (11)
2
∂f
But = 4x + g 0 (y) = 4x − 8y 3 = N (x, y)
∂y
5x2
f (x, y) = + 4xy − 2y 4 = C.
2
The solution is therefore
5x2
+ 4xy − 2y 4 = C.
2
Exercise
Solve the initial value problem (IVP)
Answer: ex + xy + 2y + ey (y − 1) = 3.
dy
+ P (x)y = f (x). (14)
dx
We want to find the solution of equation (14)R
on an interval I for which P (x) and f (x) are continuous.
P (x) dx
We will use the integrating factor, I.F. = e to solve equation (14).
Exercise
Read about the derivation of the integrating factor and the method of solution of (14).
dy
Example 6 Solve the equation x + 2y = 3.
dx
Solution
We re-write the equation as
dy 2 3
+ y= . (15)
dx x x
2
Thus, P (x) = . Now the integrating factor is given by
x
1 2
R
I.F. = e x
dx
= e2 ln |x| = eln x = x2 . (16)
dy 2 2 3 2
x2 .+ y.x = .x
dx x x
dy
=⇒ x2 . + 2xy = 3x
dx
Thus,
d 2
[x y] = 3x (17)
dx
1
R
dx
where I.F. = e x = x2 .
3x2
Z
2
xy= 3x dx = + C.
2
3
=⇒ y = + Cx−2 .
2
Exercise
dy
Solve = 1 − 2y; y(0) = 0.
dx
Answer: y = 1
2
− 21 e−2x = 12 (1 − e−2x ).
Reading Exercise
Read about homogeneous functions and method of solution of homogeneous DEs.
Solution
M (x, y) = x + y =⇒ M (tx, ty) = tx + ty = t(x + y) = tM (x, y).
1
ln |x| + ln |1 + 2u| = k, where k is a constant. (19)
2
But y = ux ⇒ u = xy . Hence, equation (19) becomes
1 2y
ln |x| + ln 1 + = k.
2 x
Exercise
Solve xy 2 dy + (x3 − y 3 ) dx = 0.
y3
Answer: + ln |x| = k.
3x3
Note: Epidemic models are nonlinear systems in nature as such they are analyzed as any other nonlin-
ear system. Thus, we will briefly look at nonlinear systems as indicated in Section 2.
Definition: A vector X̄ is an equilibrium point for a dynamical system if once the state vector is equal to
X̄ it remains equal to X̄ for all future time.
Thus, if
Ẋ(t) = f (X(t), t)
f (X̄, t) = 0
An analysis of a nonlinear dynamical system may devote considerable attention to the characterization of
the equilibrium points. In linear systems, equilibrium points are basically solutions to linear equations.
The nonlinear case is different in two essential aspects:
i) Since the equilibrium points are solutions, in this case, to nonlinear equations, finding such solutions
is somewhat more of an accomplishment than in the linear case.
ii) The equilibrium point distribution is potentially more complex in the nonlinear case than in the linear
case.
Note: A system may have none, one or any number of equilibrium points in virtually a spatial pattern in
state space.
Thus, characterization of equilibrium points is not only technically more difficult, it is a much broader
question. Ultimately, interest centers not just on the existence of the equilibrium points but also on their
stability properties.
2.2.2 Stability
Stability properties characterize how a system behaves if its state is initiated close to, but not precisely at
a given equilibrium point.
(a) If a system is initiated with the state exactly equal to an equilibrium point, then by definition it will
never move.
(b) When initiated close by, however, the state may remain close by, or it may move away.
Roughly speaking, an equilibrium point is stable whenever the system state is initiated near that point, the
state remains near it, perhaps even tending towards the equilibrium point as time increases.
For a precise definition of stability, it is convenient to introduce the notation S(X̄, R) to denote a spheri-
cal region in the state space with center at X̄ and radius R.
Definition: An equilibrium point X̄ is stable if there exists R0 > 0 for which the following is true. For
every R < R0 there exists r, 0 < r < R, such that if X(0) is inside S(X̄, R), then X(t) is inside
S(X̄, R) for all t > 0.
According to the basic definitions, stability properties depend only on the nature of the system near the
equilibrium point. Therefore, to conduct stability analysis, it is often theoretically legitimate and mathe-
matically convenient to replace the full nonlinear description by a simpler description that approximates
the true system near the equilibrium point. Often a linear approximation is sufficient to reveal the stability
properties.
The linearization of a nonlinear system is based on linearization of the nonlinear function f in its descrip-
tion. For the first-order system, defined by a single function f (x) of a single variable, the procedure is to
approximate f near x̄ by
df (x̄)
f (x̄ + y) = f (x̄) + y. (21)
dx
An nth-order system is defined by n functions, each of which depends on the n variables. In this case
each function is approximated by the relation
where
∂f1 ∂f1 ∂f1
∂x1 ···
∂x2 ∂xn
∂f2 ∂f2 ∂f2
···
∂x1 ∂x2 ∂xn
··· ··· ··· ··· .
F =
(24)
··· ··· ··· ···
··· ··· ··· ···
∂fn ∂fn ∂fn
···
∂x1 ∂x2 ∂xn
Thus, the stability properties of the original system, (22), can be inferred from the linearized system, (26),
using the following results.
(a) If all eigenvalues of F have negative real part, then x̄ is asymptotically stable for the nonlinear system.
(b) If at least one eigenvalue of F has a positive real part, then x̄ is unstable for the nonlinear system.
3 Epidemic Models
3.1 A Basic SIR Epidemic Model
Epidemic models are constructed to enable us understand the spread of an infectious disease in a host
population. The major factors are:
1. Variables
These are subgroups of the host population. We have the following subgroups for a basic epidemic
model:
(a) S: The number of susceptibles. These are individuals who can catch the disease if they come in
contact with it).
(b) I: The number of Infectives. Individuals who are infected with with the disease. Can be infec-
tious or not.
(c) R: The number of Removals. Individuals who have recovered from the infection or have been
quarantined or have succumbed to the disease.
2. Parameters
These are divided into two groups.
3. Assumptions
These are sets of ordinary or partial differential equations that describe the rate of flow between compart-
ments referring to numbers or proportions in each category. Refer to Section 3.3.2 for commonly used
compartmental model frameworks.
The following are some of the common model structures (applicable to different infections);
1. SI Framework
In this structure, individuals move from susceptible class to infectious class and remain there. It
could be that one cannot recover from the infection. See Figure 1.
Transition: A change from being susceptible to infectious. This is also where the type of transmis-
I
sion is considered i.e. βS, βSI, βS .
N
2. SIS Framework
Individuals move from susceptible class to infectious then one can recover without immunity or with
temporary immunity and becomes susceptible again. See Figure 2.
3. SIR Framework
This is where recovery is with full or permanent immunity i.e. once you recover you do not become
susceptible again. See Figure 3.
4. SIRS Framework
In this framework, individuals move from susceptible to infectious class, then they recover with
temporary immunity and go back to susceptible class. See Figure 4.
- A more realistic model must take into account the fact that for most diseases infectives either recover
from the infection or they die.
- We modify the model by adding vital dynamics, that is, birth rate and death rate.
(d) The recruitments do not have the disease at the time they are joining the population.
I
S 0 (t) = π − cbS − µS + γI
N (27)
0 I
I (t) = cbS − (µ + γ)I
N
Model (27) must be analysed qualitatively i.e. finding the equilibrium points and their stability, computing
R0 etc.
4.2.1 Assumptions
(a) Constant population (i.e. no births, deaths, recruitments) with initial I0 infectives and S0 susceptibles.
(e) The rate at which individuals contract the disease is proportional to the number of contacts between S
and I.
dI
Now, > 0 if S0 > ρ (the condition for the epidemic to start). Therefore, if the initial number of
dt
S0 < ρ, then there is no epidemic. ρ gives a threshold density of susceptibles.
Exercise
Verify that model system (28) is a constant population model.
Table 1: Parameter symbols and their definition of the SIR modified model
Parameter Symbol Parameter Definition
b Birth rate (aka flow rate)
δ Natural mortality rate
α Disease-induced death
p Proportion of offspring of infected parents who are also infectious
γ Removal rate
β Rate of infection
Note: bpI represents the proportion of those who are born infected; αR represents death due to disease of
those who are removed.
Exercise
State any three assumptions that are made in the model represented by Figure 6.
S 0 (t) = bN − δS − βSI
= bN − (δ + βI)S
0
I (t) = βSI − αI − δI − γI + bpI
(29)
= βSI − (α + δ + γ)I + pbI
0
R (t) = γI − αR − δR
= γI − (α + δ)R
Note: Mean length of stay (MLS) in a class is the reciprocal of what is going out to another class. In
model (29),
1
M LS of I =
α+δ+γ
and
1
M LS of R = .
α+δ
dS
= aN − (λ + µ)S + γR
dt
dI
= λS − (µ + α + ν)I (30)
dt
dR
= νI − (µ + γ)R
dt
I
where λ = βI or λ = β . Thus, λ depends on the type of incidence being used.
N
Exercise
State any three assumptions that are made in the model represented by Figure 7.
• π: Recruitment rate.
• λ: Infection rate.
• ρ: Progression rate.
• θ: Recovery rate.
• α: Disease-induced death.
From Figure 8, we get the following system of nonlinear ordinary differential equations;
S 0 (t) = π − (λ + µ)S
E 0 (t) = λS − (µ + ρ)E
(31)
I 0 (t) = ρE − (µ + α + θ)I
R0 (t) = θI − µR
I
where λ = βI or λ = β .
N
Exercise
Modify model system (31) by including loss of immunity and vertical transmission.
(b) Invariant region (i.e. which region does the solution lie).
(g) Sensitivity analysis using either partial rank correlation coefficient (PRCC) method or the normalized
forward sensitivity index.
References
1. Anderson RM, May RM (1991). Infectious diseases of humans: Dynamics and Control, Oxford
University Press.
2. Boyce WE, DiPrima RC (2012). Elementary Differential Equations and Boundary Value Problems,
10th edition, New York: John Wiley
5. Zill, D.G., (2012). A First Course in Differential Equations with Modeling Applications, 10th Edi-
tion, Boston: PWS-Kent Publishing.