Category Archives: Mathematics

Truth vs. Intellect

It was known long ago that \pi, the ratio of the circumference to the diameter of a circle, is a constant. Nearly all people of the ancient world used number 3 for \pi. As an approximation obtained though physical measurements with limited accuracy, it is sufficient for everyday needs.

An ancient Chinese text (周髀算经,100 BC) stated that for a circle with unit diameter, the ratio is 3.

In the Bible, we find the following description of a large vessel in the courtyard of King Solomon’s temple:

He made the Sea of cast metal, circular in shape, measuring ten cubits from rim to rim and five cubits high, It took a line of thirty cubits to measure around it. (1 Kings 7:23, New International Version)

This infers a value of \pi = \frac{30}{10} = 3.

It is fairly obvious that a regular polygon with many sides is approximately a circle. Its perimeter is approximately the circumference of the circle. The more sides the polygon has, the more accurate the approximation.

To find an accurate approximation for \pi, we inscribe regular polygons in a circle of diameter 1. Let L_{n}, L_{n+1} denotes the side’s length of regular polygon with 2^n and 2^{n+1} sides respectively, n=2, 4, ....

Fig. 1

From Fig. 1, we have

\begin{cases} L_{n+1}^2 = x^2 + (\frac{1}{2} L_n)^2\quad\quad\quad(1) \\ (\frac{1}{2})^2 = (\frac{1}{2}L_n)^2 + y^2\quad\quad\;\quad(2)\\ x+y = \frac{1}{2}\;\quad\quad\quad\quad\quad\quad(3) \end{cases}

It follows that

y\overset{(2)}{=}\sqrt{(\frac{1}{2})^2-(\frac{1}{2} L_n)^2} \overset{(3)}{ \implies} x=\frac{1}{2}-\sqrt{(\frac{1}{2})^2-(\frac{1}{2}L_n)^2}.\quad\quad\quad(4)

Substituting (4) into (1) yields

L_{n+1}^2 = \left(\frac{1}{2}-\sqrt{(\frac{1}{2})^2-(\frac{1}{2}L_n)^2}\right)^2+(\frac{1}{2}L_n)^2

That is,

L_{n+1}^2 = \frac{1}{4}\left(L_n^2 + \left(1-\sqrt{1-L_n^2}\right)^2\right).

Further simplification gives

L_{n+1}^2 = \frac{1}{2}\left(1-\sqrt{1-L_n^2}\right),\quad\quad\quad(5)

Starting with an inscribed square (L_2^2 =\frac{1}{2}), we compute L_{n+1}^2 from L_{n}^2 (see Fig. 2). The perimeter of the polygon with 2^{n+1} sides is 2^{n+1} \cdot L_{n+1}.

Fig. 2

Clearly,

\lim\limits_{n \rightarrow \infty} 2^n \cdot L_{n} = \pi.


Exercise-1 Explain, and then make the appropriate changes:

Hint: (5) is equivalent to L_{n+1}^2 = \frac{L_n^2}{2\left(1+\sqrt{1-L_{n}^2}\right)}.

We all bleed the same color

In “Mathematical Models in Biology”, Leah Edelstein-Keshet presents a model describing the number of circulating red blood cells (RBC’s). It assumes that the spleen filters out and destroys a fraction of the cells daily while the bone marrow produces a amount proportional to the number lost on the previous day:

\begin{cases} R_{n+1} = (1-f)R_n+M_n\\ M_{n+1} = \gamma f R_n\end{cases}(1)

where

R_n - number of RBC’s in circulation on day n,

M_n - number of RBC’s produced by marrow on day n,

f - fraction of RBC’s removed by the spleen,

\gamma - numer of RBC’s produced per number lost.

What would be the cell count on the n^{th} day?


Observe first that (1) is equivalent to

R_{n+2} = (1-f)R_{n+1}+M_{n+1}\quad\quad\quad(2)

where

M_{n+1} = \gamma f  R_n.\quad\quad\quad(3)

Let n = -1,

M_0=\gamma f R_{-1} \implies R_{-1} = \frac{M_0}{\gamma f}.\quad\quad\quad(4)

Substituting (3) into (2) yields

