This post is an introduction to deterministic models of infectious diseases and their Computer Algebra-Aided mathematical analysis.

We assume the followings for the simplistic SI model:

(A1-1) The population under consideration remains a constant.

(A1-2) The population is divided into two categories: the infectious and the susceptible. Their percentages are denoted by and respectively. At .

(A1-3) The infectious’ unit time encounters with other individuals is . Upon an encounter with the infectious, the susceptible becomes infected.

When a infectious host have encounters with the population, susceptible become infected. There are infectious in total at time . It means that within any time interval , the infectious will increase by . i.e.,

.

Cancelling out the ‘s,

and so

.

That is,

.

Deduce further from (A1-2) () is that

Let’s examine (1-1) qualitatively first.

We see that the SI model has two critical points:

.

So

.

This indicates that in the presence of any initial infectious hosts, the entire population will be infected in time. The rate of infection is at its peak when .

The qualitative results can be verified quantitatively by Omega CAS Explorer.

Fig. 1-1

From Fig. 1-1, we see that

.

Therefore,

.

Fig. 1-2 confirms that the higher the number of initial infectious hosts(), the sooner the entire population becomes infected ()

Fig. 1-2

The SI model does not take into consideration any medical practice in combating the spread of infectious disease. It is pessimistic and unrealistic.

An improved model is the SIR model. The assumptions are

(A2-1) See (A1-1)

(A2-2) See (A1-2)

(A2-3) See (A1-3)

and,

(A2-4) Number of individuals recovered from the disease in unit time is . The recovered are without immunity. They can be infected again.

By (A2-1) – (A2-4), the modified model is

or,

Let

,

we have

The new model has two critical points:

.

And,

i.e.,

Without solving (2-1), we extract from it the following qualitative behavior:

Case-1

[2-1-1]

[2-1-2] .

[2-1-3] .

[2-1-4] .

[2-1-5] .

[2-1-6] .

Case-2

[2-2-1] .

[2-2-2] .

[2-2-3] .

Case-3

[2-3-1] .

[2-3-2] .

[2-3-3] .

The cases are illustrated by solving (2-1) analytically using Omega CAS Explorer (see Fig. 2-1,2-2,2-3)

Fig. 2-1 approaches asymptotically.

Fig. 2-2 approaches asymptotically.

Fig. 2-3 approaches asymptotically.

Fig. 2-4 ‘s monotonicity depends on .

Fig. 2-4 shows that for , if , then increases on a convex curve. Otherwise, increases on a concave curve first. The curve turns convex after reaches . However, monotonically decreases along a concave curve.

Fig. 2-5 monotonically decrease.

Fig 2-5 illustrates the case .

We also have:

Fig. 2-6 monotonically decrease.

From these results we may draw the following conclusion:

If , the monotonicity of depends on the level of . Otherwise (), will decrease and approach to since the rate of recovery from medical treatment is at least on par with the rate of infection

This model is only valid for modeling infectious disease with no immunity such as common cold, dysentery. Those who recovered from such disease become the susceptible and can be infected again.

However, for many disease such as smallpox, measles, the recovered is immunized and therefore, falls in a category that is neither infectious nor susceptible. To model this type of disease, a new mathematical model is needed.

Enter the Kermack-McKendrick model of infectious disease with immunity.

There are three assumptions:

(A3-1) The total population does not change.

(A3-2) Let and denote the percentage of the infectious, susceptible and recovered respectively. At . The recovered are the individuals who have been infected and then recovered from the disease. They will not be infected again or transmit the infection to others.

(A3-3) is the unit time number of encounters with the infectious, the unit time recoveries from the disease.

For the recovered, we have

.

Hence,

This system of differential equations appears to defy any attempts to obtain an analytic solution (i.e., no solution can be expressed in terms of known function).

Numerical treatments for two sets of given and are depicted in Fig. 3-1 and Fig. 3-2.

Fig. 3-1

Fig. 3-2

However, it is only the rigorous analysis in general terms gives the correct interpretations and insights into the model.

To this end, we let

.

For ,

or,

It has the following qualitatives:

[3-1] increases.

[3-2] reaches its maximum.

[3-3] decreases.

The analytical solution to

(see Fig. 3-3) is

Fig. 3-3

Notice that

is a critical point of (3-1-1) and (3-1-2).

or,

all points on the s-axis of the s-i phase plane are critical points of (3-1-1) and (3-1-2).

By a theorem of qualitative theory of ordinary differential equations (see Fred Brauer and John Nohel: The Qualitative Theory of Ordinary Differential Equations, p. 192, Lemma 5.2),

Moreover, let

i.e.,

Since , together, (3-5) and implies

or,

