Thesis 1
Thesis 1
Thesis 1
Michael Y. Li
An Introduction
to Mathematical
Modeling
of Infectious
Diseases
Mathematics of Planet Earth
Volume 2
Series editors
An Introduction
to Mathematical
Modeling of Infectious
Diseases
Michael Y. Li
Mathematical and Statistical Sciences
University of Alberta
Edmonton, AB
Canada
v
vi Preface
and Frank Lee, whose feedbacks really helped with the develop-
ment of materials in the book. Many of these students are working
as modelers in public health services and private sectors. A special
thanks to Rebecca De Boer and Weston Roda for their assistance
with Matlab codes and for teaching Matlab tutorials in my mod-
eling classes.
I want to express my deep gratitude to my family for their
unwavering support of my work, especially to my wife Audrey for
her constant encouragement, and to my daughter Jessica for proof
reading the manuscripts. I wish to thank many of my mentors,
James Muldowney, Paul Waltman, Fred Brauer, Pauline van den
Driessche, and Gail Wolkowicz, for their guidance and support for
my research.
A special thanks to Donna Chernyk of Springer for all her work
and help during the publication process of the book.
Michael Y. Li
Edmonton, Alberta
October 15, 2017
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
ix
x Contents
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Chapter 1
Important Concepts in
Mathematical Modeling
of Infectious Diseases
and the epidemic slows down and stops. If fresh susceptibles are
added to the population, either from birth or migration, or if rein-
fection occurs easily, the epidemic may persist and the infection
may remain in the population over a long period of time. In this
case, the disease is said to be endemic in the population. If the
disease spreads spatially on a global scale to many countries and
continents, a pandemic occurs. The 1918 Spanish flu that spread to
all continents and killed over 50 million people is a classic exam-
ple of a global pandemic. With modern air travel, many emerging
and reemerging infectious diseases have an increasing potential to
cause a global pandemic.
Facing an imminent epidemic, public health authorities will be
looking for answers to the following important questions:
(1) How severe will the epidemic be? The severity can be mea-
sured in two different ways:
(a) Total number of infected people who may require med-
ical care.
(b) Maximum number of infected people at any given time.
(2) How long will it last? When will it peak? What will be its
time course?
(3) How effective will quarantine or vaccination be?
(4) What quantity of vaccine or anti-viral drugs should be
stockpiled?
(5) What are effective measures to contain, control, and eradi-
cate an endemic disease?
(1) Statistical models. These models are very data oriented and
are constructed to deal with a specific set of data.
• Advantages: statistical models are widely used in epi-
demiology and public health research.
• Drawbacks: statistical models require large samples of
data.
(2) Deterministic models. These are typically models using dif-
ferential and difference equations of various forms. The key
assumption is that the sizes of the susceptible and infectious
populations are continuous functions of time. The mod-
els describe the dynamic interrelations among the rates of
change and population sizes.
• Advantages: mathematical theories for this type of model
are more mature in comparison to stochastic models; the
derivation of mathematical models are less data depen-
dent in comparison to statistical models; and mathemat-
ical models are suited for making predictions.
6 Important Concepts
loss of immunity
new new
susceptibles infections recovery
S I R
removal removal removal
1.3 An Example:
Kermack–McKendrick Model
To demonstrate how various rates in equation (1.2) may depend
on S(t), I(t), and R(t), we make the following hypotheses about
the transmission process of an infectious disease and its host pop-
ulation:
λIS γI
S I R
dS
= −λIS (1.3)
dt
dI
= λIS − γI (1.4)
dt
dR
= γI, (1.5)
dt
with initial conditions
In the model, functions S(t), I(t), and R(t) are variables. Since
they denote the number of people, they are expected to take non-
negative values. Constants λ and γ are model parameters, and
they are assumed to be nonnegative since they denote rate con-
stants. If the values of model parameters λ and γ are known, then
for each set of initial conditions S0 and I0 , model (1.3)–(1.5) has
a unique solution (S(t), I(t), R(t)) that produces a prediction for
the time course of the epidemic for t > 0. Here t = 0 marks the
beginning of the epidemic.
Even when the values of parameters are not known, some sim-
ple observations about the solutions to system (1.3)–(1.5) can be
made that hold for all or a large set of possible parameter values.
1. Let N (t) = S(t) + I(t) + R(t) denote the total host popu-
lation. Then, by adding equations (1.3)–(1.5), we have
dN
= 0,
dt
and thus the total population N (t) = N0 = S0 + I0 remains
a constant.
2. From equation (1.3) we obtain
dS
≤ 0.
dt
Therefore, S(t) is always decreasing. In particular,
S(t) ≤ S0 .
1.4 Important Concepts 11
dN (t)
= −rN (t), r > 0,
dt
and thus N (t) = N0 e−rt , or
N (t)
= e−rt . (1.6)
N0
Therefore, e−rt gives the fraction of the population that remains
in the compartment C. In probability terms, e−rt is the probabil-
1.4 Important Concepts 13
which gives the fraction of the population that has left C during
the time period [0, t), or the probability of an individual who has
left C during [0, t). Here we see that F (t) has the characteristics of
a probability distribution. In fact, if we let X denote the random
variable of the residence time of an individual in compartment C,
i.e., the time period from entrance to exit, we see that
(1) F (t) ≥ 0
(2) F (t) → 0, as t → −∞
(3) F (t) → 1, as t → +∞.
F
1
0.8
0.6
0.4
0.2
-40 -20 20 40 t
R
δR / S
We see that our new SIR model (1.3), (1.11) and (1.12) with gen-
erally distributed infectious periods is a system of differential-
integral equations.
In the special case when F (t) = 1 − e−γt is an exponential dis-
tribution, we have G(t) = e−γt , and from (1.11)
t
I(t) = I0 (t) + λI(τ )S(τ )e−γ(t−τ ) dτ,
0
1.4 Important Concepts 17
Since I0 (t) = −γI0 (t), we obtain the original equation (1.3)
R (t) = γI(t).
This confirms our claim that the SIR model in the form of ODE
(1.3)–(1.5) assumes an exponentially distributed infectious period.
Let us take another special case when infectious periods have
the following survival function:
⎧
⎨1
if − ∞ < t < ω,
G(t) = ⎩ (1.13)
0 otherwise.
and
R (t) = λI(t − ω)S(t − ω). (1.15)
Here we have used the fact that R0 (t) = 1 for t > ω. We see
here that the delayed differential equation model (1.3), (1.14) and
(1.15) is the result of assuming that the infectious periods have a
Heaviside distribution function, or Dirac delta density function,
at t = ω.
Exercises.
A + B ⇐⇒ A B
rate = k [A] [B].
v0
vmax
vmax
2
K [A]
λ(N ) = βN
βI(t)S(t). (1.23)
Suitability of these different incidence forms has been dis-
cussed in many research articles [6, 13, 26, 27, 66].
bN λIS γI
S I R
d1 S d2 I d3 R
Figure 1.7: Transfer diagram for an SIR model with birth and
death.
and thus
N (t) = N0 e(b−d)t .
If b > d, N (t) → ∞ exponentially as t → ∞; if b < d, N (t) → 0
exponentially as t → ∞; and if b = d, N (t) ≡ N0 , a constant.
Exponential growth and decay of the total population are often
modified by the logistic growth,
N 2 (t)
N (t) = (b − d)N (t) − , (1.25)
K
24 Important Concepts
A λIS γI
S I R
d1 S d2 I d3 R
Exercises.
Beginning of End of
infectiousness infectiousness
Onset of
Time of Infection symptoms Recovery
Incubation period
δR
R S
bN − pbI λIS γI
S I R
pbI
∞
S(0, t) = [b(a)N (t, a) − p(a)b(a)I(t, a) ]da, S(a, 0) = ψ(a),
a
0∞
I(0, t) = p(a)b(a)I(t, a) da, I(a, 0) = φ(a),
(1.30)
a0
R(0, t) = 0, R(0, a) = ξ(a).
30 Important Concepts
Here, parameter b(a) denotes the birth rate for populations at age
a, and p(a) is the fraction of infectious newborns from populations
at age a. The individuals are assumed to become child-bearing at
age a0 . The term p(a)b(a)I(t, a) in the boundary conditions is due
to vertical transmission, and (ψ(a), φ(a), ξ(a)) denotes the initial
age distribution. The age-dependent force of infection is given by
∞
λ(a, t) = λ(a, b)I(b, t)db,
0
S = bN − λIS − dS − pS
I = λIS − (d + γ)I
(1.31)
R = pS + γI − dR
N = S + I + R.
pS
bN λIS γI
S I R
dS dI dR
λIS γI
S I R
pS αλIV
λIS γI
S I R
δQ
pI
b λIS γI
S E I R
bS bE bI bR
For the SEIR model with the transfer diagram in Figure 1.16,
the basic reproduction number is given by
1
R0 = λ · · ,
+b γ+b
which can be interpreted as
1
Note that the mean infectious period γ+b is understood as the
mean period an individual remains alive and infectious. We also
note that the initial susceptible population does not appear in R0
in this case. The reason is that, in this model, the constant total
population N = S + E + I + R is scaled to 1.
When models get more complex, R0 may be harder to derive
directly from the transfer diagram. Other methods for deriving
R0 exist. Most of them are based on the stability analysis of the
disease-free equilibrium. In the later chapters, we will illustrate
various ways to derive and interpret R0 .
For more detailed description and discussions on the basic
reproduction number for epidemic models, we refer the reader
to [2, 7, 14, 15, 27, 57, 60]. A practical approach to the compu-
tation of R0 for complex epidemic models is given in [64].
Chapter 2
S (t) = −βI(t)S(t) ≤ 0.
R (t) = γI(t) ≥ 0
(1) The disease eventually dies out (I(∞) = 0). The model
describes an epidemic disease.
40 Five Classic Examples
d S (t)
φ(S(t), I(t)) = I (t) + S (t) − ρ = −γI(t) + ρβI(t) = 0
dt S(t)
for all t. Therefore, function φ(S, I) remains a constant along
a solution (S(t), I(t)) of (2.4). This implies that trajectories
(S(t), I(t)) of system (2.4) are given by the family of level curves
φ(S, I) = C of the first integral φ(S, I), or equivalently defined by
equation (2.6). This gives us a way to plot trajectories of (2.4) by
2.1 Kermack–McKendrick Model 41
φ(S, I) = S + I − ρ log S = C.
we obtain
S0 − S∞ = ρ(log S0 − log S∞ ), (2.7)
2.1 Kermack–McKendrick Model 43
and
S0 − S∞
ρ= . (2.8)
log S0 − log S∞
Note that S∞ gives the number of susceptible individuals who
escape the epidemic and can be used as an indicator of the severity
of the epidemic. Equation (2.7) is often called the final size equa-
tion. If the basic reproduction number R0 = Sρ0 = βγ S0 is known
for a disease, then equation (2.7) can be used to estimate the
final size S∞ . On the other hand, after an epidemic, the final size
S∞ is known, and equation (2.8) can be used to estimate the
basic reproduction number R0 , which can give an estimate of the
transmission rate β.
The severity of an epidemic can also be measured in terms of
the cumulative number of infected individuals, also called the size
of an epidemic:
S0 − S∞ = R∞ . (2.10)
C = I0 + S0 − ρ log S0 = N0 − ρ log S0 ,
44 Five Classic Examples
and thus
where 1
S0 2 2S0 I0 2
α= −1 + ,
ρ ρ2
(2.16)
1 S0
φ = tanh−1 −1 .
α ρ
Therefore
dR γα2 ρ2 1
= sech2 αγt − φ . (2.17)
dt 2S0 2
If I0 ≈ 0 and S0 > ρ, then we have from (2.16), α = S0
ρ
− 1, and
from (2.15)
ρ2 S 0 γ S0
R(t) = −1 1 + tanh ( − 1)t − φ . (2.18)
S0 ρ 2 ρ
Letting t → ∞ and using limt→∞ tanh(at + b) = 1, we obtain an
approximate value for the size R∞ = S0 − S∞ of the epidemic
ρ
R∞ = 2ρ 1 − . (2.19)
S0
If we write S0 = ρ + ν for ν > 0, then
ρ ν
R∞ = 2ρ 1 − = 2ρ
ρ+ν ρ+ν
ρ
= 2ν ≈ 2ν.
ρ+ν
Namely, the size of the epidemic is roughly 2ν. Therefore,
S∞ = S0 − R∞ = ρ + ν − 2ν = ρ − ν.
Exercises.
(1) Solve equation (2.13) and find its exact solutions (hint: try
separation of variables).
(2) Numerically solve equation (2.13) and its second-order
approximation (2.14) using a mathematical software pack-
age. Compare solutions of the two equations that originate
from the same initial point. Describe what you observe
about the differences of the two solutions. Can you explain
the differences you observed? Based on these numerical sim-
ulations, what conclusions can you draw regarding the accu-
racy of the second-order approximation of equations (2.13)?
Based on your observations, what can you say about the
validity of statement (2) of Theorem 2.1.1?
S (t) = −βIS + γI
(2.20)
I (t) = βIS − γI.
or
I
I = (βN0 − γ)I 1 − . (2.21)
N0 − γ
β
Let
I
f (I) = (βN0 − γ)I 1 − . (2.22)
N0 − γ
β
I = f (I). (2.23)
Recall that R0 = βN γ
0
denotes the basic reproduction number.
Proposition 2.2.1 can be reinterpreted as follows for solutions
(S(t), I(t)) of (2.20):
(1) If R0 < 1, then (S(t), I(t)) → (N0 , 0) as t → ∞.
(2) If R0 > 1, then (S(t), I(t)) → ( βγ , N0 − βγ ) as t → ∞.
Γ = {(S, I) ∈ R2+ | S + I = N0 }
Biological interpretations:
Exercises.
x = f (x)
S = b − βIS − bS
I = βIS − γI − bI (2.24)
R = γI − bR.
The feasible region for model (2.24) is:
S = b − βIS − bS
(2.25)
I = βIS − γI − bI
b − βIS − bS = 0
(2.26)
βIS − γI − bI = 0.
S = γ+b
β
, I = I ∗ . In case (1), any solution of (2.25) staying in the
set where I = 0 will satisfy S = b − bS, and thus S(t) → 1 as
t → ∞. In both cases, the only compact invariant set in the set
K is the singleton {P0 }. This implies that all solutions in Γ con-
verge to P0 . We can also show that the existence of the Lyapunov
function L and the global convergence imply the local stability of
2.3 A Model with Demography 57
S = P (S, I)
(2.30)
I = Q(S, I).
1
Let α(S, I) = I
be a Dulac multiplier. Then
∂ ∂ ∂ b bS ∂
(αP ) + (αQ) = − βS − + (βS − b − γ)
∂S ∂I ∂S I I ∂I
b ◦
= −β − < 0, in Γ.
I
58 Five Classic Examples
◦
Therefore, the Bendixson–Dulac condition holds in Γ and no non-
◦
constant periodic solutions exist in Γ.
Summarizing the analyses in previous sections, we obtain a
threshold theorem.
Theorem 2.3.2
Exercises.
λIS
S = bN − − dS
N
λIS (2.31)
I = − γI − dI
N
R = γI − dR.
N = (b − d)N. (2.32)
x = f (x), x ∈ Rn , (2.33)
x x 1 x
n
y = − 2 N = f (x) − 2 fi (x)
N N N N i=1
x x n
x
=f − fi (by (2.34))
N N i=1 N
n
= f (y) − y fi (y).
i=1
Namely,
n
y = f (y) − y fi (y), (2.38)
i=1
and
n
yi = 1. (2.39)
i=1
s = b − λis − bs
i = λis − (b + γ)i (2.41)
r = γi − br,
with
s + i + r = 1. (2.42)
Note that system (2.41) has the same form as system (2.24). We
can apply the same phase-plane analysis as in Section 2.3 to arrive
at the next threshold result. Let
λ
R0 = ,
b+γ
and
I (t) = [λ − (d + γ)]I.
Therefore,
(1) I(t) → 0 exponentially if R1 = λ
d+γ
< 1;
R = −dR.
R = γI − dR
→ ∞, as t → ∞.
N (t) = N0 , s(t) → 1,
b=d R0 ≤ 1 S(t) = N0 s(t), i(t) → 0, P0 GAS P ∗ DNE
I(t) = N0 i(t), r(t) → 0.
R(t) = N0 r(t).
s(t) → s∗ ,
R0 > 1 i(t) → i∗ , P0 US P ∗ GAS
r(t) → r∗ .
N (t) → 0,
s(t) → 1,
S(t) → 0,
b<d R0 ≤ 1 i(t) → 0, P0 GAS P ∗ DNE
I(t) → 0,
r(t) → 0.
R(t) → 0.
s(t) → s∗ ,
R0 > 1 i(t) → i∗ , P0 US P ∗ GAS
r(t) → r∗ .
N (t) → ∞,
s(t) → 1,
S(t) → ∞,
b>d R0 ≤ 1 R1 ≤ 1d i(t) → 0, P0 GAS P ∗ DNE
I(t) → 0,
r(t) → 0.
R(t) → ∞.
N (t) → ∞,
s(t) → s∗ ,
S(t) → ∞,
R1 > 1 i(t) → i∗ ,
I(t) → ∞,
r(t) → r∗ .
R(t) → ∞.
N (t) → ∞,
s(t) → s∗ ,
S(t) → ∞,
R0 > 1 i(t) → i∗ , P0 US P ∗ GAS
I(t) → ∞,
r(t) → r∗ .
R(t) → ∞.
a
R0 = (b+γ)
λ
.
b
P0 = (1, 0, 0).
c
P ∗ = (s∗ , i∗ , r∗ ).
d
R1 = (d+γ)
λ
.
(1) If R0 = b+γ
λ
≤ 1, then the disease always dies out from the
population in the sense that the fraction of the population
that is infected (usually called the disease prevalence) goes
to zero as t → ∞.
(2) If R0 > 1, then any initial outbreak will lead to an endemic
disease because the infectious fraction approaches a positive
constant as t → ∞.
Exercises.
φ(x) = 1.
68 Five Classic Examples
a V = ã H. (2.47)
x = amb1 y(1 − x) − γ1 x
(2.50)
y = ab2 x(1 − y) − γ2 y.
a2 mb1 b2 − γ1 γ2 a2 mb1 b2 − γ1 γ2
x∗ = , y∗ = .
ab2 (amb1 + γ1 ) amb1 (ab2 + γ2 )
2.5 Ross–MacDonald Model 73
We see that the off-diagonal terms are both positive, and thus
J(x, y) is a Metzler matrix. System (2.50) is a monotone system
and is irreducible in the interior of Γ, and its solutions preserve
the order defined by the positive quadrant.
Next, we verify that system (2.50) is strictly sublinear using
the definition in Section 3.8. Let 0 < λ < 1 and
Similarly, we can verify that Q(λx, λy) > λQ(x, y), for (x, y) ∈ Γ
and x > 0, y > 0. This implies that F (x, y) is strictly sublinear.
We can thus apply Theorem 3.8.5 to prove the global stability of
P0 when R0 ≤ 1, and that of P ∗ when R0 > 1.
2.5.4 Exercises
Gonorrhea is a sexually transmitted infection (STI). Gonorrhea
is caused by the bacterium Neisseria gonorrheae and spread
between people through sexual contact. Individuals who have had
gonorrhea and received treatment can get reinfected. The Center
for Disease Control and Prevention (CDC) estimated that about
400,000 cases of gonorrhea were reported in the U.S. in 2015.
A mathematical model for gonorrhea transmission dynamics was
formulated and analyzed in Lajmanovich and Yorke [36]. The
model includes cross infections among a finite number of groups.
2.5 Ross–MacDonald Model 75
x = f (x). (3.1)
ϕ (t) = f (ϕ(t)).
y = Ay. (3.3)
x̃ = g(x̃),
where g(x̃) = f (x̃ + x̄). Then g(0) = f (x̄) = 0 and we have shifted
the equilibrium x̄ to 0, and Theorems 3.3.1 and 3.3.2 will be appli-
cable. The next result deals with the instability of equilibrium
x = 0.
Theorem 3.3.3 Suppose that a function V (x) exists such that
∗
V (x) ≤ 0, for x ∈ G.
∗
Let K be the largest invariant subset in the set {x ∈ G : V (x) = 0}.
Since V (x(t)) decreases along a solution x(t, x0 ) of system (3.1),
the omega-limit set of the solution,
ω(x0 ) = {x ∈ G : there exists tn → ∞ such that x(tn , x0 ) → x1 as n → ∞},
∗
is contained in the set where V (x) = 0. Since omega-limit sets
are invariant, we know ω(x0 ) must be contained in the largest
invariant subset K. This is the well-known LaSalle’s Invariance
Principle.
Theorem 3.3.4 If a solution x(t, x0 ) stays entirely in G for
t ≥ 0, then its omega-limit set ω(x0 ) ∩ G ⊂ K.
Corollary 3.3.5 If K contains a single point x̄, then x̄ is an
equilibrium and solutions that stay entirely in G for t ≥ 0 converge
to x̄ as t → ∞.
If we also know that x̄ is locally stable, and that all solutions
starting in G remain in G (in this case, G is said to be posi-
tively invariant), then Corollary 3.3.5 implies that x̄ is globally
asymptotically stable in the region G.
γ = {p(t) : 0 ≤ t < T }
(1) orbitally stable if for all > 0, there exists δ > 0 such that
|x0 − p(0)| < δ implies d(x(t, x0 ), γ) < , where d(x, γ) =
miny∈γ |x − y| is the distance from x to γ.
(2) orbitally asymptotically stable if (a) it is orbitally stable and
(b) there exists δ1 > 0 such that |x0 − p(0)| < δ1 implies
d(x(t, x0 ), γ) → 0 as t → ∞. In this case, the periodic orbit
is called a limit cycle.
15
10
-3 -2 -1 1 2 3
-5
-10
-15
1, λ1 , . . . , λn−1 . (3.9)
x = f (x), (3.10)
Proposition 3.5.1
f(x)
f(x)
-2 0 3 x
0 K N
t
0 2 4 6 8 10 12
x = f (x), (3.12)
(1) K ⊂ D is compact;
(2) K contains no equilibria;
(3) K contains a semi-orbit.
x0
K
x(t, x0)
holds.
Show the following:
x = f (x), x ∈ Rn . (3.17)
S = b − βIS − bS
I = βIS − γI − bI.
Γ = {(S, I) ∈ R2+ | 0 ≤ S + I ≤ 1}
lim inf S(t) > 0 , lim inf I(t) > 0 , lim inf 1 − S(t) − I(t) > 0 . (3.19)
t→∞ t→∞ t→∞
L(S, I) = I.
x = f (x). (3.22)
Then:
(1) If f (0) = 0, then either all solutions in Rn+ tend to the equi-
librium 0 or there exists an equilibrium p > 0 that is globally
asymptotically stable in the region Rn+ \ {0};
(2) If f (0) > 0, then there exists equilibrium p > 0 that is glob-
ally asymptotically stable in Rn+ .
Parameter Estimation
and Nonlinear
Least-Squares Methods
(1) Find a straight line y = ax + b that “best fits” all the data
points.
(2) Find a m-th order polynomial
y = am xm + am−1 xm−1 + · · · + a1 x + a0
that “best fits” all data points.
(3) Find a curve of form
y = a0 f0 (x) + a1 f1 (x) + · · · + am fm (x)
that “best fits” all data points. Here f0 (x), f1 (x), · · · , fm (x)
are given functions.
meaning of best fitting. When n > 2, there is little hope for a line
to pass through more than two data points, or in other words, for
all the following equations to hold simultaneously:
y1 = a1 x 1 + a0
y 2 = a1 x 2 + a0
···
y n = a1 x n + a0 .
From Table 4.1, we see that d(a0 , a1 ) measures the total error
between data yi and prediction a1 xi + a0 for i = 1, · · · , n. This
problem is also a standard minimization problem: we look for a
pair (â0 , â1 ) at which the function d(a0 , a1 ) achieves a minimum.
The choice of the Euclidean norm for the measure of error gives
rise to the term “least squares”. It ensures that d(a0 , a1 ) is a dif-
ferentiable function. It also allows the utilization of Euclidean dot
product and orthogonal projection.
A mathematical formulation of the least-squares prob-
lem. Let
⎡ ⎤ ⎡ ⎤
y1 1 x1
⎢ . ⎥ ⎢. . ⎥ a
b=⎢ ⎥
⎣ .. ⎦ , A=⎢ ⎥
⎣ .. .. ⎦ , x= 0 .
a1
yn 1 xn
106 Nonlinear Least-Squares
col(A) = {Ax : x ∈ Rn }
AT (b − Ax̂) = 0.
AT Ax̂ = AT b. (4.5)
Theorem 4.1.1 A least-squares solution x̂ satisfies the normal
system (4.5).
namely,
4 22 a0 9
= .
22 142 a1 57
Therefore
−1 ⎡ ⎤
2
a0 4 22 9 1 142 −22 9 ⎣ 7 ⎦.
= = =
a1 22 142 57 84 −22 4 57 5
14
This gives a0 = 27 , a1 = 5
14
, and the least-squares line
2 5
y= + x.
7 14
See Figure 4.2.
Example 2. Find a quadratic curve that best fits the data points
y = a 2 x 2 + a 1 x + a0 .
namely, ⎡ ⎤⎡ ⎤ ⎡ ⎤
4 11 57 a0 7
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎣11 57 287 ⎦ ⎣a1 ⎦ = ⎣ 5 ⎦ .
57 287 1569 a2 65
The system has a unique solution
4871 12515 1853
â0 = ≈ 2.9719, â1 = − ≈ −1.909, â2 = ≈ 0.2826,
1639 6556 6556
and the unique least-squares quadratic curve for the given data
points is
y = 0.2826x2 − 1.909x + 2.9719.
See Figure 4.3.
110 Nonlinear Least-Squares
Solution. Let
y(t) = ln x = ln a0 + a1 t,
and
b0 = ln a0 , b1 = a1 , y1 = ln x1 , ··· , yn = ln xn .
4.2 Nonlinear Least-Squares Problem 111
y(t) = b0 + b1 t, t>0
find a parameter value θ̂ such that the curve y = f (x, θ̂) minimizes
the squared sum of errors (SSE):
n
SSE(θ) = (yi − f (xi , θ))2 . (4.6)
i=1
The reader should think about why the method of linear least-
squares problems discussed in the previous section will not work
for this problem. We will treat SSE(θ) as a smooth function of θ
and employ multivariable calculus to find its minimum. In fact, a
minimum of SSE(θ) in Rm must be achieved at a critical point;
namely, where
112 Nonlinear Least-Squares
∂SSE(θ)
= 0, j = 1, · · · , m. (4.7)
∂θj
n
∂f
[yi − f (xi , θ)] − (xi , θ) = 0, j = 1, · · · , m. (4.8)
i=1 ∂θj
n
∂f (xi , θ(k) )
f (xi , θ) ≈ f (xi , θ (k)
)+ (θs − θs(k) ).
s=1 ∂θs
Let
∂f (xi , θ(k) )
J= = (Jij )
∂θj
be the Jacobian matrix at θ(k) . We note that Jij in the above
relation depends on k, and for simplicity of notation, we choose
to suppress the dependence on k. Then equation (4.8) can be
approximated by
n
m
yi − f (xi , θ(k) ) − Jis (θs − θs(k) ) [−Jij ] = 0, j = 1, · · · , m. (4.9)
i=1 s=1
Let
Δyi = yi − f (xi , θ(k) ),
(k+1) (k)
Δθj = θj − θj .
Then equation (4.9) can be rewritten as
4.2 Nonlinear Least-Squares Problem 113
n
Jis Jij Δθs(k+1) = Jij Δyi , (4.10)
i=1 s=1 i=1
f (x, θ) = α(x) · θ,
where α(x) = (α1 (x), · · · , αm (x)) and “·” denotes the dot product
in Rm , then we would expect that the Gauss–Newton method
leads to the linear least-squares method. Indeed,
m
f (xi , θ) = α(xi ) · θ = αj (xi )θi , i = 1, · · · , n,
j=1
and
n
SSE(θ) = (yi − α(xi ) · θ)2 .
i=1
Therefore,
114 Nonlinear Least-Squares
∂SSE
n
= (yi − α(xi ) · θ)(−αj (xi ))
∂θj i=1
(4.12)
n
=− αj (xi )(yi − α(xi ) · θ), j = 1, · · · , m.
i=1
Let A = (αj (xi )). Then equation (4.12) can be written in matrix
form as
AT y − AT A θ = 0,
which gives the normal equation
A T A θ = AT y
(1, 4.6), (2, 8.82), (3, 16), (4, 31.3), (5, 58.5),
y = ln x, b0 = ln a0 , b1 = a1 ,
we obtain
y = b0 + b1 t
and the new data set
(1, 1.526), (2, 2.177), (3, 2.773), (4, 3.444), (5, 4.069).
1 5 4.069
This gives
a0 = e0.892 = 2.44, a1 = b1 = 0.635,
and the least-squares curve is
x = 2.44e0.635t .
Here
(k)
Δa1 a − a0
= 0 (k) ,
Δa2 a1 − a1
and
(k)
(k)
Δyi = yi − a0 ea1 , 1 ≤ i ≤ 5.
Choosing an initial vector
(0)
a0 1
(0) =
a1 1
we obtain, for k = 0,
(1)
a0 1
(1) = 1
a1
⎡ 1.882 ⎤
−1
2.718 7.389 20.086 54.598 148.413 ⎢
1.431 ⎥
+
25472.8 123383 ⎢ −4.086 ⎥
133383 602214 2.718 14.778 60.257 218.393 742.066 ⎣ ⎦
−23.298
−89.913
1.386
= .
0.801
(t1 , g(x(1) )), (t2 , g(x(2) )), · · · , (tp , g(x(p) )), x(i) ∈ Rd . (4.14)
Then the squared sum of errors (SSE) between our solution and
the data can be measured by
p
SSE(θ) = d(g(x(t, θ)), y)2 = ||g(x(ti , θ)) − g(x(i) )||2 . (4.15)
i=1
n
||g(x) − g(y)||2 = |gi (x) − gi (y)|2 .
i=1
f u n c t i o n f=SIRmodel ( t , y , par )
% L a b e l t h e p a r a m e t e r s and v a r i a b l e s
lambda = par ( 1 ) ;
gamma = par ( 2 ) ;
S=y ( 1 ) ;
I=y ( 2 ) ;
R=y ( 3 ) ;
N=S+I+R ;
% Input the d i f f e r e n t i a l equations
Sdot =-lambda * I *S ;
I d o t=lambda * I *S - gamma* I ;
Rdot=gamma* I ;
f =[ Sdot I d o t Rdot ] ’ ;
end
f u n c t i o n s o l=SIRSol ( par , IC , t )
% d i s p ( num2str ( par ) )
DeHandle=@( t , y ) SIRModel ( t , y , par ) ;
[ ~ , Y]= ode45 ( DeHandle , t , IC ) ;
s o l=Y ’ ;
end
width = 0 . 1 ;
ndataSIR =20*[ 0 normrnd ( 0 , width , [ 1 , numpts ] ) ;
0 normrnd ( 0 , width , [ 1 , numpts ] ) ;
0 normrnd ( 0 , width , [ 1 , numpts ] ) ] ;
We add the noise term to the model outputs with λ = 0.01 and
γ = 0.1 and initial conditions S(0) = 50, I(0) = 1, and R(0) = 0
to produce a set of artificial data:
lambda = 0 . 0 1 ;
gamma= 0 . 1 ;
par =[ lambda gamma ] ;
IC =[50 1 0 ] ;
SIRData=SIRSol ( par , IC , t d a t a )+ndataSIR ;
We can visualize the data (shown in Figure 4.5) for I(t) and N (t):
figure ;
p l o t ( t d a t a , SIRData ( 1 , : ) , ’ r * ’ ) ;
h o l d on ;
p l o t ( t d a t a , SIRData ( 2 , : ) , ’ o ’ ) ;
and call fminsearch with an initial guess for the parameter values
λ = 8, γ = 0.02:
[ SIRtheta , f v a l , e x i t f l a g ] = f m i n s e a r c h ( SumSquaresSIR , [ 8
0.02]) ;
S I R s o l=S I R p a r S o l ( SIRtheta , t s o l ) ;
figure ;
p l o t ( t d a t a , SIRData , ’ . ’ ) ;
h o l d on ;
p l o t ( t s o l , SIRsol , ’ - - ’ ) ;
Figure 4.7: Solutions (S(t), I(t), R(t)) of the model using best-fit
parameter values.
Exercises.
(1) Try out the Matlab codes in the example and reproduce the
best-fit parameter values and the graphics. You may want
to choose a different set of values for λ and γ to generate the
data and see what results you get. Another good practice is
to pick several initial guesses for the fminsearch to repeat
the fitting process, and see if you obtain the same set of
best-fit parameters.
(2) Suppose that we only have data for I(t) available for us.
How would you modify the least-squares error term to
reflect this change? Can you modify the Matlab codes and
fit the best-fit parameter values for both λ and γ?
Chapter 5
Special Topics
S = μ − λIS − μS
E = λIS − ( + μ)E
(5.1)
I = E − (γ + μ)I
R = γI − μR.
5.1 SEIR Models 127
(1 − N ) = −μ(1 − N ),
1 − N (t) = (1 − N0 )e−μt , t ∈ R.
(1) If N0 = 1 then N (t) = 1 for all t, and thus the total popu-
lation remains a constant 1.
(2) If N0 = 1 then N (t) → 1 exponentially as t → ∞.
Based on these conclusions, we can deduce that all the limit sets
(as t → ∞) of solutions to (5.1) are contained in the hyperplane
S + E + I + R = 1, which is also invariant. If we are interested in
the limiting behaviors of solutions, it suffices to restrict our atten-
tion to the invariant plane S + E + I + R = 1. The invariance of
the plane means that the total population N (t) remains 1 for all
t if N (0) = 1. As we have seen in Chapter 2, the constant total
population N has been scaled to 1 for simplicity.
The conservation of the total population, S + E + I + R = 1,
allows us to simplify system (5.1) by reducing the number of vari-
ables by 1. For instance, we can substitute
into the system and only consider the equations for S, E, and I.
Once the behaviors of S(t), E(t), and I(t) are understood, the
behaviors of R(t) can readily be obtained from the linear
128 Special Topics
relation (5.2). In fact, for system (5.1), since the first three equa-
tions do not contain the variable R, we may simply first ignore
the R equation and consider the following 3-dimensional system
of differential equations:
S = μ − λIS − μS
E = λIS − ( + μ)E (5.3)
I = E − (γ + μ)I.
μ − λIS − μS = 0
λIS − ( + μ)E = 0 (5.5)
E − (γ + μ)I = 0.
Proposition 5.1.1
p2 + ( + γ + 2μ)p + ( + μ)(γ + μ) − λ = 0.
Since
p2 + p3 = −( + γ + 2μ) < 0,
p2 p3 = ( + μ)(γ + μ) − λ) = ( + μ)(γ + μ)(1 − R0 ),
L = I [ λS − ( + μ)(γ + μ) ]
(5.8)
= ( + μ)(γ + μ) I [ R0 S − 1 ] ≤ 0 since S ≤ 1.
lim inf S(t) > 0 , lim inf E(t) > 0 , lim inf I(t) > 0 ,
t→∞ t→∞ t→∞
(5.9)
lim inf 1 − S(t) − E(t) − I(t) > 0 .
t→∞
L = ( + μ)(γ + μ) I ( R0 S − 1 ).
134 Special Topics
Here we see that, when R0 > 1, L > 0 for (S, E, I) in the interior
of Γ if S is sufficiently close to 1. As a result, solutions in the
interior of Γ starting sufficiently close to P0 leave a neighborhood
of P0 . This verifies the condition of Theorem 3.7.1 and system
(5.3) is uniformly persistent in Γ when R0 > 1.
Theorem 5.1.3 and Proposition 5.1.4 establish the basic repro-
duction number R0 as a sharp threshold parameter; if R0 ≤ 1 the
disease always dies out irrespective of initial conditions, and if
R0 > 1 the disease remains endemic in the population as long as
it is initially present.
μ = λI ∗ S ∗ + μS ∗ , λI ∗ S ∗ = ( + μ)E ∗ , E ∗ = (γ + μ)I ∗ .
(5.10)
These relations are obtained by setting the derivatives in system
•
(5.3) to 0. Substituting (5.10) into V , we obtain
• μS ∗ S E∗ I ∗
∗E I
V = μ − μS − + μS ∗ + λI ∗ S ∗ ∗ − ( + μ)E
S S E I∗ E I∗
( + μ)(γ + μ) ∗
+ ( + μ)E ∗ + I
∗ S S∗ ∗ ∗ S∗ S E∗ I E I∗
= μS 2 − ∗ − + λI S 3 − − ∗ −
S S S S E I ∗ E∗ I
≤ 0, for all (S, E, I) in the interior of Γ.
The last inequality follows from the inequality for the arithmetic
and geometric means, and the same inequality implies that we
•
must have S = S ∗ , E/E ∗ = I/I ∗ if V = 0. Letting S = S ∗ in the
first equation of system (5.3), we obtain I = I ∗ , and thus E = E ∗ .
•
This implies that V is negative definite with respect to P ∗ . This
proves the global stability of P ∗ when it exists.
136 Special Topics
f1 (x) = f2 (x),
2
μ2 ν1
(ν1 + βK)2 1 − > (ν1 − μ1 )2 + 4λ , (5.18)
ν2 K
which is derived from the condition f2 (x0 ) > f1 (x0 ), see
Figure 5.2 (d).
Define
4λβν22 − [(ν1 − μ1 )ν2 − (ν1 + Kβ)(ν2 − μ2 )]2
σ0 = (5.19)
4λβν2 (ν1 + Kβ)
and
ν2 (ν2 − μ2 )
σc = − . (5.20)
Kβ βx0
As parameter σ varies, the number of chronic equilibria changes
and the changes can be summarized in the following four cases:
(a) 1.2
f (b) 1.2 f
1 1
0.8 0.8 x* = x*
f1
0.6 0.6
0.4
f2 0.4
0.2 0.2
x0 x0
-0.5 0.5 1 1.5 2 2.5 3 3.5 x -0.5 0.5 1 1.5 2 2.5 3 3.5 x
-0.2 -0.2
y*
y*
0 σ0 σc σ
Proposition 5.2.3
(1) If σ0 < σ < σc , then P∗ is locally asymptotically stable
whereas P ∗ is a saddle.
(2) If σ > σc , then P∗ is locally asymptotically stable.
Note that f2 (x) − f1 (x) > 0 when x = x∗ and f2 (x) − f1 (x) < 0
when x = x∗ . We know that P∗ is locally asymptotically stable
whenever it exists, and P ∗ is a saddle whenever it exists. This
establishes Proposition 5.2.3.
The stability properties of equilibria are indicated in the bifur-
cation diagram in Figure 5.3, where solid lines indicate stable
equilibria, and dotted lines indicate unstable equilibria. Note that
R0 = R0 (σ) increases with σ and R0 (σc ) = 1. Thus σ0 < σ <
σc ⇐⇒ R0 (σ0 ) < R0 (σ) < 1, and σ > σc ⇐⇒ R0 (σ) > 1. We
see that R0 (σ) still behaves as a threshold parameter in that if
R0 (σ) < 1, the infection-free equilibrium P0 is stable, whereas if
R0 (σ) > 1, P0 becomes unstable and a unique chronic-infection
equilibrium P∗ is stable. However, the peculiarity of the back-
ward bifurcation as shown in Figure 5.3 is that a stable chronic-
infection equilibrium coexists with the stable infection-free
equilibrium P0 when R0 (σ) is in the parameter range R0 (σ0 ) <
R0 (σ) < 1, or equivalently when σ0 < σ < σc .
(2) When R0 (σ0 ) < R0 < 1, system (5.11) has two attractors
in Γ, the infection-free equilibrium P0 and the chronic-
◦
infection P∗ . Their basins of attraction in Γ are separated
by the stable manifolds of the saddle point P ∗ ;
(3) When R0 > 1, the unique chronic-infection equilibrium P∗
◦
is globally asymptotically stable in Γ.
◦
Proof. We first rule out periodic orbits in Γ using Dulac’s criteria
(Corollary 3.6.6 in Chapter 3). We choose a Dulac multiplier
α(x, y) = 1/xy. Let (P (x, y), Q(x, y)) denote the right-hand side
of (5.11). We have
∂(αP ) ∂(αQ) λ ν1 ν2
+ =− 2 + + < 0,
∂x ∂y x y Ky Kx
for all x > 0, y > 0. Thus (5.11) has no periodic orbits in Γ. By the
Poincaré–Bendixson Theorem (Theorem 3.6.2, Chapter 3), we
conclude that all solutions in Γ converge to a single equilibrium.
This establishes the claims in the theorem.
A phase portrait of (5.11) for case (2) of Theorem 5.2.4 is
numerically generated using Mathematica and shown in
Figure 5.4. Three equilibria are marked as dots, with P0 on the
x-axis and P∗ sitting between P ∗ and P0 . The heteroclinic orbits
from P∗ to P ∗ and P0 are clearly identifiable, as are the basin
boundaries, which are the stable manifolds of the saddle point
P∗ . In this case, R0 (σ) < 1, but the fate of an initial infection
critically depends on the initial conditions. If the initial point
lies in the basin of attraction of P0 , then the infection will clear,
whereas the infection will persist if the initial point lies in the
basin of attraction of P∗ . This behavior does not occur in virus-
host models that have only forward bifurcation.
5.2 In-host Models of Viral Dynamics 147
10
6 P*
P*
2
P0
x
2.5 5 7.5 10 12.5 15 17.5 20
are carried out using Mathematica, see Figure 5.5. The simula-
tions show that persistent infection will produce a proviral load
in the range of 10–20%, which is consistent with the clinical data.
(a) (b)
1000 800
x(t) 700
800 600
600 500
400
y(t)
400 300
200
200 x(t)
y(t) 100
t t
200 400 600 800 200 400 600 800
(c)
800
700
600
500
x(t)
400
300
200
y(t)
100
t
200 400 600 800
A E
Acquired immunity, 26 Endemic, 2
Age structure, 29 Epidemic, 1, 39
severity, 43
Epidemic curves, 41
B
Epidemic models
Basic reproduction number R0 ,
age structured, 29
32, 33, 43, 49, 52, 73, 129,
deterministic, 5, 6
142
in-host, 136
Bendixson’s criterion, 94
statistical, 5
Bifurcation, 50
stochastic, 6
backward, 139, 143, 149
time delayed, 18
transcritical, 56
vector–host transmission, 70
Bifurcation diagram, 55, 143
Equilibrium, 48, 53, 80
chronic-infection, 140
C disease-free, 49, 72
Contact number, 21 endemic, 49, 72
effective, 21 infection-free, 140
Critical community size, 11
F
D Final size equation, 43
Disease control First integrals, 40
quarantine, 31 Floquet Theory, 86
vaccination, 30
Disease incidence, 18
Disease outbreak, 1 I
Disease prevalence, 18 Immune period, 15
Dulac criteria, 57, 95, 146 mean, 15