R_{n+2} = (1-f)R_{n+1}+\gamma f R_{n}.

We proceed to solve the following initial-value problem using ‘solve_rec‘ (see “Solving Difference Equations using Omega CAS Explorer“):

\begin{cases} R_{n+2}=(1-f)R_{n+1}+\gamma f R_{n}\\ R_{0}=1, R_{-1} = \frac{1}{\gamma f}\end{cases}

Evaluate the solution with f=\frac{1}{2}, g=1, we have

R_n = \frac{4}{3} + \frac{(-1)^{n+1}2^{-n}}{3}.\quad\quad\quad(5)

Plotting (5) by ‘plot2d(4/3 + (-1)^(n+1)*2^(-n)/3, [n, 0, 10], WEB_IMAGE)’ fails (see Fig. 1) since plot2d treats (5) as a continuous function whose domain includes number such as \frac{1}{2}.

Fig. 1

Instead, a discrete plot is needed:

Fig. 2

From Fig. 2 we see that R_{n} converges to a value between 1.3 and 1.35. In fact,

\lim\limits_{n \rightarrow \infty}  \frac{4}{3} + \frac{(-1)^{n+1}2^{-n}}{3} = \frac{4}{3}\approx 1.3333....

ONE

X had a Q&A session with Buddha.

X: What is 0.9\;?

Buddha: 0.9 is \frac{9}{10}\;.

X: What is 0.99\;?

Buddha: 0.99 is \frac{99}{100}\;.

X: What is 0.999\;?

Buddha: 0.999 is \frac{999}{1000}\;.

\ddots

X: What is 0.99999....\;?

Buddha: What are the dots ?

X: The dots are all 9‘s. It means \forall n \ge 1, the n^{th} digit after the decimal point is 9.

Buddha: 0.99999... is

\sum\limits_{i=1}^{\infty}\frac{9}{10^i}

X: What is \sum\limits_{i=1}^{\infty}\frac{9}{10^i}\;?

Buddha: It is

1

A Sophism in Calculus

Evaluating indefinite integral \int \frac{1}{x}\;dx using integration by parts gives

\int \frac{1}{x}\;dx =\int x'\cdot \frac{1}{x}\;dx=x\cdot\frac{1}{x}-\int x\cdot(\frac{1}{x})'\;dx=1-\int x\cdot\frac{-1}{x^2}\;dx=1+\int \frac{1}{x}\;dx.

That is,

\int \frac{1}{x}\;dx = 1 + \int \frac{1}{x}\;dx.

Substracting \int \frac{1}{x}\;dx from both sides we conclude

0=1.\quad\quad\quad(1)

The expression

\int f(x)\;dx = g(x)

means

\left(\int f(x)\; dx - g(x)\right)' = 0;

i.e.,

\int f(x)\;dx- g(x) = C

where C is a constant.

Therefore,

\int \frac{1}{x}\;dx = 1+ \int \frac{1}{x}\;dx \implies \int \frac{1}{x}\;dx - (1 + \int \frac{1}{x}\;dx) =C.

Or,

C = -1.

Moreover, define \leftrightarrow as

f(x) \leftrightarrow g(x), if f(x)-g(x)=C, \quad\quad\quad(2)

it can be shown that

f(x) \leftrightarrow h(x), h(x) \leftrightarrow g(x) \implies f(x) \leftrightarrow g(x) \quad\quad\quad(2-1)

and

f(x) \leftrightarrow g(x) \Longleftrightarrow f(x)+h(x) \leftrightarrow g(x) + h(x).\quad\quad\quad(2-2)

If we proceed to evaluate \int \frac{1}{x}\;dx as follows:

\int \frac{1}{x}\;dx \leftrightarrow \int x'\cdot \frac{1}{x}\;dx \leftrightarrow x\cdot\frac{1}{x}-\int x\cdot(\frac{1}{x})'\;dx \leftrightarrow 1-\int x\cdot\frac{-1}{x^2}\;dx \leftrightarrow 1+\int \frac{1}{x}\;dx,

we have (by (2-1))

\int \frac{1}{x}\;dx \leftrightarrow 1 + \int \frac{1}{x}\; dx.

