In this appendix to my previous post “From Dancing Planet to Kepler’s Laws“, we derive the polar form for an ellipse that has a rectangular coordinate system’s origin as one of its foci.

Fig. 1

We start with the ellipse shown in Fig. 1. Namely,

Clearly,

After shifting the origin to the right by , the ellipse has the new origin as one of its foci (Fig. 2).

Fig. 2

Since , the ellipse in is

Substituting in (2) by

yields equation

Replacing by respectively, the equation becomes

Fig. 3

Solving (3) for (see Fig. 3) gives

or .

The first solution

.

Let

,

we have

.

The second solution is not valid since it suggests that :

“This most beautiful system of the sun, planets, and comets, could only proceed from the counsel and dominion of an intelligent powerful Being” – Sir. Issac Newton

When I was seven years old, I had the notion that all planets dance around the sun along a wavy orbit (see Fig. 1).

Fig. 1

Many years later, I took on a challenge to show mathematically the orbit of my ‘dancing planet’ . This post is a long overdue report of my journey.

Shown in Fig. 2 is the sun and a planet in a x-y-z coordinate system. The sun is at the origin. The moving planet’s position is being described by .

Fig. 2

According to Newton’s theory, the gravitational force sun exerts on the planet is

where is the gravitational constant, the mass of the sun and planet respectively. .

By Newton’s second law of motion,

(0-3) (0-2) yields

.

Since

,

it must be true that

.

i.e.

where is a constant.

Similarly,

where are constants.

Consequently,

,

,

.

Hence

If then by the following well known theorem in Analytic Geometry:

“If A, B, C and D are constants and A, B, and C are not all zero, then the graph of the equation Ax+By+Cz+D=0 is a plane“,

(0-7) represents a plane in the x-y-z coordinate system.

For , we have

.

It means

where is a constant. Simply put,

.

Hence, (0-7) still represents a plane in the x-y-z coordinate system (see Fig. 3(a)).

Fig. 3

The implication is that the planet moves around the sun on a plane (see Fig. 4).

Fig. 4

By rotating the axes so that the orbit of the planet is on the x-y plane where (see Fig. 3), we simplify the equations (0-1)-(0-3) to

It follows that

.

i.e.,

.

Integrate with respect to ,

where is a constant.

We can also re-write (0-6) as

where is a constant.

Using polar coordinates

Fig. 5

we obtain from (1-2) and (1-3) (see Fig. 5):

If the speed of planet at time is then from Fig. 6,

Fig. 6

gives

Suppose at , the planet is at the greatest distance from the sun with and speed . Then the fact that attains maximum at implies . Therefore, by (1-4) and (1-5),

i.e.,

We can now express (1-4) and (1-5) as:

Let

then

By chain rule,

.

Thus,

.

That is,

Since

,

we let

.

Notice that .

By doing so, (1-14) can be expressed as

.

Take the first case,

.

Integrate it with respect to gives

where is a constant.

When ,

or .

And so,

or .

For ,

.

By (1-11), it is

Fig. 7

Solving (1-15) for yields

.

i.e.,

Studies in Analytic Geometry show that for an orbit expressed by (1-16), there are four cases to consider depend on the value of :

We can rule out parabolic and hyperbolic orbit immediately for they are not periodic. Given the fact that a circle is a special case of an ellipse, it is fair to say:

The orbit of a planet is an ellipse with the Sun at one of the two foci.

In fact, this is what Kepler stated as his first law of planetary motion.

Fig. 8

For ,

from which we obtain

This is an ellipse. Namely, the result of rotating (1-16) by hundred eighty degrees or assuming attains its minimum at .

The second case

can be written as

.

Integrate it with respect to yields

from which we can obtain (1-16) and (1-17) again.

Fig. 9

Over the time duration , the area a line joining the sun and a planet sweeps an area (see Fig. 9).

.

It means

or that

is a constant. Therefore,

A line joining the Sun and a planet sweeps out equal areas during equal intervals of time.

This is Kepler’s second law. It suggests that the speed of the planet increases as it nears the sun and decreases as it recedes from the sun (see Fig. 10).

Fig. 10

Furthermore, over the interval , the period of the planet’s revolution around the sun, the line joining the sun and the planet sweeps the enire interior of the planet’s elliptical orbit with semi-major axis and semi-minor axis . Since the area enlosed by such orbit is (see “Evaluate a Definite Integral without FTC“), setting in (2-1) to gives

Research on rocket flight performance has shown that typical single-stage rockets cannot serve as the carrier vehicle for launching satellite into orbit. Instead, multi-stage rockets are used in practice with two-stage rockets being the most common. The jettisoning of stages allows decreasing the mass of the remaining rocket in order for it to accelerate rapidly till reaching its desired velocity and height.

Optimizing flight performance is a non-trivial problem in the field of rocketry. This post examines a two-stage rocket flight performance through rigorous mathematical analysis. A Computer Algebra System (CAS) is employed to carry out the symbolic computations in the process. CAS has been proven to be an efficient tool in carry out laborious mathematical calculations for decades. This post reports on the process and the results of using Omega CAS explorer, a Maxima based CAS to solve this complex problem.

A two-stage rocket consists of a payload propelled by two stages of masses (first stage) and (second stage), both with structure factor . The exhaust speed of the first stage is , and of second stage . The initial total mass, is fixed. The ratio is small.

Based on Tsiolkovsky’s equation, we derived the multi-stage rocket flight equation . For a two-stage rocket, the final velocity can be calculated from the following:

Let , so that (1) becomes

where .

We seek an appropriate value of that maximizes .

Consider as a function of , its derivative is computed (see Fig. 1)

Fig. 1

We have .

That is, .

Fig. 2

As shown in Fig. 2, can be expressed as

Notice that .

Solving for gives two solutions (see Fig. 3)

Fig. 3

We rewrite the expression under the square root in and as a quadratic function of : and compute (see Fig. 4)

Fig. 4

If , . It implies that is positive since . When , where is still positive since as a result of , the zero point of function is .

The expression under the square root is positive means both and are real-valued and (see Fig. 5), i.e., .

Fig. 5

From (3) where , we deduce the following:

For all , if then

For all , if then

For all , if then

Fig. 6

Moreover, from Fig. 6,

.

Since the expression in the numerator of , namely

,

It follows that

The implication is that has at least one zero point between and .

However, if both and , the two known zero points of are between and , by () and (), must be positive, which contradicts (4). Therefore, must have only one zero point between and .

We will proceed to show that the only zero lies between and is .

There are two cases to consider.

Case 1 () since and . But this contradicts (). Therefore, must not be positive.

Case 2 () The denominator of is negative since . However, , the terms not under the square root in the numerator of can be expressed as . This is a positive expression since implies that . Therefore, .

The fact that only lies between and , together with () and () proves that is where the global maximum of occurs.

can be simplified to a Taylor series expansion (see Fig. 7)

Fig. 7

The result produced by CAS can be written as . However, it is incorrect as would suggest that is a negative quantity when is small.

To obtain a correct Taylor series expansion for , we rewrite as first where

Its first order Taylor series is then computed (see Fig. 8)

Fig. 8

The first term of the result can be written as . Bring the value of into the result, we have:

To compute from (6) , we substitute for in (2) and compute its Taylor series expansion about (see Fig. 9 )

Fig. 9

Writing its first term as and substituting the value yields:

It is positive when is small.

We have shown the time-saving, error-reduction advantages of using CAS to aid manipulation of complex mathematical expressions. On the other hand, we also caution that just as is the cases with any software system, CAS may contain software bugs that need to be detected and weeded out with a well- trained mathematical mind.

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