Clearly, is a critical point of (3-1-1) and (3-1-2). Lemma 5.2 thus ensures

It follows that

To the list ([3-1]-[3-3]) , we now add:

[3-4]

[3-5]

[3-6]

And so, for all ,

if then

Since

we have

Fig. 3-4

If then,

Fig. 3-5

If then

Fig. 3-6

In fact, for all finite ,

.

Thus, the orbits of (3-1-1) and (3-1-2) have the form illustrated in Fig. 3-7.

Fig. 3-7

For example,

Fig. 3-8

What we see is that as time advances, moves along the curve (3-3) in the direction of decreasing Consequently, if is less than , then decreases monotonically to , and decreases to . Therefore, if a small group of infectious is introduced into the population with the susceptibles , with , the disease will die out rapidly. On the other hand, if is greater than , then increases as decreases to . Only after attaining its maximum at starts to decrease when the number of susceptibles falls below the threshold value

We therefore conclude:

An epidemic will occur only if the number of susceptibles in a population exceeds the threshold value .

It means a larger is preferred.

To increase , the recovery rate is boosted through adequate medical care and treatment. Meanwhile, is reduced by quarantine and social distancing.

In addition to increase , we can also decrease through immunizing the population.

If the number of susceptibles is initially greater than, but close to the threshold value :

,

and is very small compared to :

,

we can estimate the number of individuals who ultimately contracted the disease.

From (3-1-4), we have

and yields

(3-11)-(3-12),

or,

Given (3-9), we deduce from it that

i.e.,

(3-1-2) / (3-1-3) gives

Solving

yields

After substituting (3-15) in (3-1-3),

In view of the fact that

,

we approximate the term in (3-16) with a Taylor expression up to the second order (see Fig. 3-9)

Fig. 3-9

The result is an approximation of equation (3-16):

i.e.,

It can be solved analytically (see Fig. 3-10).

Fig. 3-10

As a result,

It follows from

that (3-18) yields

Namely, the size of the epidemic is roughly . Consequently, by (3-13),

.

The above analysis leads to the following threshold theorem of epidemiology:

(a) An epidemic occurs if and only if exceeds the threshold .

(b) If and , then after the epidemic, the number of susceptible individuals is reduced by an amount approximately , namely, .

We can also obtain (b) without solving for :

From (3-3), as ,

When is small compared to (see (3-17)), we approximate with a truncated Taylor series after two terms. Namely,

Then,

Solving for yields

Exercise-1 For the Kermack-McKendrick model, show that ,

In a letter dated July 7, 1948, Richard Feynman, a Nobel laureate in physics (1965) made a claim:

I am the possessor of a swanky new scheme to do each problem in terms of one with one less energy denominator. It is based on the great identity .

(The Beat of a Different Drum: The Life and Science of Richard Feynman, by Jagdish Mehra, page 262)

Assuming non-zero constants are both real but otherwise arbitrary, let’s check the validity of Feynman’s “great identity”.

If ,

.

Using Leibniz’s rule,

.

When ,

and,

.

All is as Feynman claimed:

There is something amiss:

If and have opposite signs i.e., then the right hand side of () is negative. But the integrand is squared so the integral on the left hand side of () is never negative, no matter what and may be.

Let’s figure it out !

In its full glory, Leibniz’s rule we used to obtain is

If the real-valued function on an open interval in has the continuous derivative and then .

Essentially, the rule requires the integrand to be a continuous function on an open interval that contains and .

Solving for yields

,

the singularity of integrand in .

For , we consider the following two cases:

Case (1-1) ,

Case (1-2) ,

From both cases, we see that

when has a singularity in is not continuous in .

Applying Leibniz’s rule to regardless of integrand’s singularity thus ensured an outcome of absurdity.

However, paints a different picture.

We have

Case (2-0) no singularity

Case (2-1)

Case (2-2)

Case (2-3)

Case (2-4)

All cases show that when , the integrand has no singularity in .

It means that is continuous in and therefore, Leibniz’s rule applies.

We will introduce an algorithm for obtaining indefinite integrals such as

or, in general, integral of the form

where is any rational function , with .

Let

Solving (2) for , we have

which provides

and,

yields

Similarly,

gives

We also have (see “Finding Indefinite Integrals” )

.

Hence

,

and (1) is reduced to an integral of rational functions in .

Example-1 Evaluate .

Solution:

.

Example-2 Evaluate .

Solution:

.

According to CAS (see Fig. 1),

Fig. 1

However, the two results are equivalent as a CAS-aided verification (see Fig. 2) confirms their difference is a constant (see Corollary 2 in “Sprint to FTC“).

Fig. 2

Exercise-1 According to CAS,

Show that it is equivalent to the result obtained in Example-1