Substracting \int \frac{1}{x}\;dx from both sides (by (2-2)) we conclude

0 \leftrightarrow 1.\quad\quad\quad(3)

Unlike (1), (3) is true:

0-1 = -1, a constant.

By the way,

\int \frac{1}{x}\;dx \leftrightarrow \log(x).

See “Introducing Lady L” for details.

Exercise-1 Can you spot the fallacies?

For x>0,

x^2 = x\cdot x = \underbrace{x+x+x...+x}_{x\;\; x's}.

Differentiating both sides, we have

2x=\underbrace{1+1+1+... + 1}_{x\;\;1's}=x.

Dividing both sides by x (since x>0) yields

2 = 1.

Solving Difference Equations using Omega CAS Explorer

Maxima’s ‘solve_rec‘ solves difference equation:

Fig. 1 Geometric Sequence

It solves initial-value problem as well:

Fig. 2 Fibonacci Sequence

Mathematica has ‘RSolve‘:

and ‘RSolveValue‘:

See also “Pandora’s Box“.

Fire & Water

Question:

When a forrest fire occurs, how many fire fighter should be sent to fight the fire so that the total cost is kept minimum?

Answer:

Suppose the fire starts at t=0; at t=t_1, the fire fighter arrives; the fire is extinguished later at t=t_2.

Let c_1, c_2, c_3 and x denotes the monetary damage per square footage burnt, the hourly wage per fire fighter, the one time cost per fire fighter and the number of fire fighters sent respectively. The total cost consists damage caused by the fire, the wage paid to the fire fighters and the one time cost of the fire fighters:

c(x) = c_1\cdot(total square footage burnt) +\;c_2\cdot (t_2-t_1)\cdot x + c_3\cdot x.

Notice t_2-t_1, the duration of fire fighting.

Assume the fire ignites at a single point and quickly spreads in all directions with flame velocity v_*, the growing square footage of engulfed circular area is a function of time. Namely,

b(t) = \pi r^2  = \pi (v_* t) ^2 = \pi v_*^2 t^2 \overset{k=\pi v_*^2}{=} k t^2.

Its burning rate

v_b(t) = b'(t) = 2 k t \overset{\alpha = 2 k}{=} \alpha t.\quad\quad\quad(1)

However, after the arrival of x fire fighters, \alpha is reduced by \beta x, an amount that is directly proportional to the number of fire fighters on the scene. The reduction of \alpha reflects the fire fighting efforts exerted by the crew. As a result, for t > t_1, v_b(t) declines along the line described by

v_b(t) = (\alpha-\beta x)t + d

where \alpha-\beta x <0. Or equivalently,

\beta x - \alpha >0.\quad\quad\quad(2)

Moreover, the fire is extinguished at t_2 suggests that

v_b(t_2) = 0 \implies (\alpha-\beta x) t_2 + d =0 \implies d = -(\alpha-\beta x)t_2.

i.e.,

\forall t_1< t \le t_2, v_b(t) = (\alpha-\beta x) t - (\alpha-\beta x) t_2=(\alpha-\beta x) (t-t_2).\quad\quad\quad(3)

Combine (1) and (3),

v_b(t) = \begin{cases} \alpha t, \quad\quad\quad\quad\quad\quad\quad\quad0\le t \le t_1\\ (\alpha-\beta x)(t-t_2),\quad\quad t_1< t \le t_2 \end {cases}.

It is further assumed that

v_b(t) is continuous at t=t_1.\quad\quad\quad(4)

We illustrate v_b(t) in Fig. 1.

Fig. 1

The fact that v_b(t) is continuous at t_1 means

\lim\limits_{t \to t_1^+}v_b(t)=(\alpha-\beta x)(t_1-t_2) = \lim\limits_{t \to t_1^-}v_b(t) = h \implies (\alpha-\beta x) (t_1-t_2)=h.

That is,

t_2-t_1=\frac{h}{\beta x - \alpha}.\quad\quad\quad(5)

The area of triangle in Fig. 1 represents b(t_2), the total square footage damaged by the fire. i.e.,

b(t_2) =\frac{1}{2}t_1 h + \frac{1}{2}(t_2-t_1)h\overset{(5)}{=}\frac{1}{2}t_1 h+ \frac{1}{2}\frac{h^2}{\beta x-\alpha}.\quad\quad\quad(6)

Consequently, the total cost

c(x)= c_1 b(t_2) + c_2 x (t_2-t_1)  + c_3 x \overset{(6), (5)}{=}\frac{c_1 t_1 h}{2} + \frac{c_1 h^2}{2(\beta x-\alpha)} + \frac{c_2 h x}{\beta x-\alpha} + c_3 x.

To minimize the total cost, we seek a value x where function c attains its minimum value c(x).

From expressing x as

x = \frac{1}{\beta}\beta x = \frac{1}{\beta}({\beta x-\alpha +\alpha} )= \frac{1}{\beta}(\beta x -\alpha) + \frac{\alpha}{\beta},

we obtain

\frac{c_2 h x}{\beta x-\alpha} = \frac{c_2 h}{\beta x-\alpha}(\frac{1}{\beta}(\beta x - \alpha) + \frac{\alpha}{\beta})=\frac{c_2 h}{\beta} + \frac{c_2 \alpha h}{\beta(\beta x-\alpha)},\quad\quad\quad(7)

c_3 x = \frac{c_3}{\beta}(\beta x-\alpha) + \frac{c_3 \alpha}{\beta}.\quad\quad\quad(8)

It follows that

c(x) = \underbrace{\frac{c_1 t_1 h}{2} + \frac{c_1 h^2}{2(\beta x-\alpha)}}_{c_1\cdot(6)} + \underbrace{\frac{c_2 h}{\beta}+\frac{c_2 \alpha h}{\beta(\beta x - \alpha)}}_{(7)} + \underbrace{\frac{c_3}{\beta}(\beta x-\alpha) + \frac{c_3 \alpha}{\beta}}_{(8)}

=\frac{c_1 t_1 h}{2} + \frac{c_2 h}{\beta} + \frac{c_3 \alpha}{\beta} + \underline{\frac{c_1 \beta  h^2+2 c_2 \alpha h}{2\beta(\beta x - \alpha)} + \frac{c_3(\beta x-\alpha)}{\beta}}.

Hence, to minimize c(x) is to find the x that minimizes \frac{c_1\beta h^2+2 c_2\alpha h }{2\beta(\beta x - \alpha)} + \frac{c_3(\beta x - \alpha)}{\beta}.

Since \frac{c_1\beta h^2+2 c_2\alpha h }{2\beta(\beta x - \alpha)} \cdot \frac{c_3(\beta x - \alpha)}{\beta}=\frac{(c_1 \beta h^2+2 c_2 \alpha h)c_3}{2\beta^2} , a constant, by the following theorem:

For positive quantities a_1, a_2, ..., a_n, c_1, c_2, ..., c_n and positive rational quantities p_1, p_2, ..., p_n, if a_1^{p_1}a_2^{p_2}...a_k^{p_k} is a constant, then c_1a_1+c_2a_2+...+c_na_n attains its minimum if \frac{c_1a_1}{p_1} = \frac{c_2a_2}{p_2} = ... = \frac{c_na_n}{p_n}.

(see “Solving Kepler’s Wine Barrel Problem without Calculus“), we solve equation

\frac{c_1\beta h^2+2 c_2\alpha h }{2\beta(\beta x - \alpha)} = \frac{c_3(\beta x - \alpha)}{\beta}

for x:

Fig. 2

From Fig. 2, we see that x =\frac{\alpha}{\beta} - \frac{\sqrt{\beta c_1 c_3 h^2+2\alpha c_2 c_3 h}}{\sqrt{2}\beta c_3} \implies \beta x - \alpha < 0, contradicts (2).

However, when x =\frac{\sqrt{\beta c_1 c_3 h^2+2\alpha c_2 c_3 h}}{\sqrt{2}\beta c_3} + \frac{\alpha}{\beta}=\sqrt{\frac{\beta c_1 h^2 + 2 \alpha c_2 h}{2\beta^2 c_3}} + \frac{\alpha}{\beta}, \beta x-\alpha is a positive quantity. Therefore, it is

x \overset{h=\alpha t_1}{=} \alpha \sqrt{\frac{\beta c_1 t_1^2 + 2 c_2 t_1}{2\beta^2 c_3}} + \frac{\alpha}{\beta}

that minimizes the total cost.

That first sip of coffee in the morning

It is a good idea to enjoy a cup of coffee before starting a busy day.

Suppose the coffee fresh out of the pot with temperature \alpha^{\circ} C is too hot, we can immediately add cream to reduce the temperature by \delta^{\circ} C instantly, then wait for the coffee to cool down naturally to \omega^{\circ} C before sipping it comfortably. We can also wait until the temperature of the coffee drops to (\omega+\delta)^{\circ} C first, then add the cream to further reduce it instantly to \omega^{\circ} C.

Typically, \alpha = 90, \omega = 75, and \delta = 5.

If we are in a hurry and want to wait the shortest possible time, should the cream be added right after the coffee is made, or should we wait for a while before adding the cream?


The heat flow from the hot water to the surrounding air obeys Newton’s cooling and heating law, described by the following ordinary differential equation:

\frac{d}{dt}\theta(t) = k (E-\theta(t))

where \theta(t), a function of time t, is the temperature of the water, E is the temperature of its surroundings, and k>0 is a constant depends on the heat transfer mechanism, the contact are with the surroundings, and the thermal properties of the water.

Fig. 1 a place where Newton’s law breaks down

Under normal circumstances, we have

E \ll \omega < \omega+\delta < \alpha-\delta < \alpha\quad\quad\quad(1)

Based on Newton’s law, the mathematical model of coffee cooling is:

\begin{cases} \frac{d}{dt}\theta(t) = k (E-\theta(t)) \\ \theta(0)= \theta_0\end{cases}\quad\quad\quad(2)

Fig. 2

Solving (2), an initial-value problem (see Fig. 2) gives

\theta(t) = E + e^{-kt}(\theta_0 - E).

Therefore,

t = \frac{\log\left(\frac{E-\theta_0}{E-\theta(t)}\right)}{k}=\frac{\log\left(\frac{\theta_0-E}{\theta(t)-E}\right)}{k}.\quad\quad\quad(3)

If cream is added immediately (see Fig. 3),

Fig. 3 : cream first

by (3),

t_1=\frac{\log\left(\frac{(\alpha-\delta)-E}{\omega-E}\right)}{k}.

Otherwise (see Fig. 4),

Fig. 4: cream last

t_2=\frac{\log\left(\frac{\alpha-E}{(\omega+\delta)-E}\right)}{k}.

And so,

t_1-t_2 = \frac{\log\left(\frac{(\alpha-\delta)-E}{\omega-E}\right)}{k}- \frac{\log\left(\frac{\alpha-E}{(\omega+\delta)-E}\right)}{k}=\frac{1}{k}\left(\log\left(\frac{(\alpha-\delta)-E}{\omega-E}\right)-\log\left(\frac{\alpha-E}{(\omega+\delta)-E}\right)\right)\quad(4)

Fig. 5

Since

\frac{(\alpha-\delta)-E}{\omega-E}- \frac{\alpha-E}{(\omega+\delta)-E}=\frac{(\alpha-\delta-E)(\omega+\delta-E)-(\omega-E)(\alpha-E)}{(\omega-E)(\omega+\delta-E)}=\frac{-\delta(\omega+\delta-\alpha)}{(\omega-E)(\omega+\delta-E)}\overset{(1)}{>0}

implies

\log\left(\frac{(\alpha-\delta)-E}{\omega-E}\right)-\log\left(\frac{\alpha-E}{(\omega+\delta)-E}\right)>0,\quad\quad\quad(5)

from (4) , we see that

t_1-t_2 > 0;

i.e.,

t_1 > t_2

Hence,

If we are in a hurry and want to wait the shortest possible time, we should wait for a while before adding the cream!


Exercise-1 Solve (2) without using a CAS.

Exercise-2 Show that \frac{\alpha-\delta-E}{\omega-E}\cdot\frac{\omega+\delta-E}{\alpha-E} >1.