# Chaitanya's Random Pages

## April 29, 2014

### Historical world population distribution

Filed under: geography — ckrao @ 2:31 pm

The following plots show the percentage distribution of the world’s population over a 2400 year period. To my surprise China had over a third of the world population during much of the 1800s, while the Indian subcontinent has historically had a higher share than now. It’s interesting to see the growth of the New World in the bottom right plot too. One expects Asia minus China and Africa to have significant proportional growth at least in the first half of this century.

#### Reference

http://www.worldhistorysite.com/population.html – using Colin McEvedy and Richard Jones, Atlas of World Population History (Penguin, 1978)

## April 25, 2014

### Three and four tangent circles

Filed under: mathematics — ckrao @ 12:14 pm

If we are given two tangent circles how do we find a third circle tangent to both of them? If the two circles are internally tangent, the third circle is also internally tangent to the larger circle.

If the two circles are externally tangent, the third circle is either internally or externally tangent to both.

Note that we disregard cases where the third circle has the same point of tangency as the other two such as shown below.

Locus of centre of third circle

If we let the centres of the three circles $C_1, C_2, C_3$ be $O_1, O_2, O_3$ and with respective radii $R_1, R_2, R_3$ (assume $R_1 > R_2$) then what is the locus of $O_3$ as $O_1, R_1, O_2, R_2$ are fixed while $R_3$ is allowed to vary?

We note in the internally tangent case,

$O_2 O_3 + O_3 O_1 = (R_2 + R_3) + (R_1 - R_3) = R_1 + R_2.\quad\quad (1)$

Since this distance is independent of $R_3$, $O_3$ is on an ellipse with foci at $O_1$ and $O_2$ shown in green below.

In the externally tangent case, there are two subcases depending on whether the third circle is internally or externally tangent to the other two:

$O_3 O_2 - O_3 O_1 = (R_3 - R_2) - (R_3 - R_1) = R_1 - R_2.\quad\quad (2)$

$O_3 O_1 - O_3 O_2 = (R_3 + R_1) - (R_3 + R_2) = R_1 - R_2.\quad\quad (3)$

This corresponds to the two branches of a hyperbola with foci at $O_1$ and $O_2$ shown in green below.

Notice that similar results hold when the original two circles are not necessarily tangent to each other.

Distances

Denoting the points of tangency between $C_2, C_3$ by $T_1$ and similarly defining $T_2, T_3$, we shall find some distances in the figure below.

By the cosine rule in $\triangle O_1O_2O_3$,

\begin{aligned} \cos \angle O_1 O_2 O_3 &= \frac{O_1 O_2^2 + O_2O_3^2 - O_1O_3^2}{2O_1 O_2. O_2O_3}\\ &= \frac{(R_1 - R_2)^2 + (R_2 + R_3)^2- (R_1 - R_3)^2 }{2(R_1 - R_2)(R_2 + R_3)}\\ &=\frac{2R_2^2 - 2R_1 R_2 + 2R_2 R_3 + 2R_1 R_3}{2(R_1 - R_2)(R_2 + R_3)}\\ &= \frac{-(R_1 - R_2)(R_2+R_3) + 2R_1R_3}{(R_1 - R_2)(R_2 + R_3)}\\ &= -1 + \frac{2R_1R_3}{(R_1 - R_2)(R_2 + R_3)}.\quad\quad (4) \end{aligned}

The perimeter of $\triangle O_1O_2O_3$ is $(R_1 - R_2) + (R_1 - R_3) + (R_2 + R_3) = 2R_1$, so by Heron’s formula its area is

$\displaystyle \sqrt{R_1(R_1 - (R_1 - R_2)) (R_1 - (R_1 - R_3)) (R_1 - (R_2 + R_3))} = \sqrt{R_1R_2 R_3(R_1 - R_2 - R_3)}.\quad\quad (5)$

If the points $T_3, O_1, O_2$ have coordinates $(0,0), (R_1,0), (R_2,0)$ respectively, then $O_3$ has coordinates $(R_2 + (R_2 + R_3)\cos \angle O_1 O_2 O_3, (R_2 + R_3)\sin \angle O_1 O_2 O_3)$. We have $\cos \angle O_1 O_2 O_3$ found above and $\sin \angle O_1 O_2 O_3$ can be found via

$\displaystyle \frac{1}{2}O_1O_2.O_2O_3 \sin \angle O_1 O_2 O_3 = |O_1O_2O_3| = \sqrt{R_1R_2 R_3(R_1 - R_2 - R_3)}.\quad\quad (6)$

Hence the coordinates of $O_3$ are

\begin{aligned} & (R_2 + (R_2 + R_3)\cos \angle O_1 O_2 O_3, (R_2 + R_3)\sin \angle O_1 O_2 O_3)\\ &= \left(R_2 + (R_2 + R_3)\left(-1 + \frac{2R_1R_3}{(R_1 - R_2)(R_2 + R_3)}\right), (R_2 + R_3)2\frac{\sqrt{R_1R_2 R_3(R_1 - R_2 - R_3)}}{O_1 O_2.O_2O_3}\right)\\ &= \left(R_2 - R_2 - R_3+ \frac{2R_1R_3}{(R_1 - R_2)}, (R_2 + R_3)2\frac{\sqrt{R_1R_2 R_3(R_1 - R_2 - R_3)}}{(R_1-R_2)(R_2+R_3)}\right)\\ &= \left(\frac{R_3(R_1 + R_2)}{R_1 - R_2}, \frac{2\sqrt{R_1R_2 R_3(R_1 - R_2 - R_3)}}{R_1-R_2}\right).\quad\quad (7) \end{aligned}

Note here that the first coordinate varies with $R_3$ linearly for $R_1, R_2$ fixed. The distance $T_3O_3$ is found from

\begin{aligned} T_3O_3^2 &= \frac{1}{(R_1 - R_2)^2}\left([R_3(R_1 + R_2)]^2 + 4R_1R_2R_3(R_1 - R_2 - R_3)\right)\\ &= \frac{1}{(R_1 - R_2)^2}\left(R_3^2 ((R_1 + R_2)^2 - 4R_1 R_2) + 4R_1 R_2 R_3(R_1 - R_2)\right)\\ &= \frac{1}{(R_1 - R_2)^2}\left(R_3^2 (R_1 - R_2)^2 + 4R_1 R_2 R_3(R_1 - R_2)\right)\\ &= R_3^2 + \frac{4R_1 R_2 R_3}{R_1 - R_2}.\quad\quad (8) \end{aligned}

Hence we have found that interestingly the power of the tangency point $T_3$ with respect to circle $C_3$ is the relatively simple form $\frac{4R_1R_2R_3}{R_1 - R_2}$.

We may also find the distance between points of tangency $T_1T_3$ as $2R_2 \cos (\angle O_1 O_2 O_3/2)$ using the identity $\cos^2 (A/2) = (1 + \cos A)/2$. From (4),

\begin{aligned} T_1 T_3 &= 2R_2 \cos (\angle O_1 O_2 O_3/2)\\ &= 2R_2 \sqrt{\frac{R_1R_3}{(R_1 - R_2)(R_2 + R_3)}}\\ &= \frac{2\sqrt{R_1R_2R_3} \sqrt{R_2}}{\sqrt{(R_1 - R_2)(R_2 + R_3)}}.\quad\quad(9) \end{aligned}

Next we perform the same calculations (4)-(9) with the configuration of three circles tangent externally.

By the cosine rule in $\triangle O_1O_2O_3$,

\begin{aligned} \cos \angle O_1 O_2 O_3 &= \frac{O_1 O_2^2 + O_2O_3^2 - O_1O_3^2}{2O_1 O_2. O_2O_3}\\ &= \frac{(R_1 + R_2)^2 + (R_2 + R_3)^2- (R_1 + R_3)^2 }{2(R_1 + R_2)(R_2 + R_3)}\\ &=\frac{2R_2^2 + 2R_1 R_2 + 2R_2 R_3 - 2R_1 R_3}{2(R_1 + R_2)(R_2 + R_3)}\\ &= \frac{(R_1 + R_2)(R_2+R_3) - 2R_1R_3}{(R_1 + R_2)(R_2 + R_3)}\\ &= 1 - \frac{2R_1R_3}{(R_1 + R_2)(R_2 + R_3)}. \quad\quad (10) \end{aligned}

The perimeter of $\triangle O_1O_2O_3$ is $(R_1 + R_2) + (R_1 + R_3) + (R_2 + R_3) = 2(R_1+R_2+R_3)$, so by Heron’s formula its area is the attractive form

$\displaystyle \sqrt{R_1R_2 R_3(R_1 + R_2 + R_3)}.\quad\quad (11)$

If the points $T_3, O_1, O_2$ have coordinates $(0,0), (-R_1,0), (R_2,0)$ respectively, then $O_3$ has coordinates $(R_2 - (R_2 + R_3)\cos \angle O_1 O_2 O_3, (R_2 + R_3)\sin \angle O_1 O_2 O_3)$. We have $\cos \angle O_1 O_2 O_3$ found above and $\sin \angle O_1 O_2 O_3$ can be found via

$\displaystyle \frac{1}{2}O_1O_2.O_2O_3 \sin \angle O_1 O_2 O_3 = |O_1O_2O_3| = \sqrt{R_1R_2 R_3(R_1 + R_2 + R_3)}.\quad\quad (12)$

Hence the coordinates of $O_3$ are

\begin{aligned} & (R_2 - (R_2 + R_3)\cos \angle O_1 O_2 O_3, (R_2 + R_3)\sin \angle O_1 O_2 O_3)\\ &= \left(R_2 - (R_2 + R_3)\left(1 - \frac{2R_1R_3}{(R_1 + R_2)(R_2 + R_3)}\right), (R_2 + R_3)2\frac{\sqrt{R_1R_2 R_3(R_1 + R_2 + R_3)}}{O_1 O_2.O_2O_3}\right)\\ &= \left(R_2 - R_2 - R_3+ \frac{2R_1R_3}{(R_1 + R_2)}, (R_2 + R_3)2\frac{\sqrt{R_1R_2 R_3(R_1 +R_2 + R_3)}}{(R_1+R_2)(R_2+R_3)}\right)\\ &= \left(\frac{R_3(R_1 - R_2)}{R_1 + R_2}, \frac{2\sqrt{R_1R_2 R_3(R_1 + R_2 + R_3)}}{R_1+R_2}\right).\quad\quad (13) \end{aligned}

Note again that the first coordinate varies with $R_3$ linearly for $R_1, R_2$ fixed. Formulas (7) and (13) were used to generate the diagrams in this post.

The distance $T_3O_3$ is found from

\begin{aligned} T_3O_3^2 &= \frac{1}{(R_1 + R_2)^2}\left([R_3(R_1 - R_2)]^2 + 4R_1R_2R_3(R_1 + R_2 + R_3)\right)\\ &= \frac{1}{(R_1 + R_2)^2}\left(R_3^2 ((R_1 - R_2)^2 + 4R_1 R_2) + 4R_1 R_2 R_3(R_1 + R_2)\right)\\ &= \frac{1}{(R_1 + R_2)^2}\left(R_3^2 (R_1 + R_2)^2 + 4R_1 R_2 R_3(R_1 + R_2)\right)\\ &= R_3^2 + \frac{4R_1 R_2 R_3}{R_1 + R_2}.\quad\quad (14) \end{aligned}

Hence we have found that the power of the tangency point $T_3$ with respect to circle $C_3$ is $\frac{4R_1R_2R_3}{R_1 + R_2}$.

The distance between points of tangency $T_1T_3$ is $2R_2 \sin (\angle O_1 O_2 O_3/2)$ and using the identity $\sin^2 (A/2) = (1 - \cos A)/2$ with (10),

\begin{aligned} T_1 T_3 &= 2R_2 \sin (\angle O_1 O_2 O_3/2)\\ &= 2R_2 \sqrt{\frac{R_1R_3}{(R_1 + R_2)(R_2 + R_3)}}\\ &= \frac{2\sqrt{R_1R_2R_3} \sqrt{R_2}}{\sqrt{(R_1 + R_2)(R_2 + R_3)}}.\quad\quad(15) \end{aligned}

Many of the formulas here are found from the first case by replacing $R_1$ with $-R_1$. Other distances between points in the figure can be found through similar means.

Finally, we remark that the radical axes of each pair of circles intersect at the radical centre – that point is the circumcentre of the triangle passing through the three points of tangency. With this circle being orthogonal to the three existing circles, inversion in this circle preserves the figure.

Four circles

For the case of four mutually tangential circles (where there is more than one point of tangency), there is an amazing relationship involving the complex number coordinates $z_1, z_2, z_3, z_4$ of the centres of the circles and their curvatures (reciprocals of radii) $k_i= 1/R_i$:

$\displaystyle 2\left((k_1z_1)^2 + (k_2z_2)^2 + (k_3z_3)^2 + (k_4z_4)^2\right) = \left(k_1z_1 + k_2z_2 + k_3z_3 + k_4z_4\right)^2.\quad\quad (16)$

This is known as the complex Descartes theorem. Note that for this formula to be valid for internally tangent circles, we make the sign of the curvature of the larger circle negative.

Interestingly this was only proven in 2001 in [1] with a nice proof shown in [2]. That proof assigns a sphere to each of the six points of tangency with curvature equal to the sums of the curvatures of the two circles meeting there. It then turns out that three spheres corresponding to the tangency points on the same circle are mutually tangent. If one does the same construction of spheres for the dual configuration of circles shown in blue below (the original four circles are in black), the same set of six spheres is obtained!

Note that we have more results from (16). Since the relationships remain when the points are translated by the same complex number $z$ we have

$\displaystyle 2\left((k_1(z_1-z))^2 + (k_2(z_2-z))^2 + (k_3(z_3-z))^2 + (k_4(z_4-z))^2\right) = \left(k_1(z_1-z) + k_2(z_2-z) + k_3(z_3-z) + k_4(z_4-z)\right)^2.\quad\quad (17)$

Expanding this as a quadratic in $z$ and comparing coefficients of $z^2, z$ [1] gives further two relationships:

\begin{aligned} 2\left(k_1^2 + k_2^2 + k_3^2 + k_4^2\right) &= \left(k_1 + k_2 + k_3 + k_4\right)^2, \quad\quad & (18)\\ 2\left(k_1^2 z_1 + k_2^2 z_2 + k_3^2 z_3 + k_4^2 z_4\right) &= \left(k_1 + k_2 + k_3 + k_4\right)\left(k_1 z_1 + k_2 z_2 + k_3 z_3 + k_4 z_4 \right).\quad\quad& (19) \end{aligned}

Equation (18) is known as Descartes’ Theorem, discovered in 1643.

To see (16) and (18) in action, let us set for example $z_1 = 3, R_1 = 3, z_2 = 1, R_2 = 1, R_3 = 1$. Then applying (7) we find

\begin{aligned} z_3 &= \frac{R_3(R_1 + R_2)}{R_1 - R_2} + \frac{2\sqrt{R_1R_2R_3(R_1 - R_2 - R_3)}}{R_1 - R_2}i\\ &= \frac{1(3+1)}{3-1} + \frac{2\sqrt{3.1.1(3-1-1)}}{3-1}i\\ &= 2 + i\sqrt{3}.\quad\quad(20) \end{aligned}

From (18) we may write

$k_4 = k_1 + k_2 + k_3 \pm 2\sqrt{k_1 k_2 + k_2 k_3 + k_1 k_3},\quad\quad(21)$

which for $k_1 = -1/3$ (negative as the larger circle is internally tangent), $k_2 = k_3 = 1$ leads to $k_4 = 5/3 \pm 2\sqrt{1/3}$[ or $R_4 = 1/k_4 = 3(7 \mp \sqrt{15})/34$.]

From (16) we may write

$z_4 = (k_1z_1 + k_2z_2 + k_3z_3 \pm 2\sqrt{k_1 k_2z_1z_2 + k_2 k_3z_2z_3 + k_1 k_3z_1z_3})/k_4,\quad\quad(22)$

which for $k_1 z_1 = -1, k_2 z_2 = 1, k_3 z_3 = 2 + i\sqrt{3}, k_4 = 5/3 \pm 2\sqrt{1/3}$ leads to

\begin{aligned} z_4 &= \left(-1 + 1 + 2 + \sqrt{3}i \pm 2\sqrt{-1}\right)/(5/3 \pm 2\sqrt{1/3})\\ &=\frac{2+(\sqrt{3}+ 2)i}{5/3 + 2/\sqrt{3}}\quad \text{or}\quad\frac{2+(\sqrt{3}- 2)i}{5/3 - 2/\sqrt{3}}.\quad\quad(23)\end{aligned}

This is used to generate the sketch below. As can be seen there are two possible circles shown in red.

Here is how one may prove (19) without the insight of the dual configuration, alluded to in [3] and [4]. Let us consider the externally tangent case with two possible fourth circles shown in red.

If we perform an inversion of the configuration in a circle of radius $R$ centred at the tangency point $T_3$ of $C_1$ and $C_2$, the circles $C_1$ and $C_2$ invert to parallel lines while the circles $C_3, C_4$ invert to equal-radii circles $C_3', C_4'$ tangent to the parallel lines as shown below. Note that in this new configuration it is easier to see that there are two possible choices for $C_4'$.

What distance separates the two parallel lines? We need only look at the image of the points diametrically opposite $T_3$ in $C_1$ and $C_2$. This leads to the distance $d = R^2/(2R_1) + R^2/(2R_2)$. Hence the radii of the images of $C_3$ and $C_4$ is half this, or $R^2(1/R_1 + 1/R_2)/4$.

If we know the distance of the centre of the image of $C_4$ from $T_3$, the following lemma will enable us to determine $R_4$. We shall use the following useful lemma which tells us how to find the radius of a circle from quantities involving its inverse.

Lemma

If a circle has radius $r$ and distance $x$ from the origin, its inverse in a circle of radius $R$ centred at the origin has radius $r' = rR^2/|x^2-r^2|$ and its centre has distance $x' = xR^2/|x^2 - r^2|$ from the origin. (Hence $x'/r ' = x/r$.)

Proof of lemma

In the above figure the dashed circle is the circle of inversion while the separate cases $x > r$ and $x < r$ are shown in blue and red respectively.

The points on the original circle collinear with the origin are at distance $x+r$ and $|x-r|$ from the origin. The inverses of these points have distance $R^2/(x+r)$ and $R^2/(x-r)$ from the origin (this quantity is negative if $x < r$). Hence the centre of the inverted circle has distance $x' = |R^2(1/(x+r) + 1/(x-r))/2| = xR^2/|x^2 - r^2|$ from the origin and radius $r'= |R^2(1/(x-r) - 1/(x+r))/2| = rR^2/|x^2-r^2|$ as required. Note that if $x=r$ the circle inverts to a line which can be thought of as a circle with centre at infinity with infinite radius.

From (12), if the origin is at $T_3$, $O_3$ has coordinates

$\displaystyle (x,y):= \left(\frac{R_3(R_1 - R_2)}{R_1 + R_2}, \frac{2\sqrt{R_1R_2 R_3(R_1 + R_2 + R_3)}}{R_1+R_2}\right).\quad\quad (24)$

Suppose $O_3'$ has coordinates $(x',y')$ (we note that while $C_3'$ is the image of $C_3$ under the inversion, the centre $O_3'$ is generally not the image of $O_3$). Then $O_4'$ is at distance

$\displaystyle d:= \frac{R^2}{2}\left(\frac{1}{R_1} + \frac{1}{R_2}\right)\quad\quad (25)$

above or below $O_3'$ (the distance between the parallel lines), so has coordinates $(x',y'\pm d)$. By the above lemma with $r = d/2$, the radius of $C_4$ with centre $O_4$ is $dR^2/2(x'^2 + (y'\pm d)^2 - (d/2)^2)$. Hence its curvature is

$\displaystyle \frac{1}{R_4} = \frac{2(x'^2 + y'^2 + 3d^2/4 \pm 2y'd)}{dR^2}.\quad\quad(26)$

Firstly from (13)

$x^2 + y^2 = T_3O_3^2 = R_3^2 + \frac{4R_1 R_2 R_3}{R_1 + R_2}$, so by the lemma, we find $x'^2 + y'^2$ via the ratio of radii $(d/2)$ to $R_3$:

$\displaystyle x'^2 + y'^2 = (d/2R_3)^2(x^2 + y^2),\quad\quad (27)$

so

\begin{aligned}\frac{2(x'^2 + y'^2 + 3d^2/4)}{dR^2} &= \frac{2(d/2R_3)^2(x^2 + y^2) + 3d^2/2}{dR^2}\\ &=\frac{d[(x^2 + y^2)/2R_3^2 + 3/2]}{R^2}\\ &=\frac{d}{R^2}\left[ \frac{R_3^2}{2R_3^2} + \frac{4R_1 R_2 R_3}{(R_1 + R_2)2R_3^2} + \frac{3}{2}\right]\\ &= \frac{d}{R^2}\left[ 2 + \frac{2R_1R_2}{(R_1 + R_2)R_3} \right]\\ &= \frac{2d}{R^2}\left[ \frac{R_3(R_1 + R_2) + R_1 R_2}{(R_1 + R_2)R_3} \right]\\ &= \left(\frac{1}{R_1} + \frac{1}{R_2}\right) \left[ \frac{R_3(R_1 + R_2) + R_1 R_2}{(R_1 + R_2)R_3} \right]\quad \text{(by (25))}\\ &= \frac{R_1 R_2 + R_2 R_3 + R_1 R_3}{R_1 R_2 R_3}\\ &= \frac{1}{R_1} + \frac{1}{R_2} + \frac{1}{R_3}.\quad\quad(28) \end{aligned}

Next,

\begin{aligned} \frac{4y'}{R^2} &= \frac{4 y (d/2R_3)}{R^2}\\ &= \frac{4d\sqrt{R_1R_2 R_3(R_1 + R_2 + R_3)}}{R^2(R_1+R_2)R_3}\quad \text{(by (24))}\\ &= \frac{4\frac{(R^2)(R_1 + R_2)}{2R_1R_2}\sqrt{R_1R_2 R_3(R_1 + R_2 + R_3)}}{R^2(R_1+R_2)R_3}\quad \text{(by (25))}\\ &= \frac{2\sqrt{R_1R_2 R_3(R_1 + R_2 + R_3)}}{R_1R_2R_3}\\ &= 2\sqrt{\frac{1}{R_1R_2} + \frac{1}{R_2R_3} + \frac{1}{R_1R_3}}.\quad\quad(29) \end{aligned}

Using (28) and (29) in (26) gives us

\begin{aligned} \frac{1}{R_4} &= \frac{2(x'^2 + y'^2 + 3d^2/4 \pm 2y'd)}{dR^2}\\ &= \frac{1}{R_1} + \frac{1}{R_2} + \frac{1}{R_3} \pm 2\sqrt{\frac{1}{R_1R_2} + \frac{1}{R_2R_3} + \frac{1}{R_1R_3}}.\quad\quad(30) \end{aligned}

With $k_i = 1/R_i$, this becomes $k_4 = k_1 + k_2 + k_3 \pm 2\sqrt{k_1 k_2 + k_2 k_3 + k_1 k_3},$ establishing (21).

For the case of $C_2$ and $C_3$ internally tangent to $C_1$ a similar computation to the above can be carried out and we obtain

$\displaystyle \frac{1}{R_4} = -\frac{1}{R_1} + \frac{1}{R_2} + \frac{1}{R_3} \pm 2\sqrt{-\frac{1}{R_1R_2} + \frac{1}{R_2R_3} - \frac{1}{R_1R_3}},\quad\quad(31)$

which is the same as (28) with $R_1$ replaced with $-R_1$.

Note that Descartes’ theorem also holds in the special cases of two parallel lines tangent to two equal circles or a single line tangent to three mutually tangent circles. In the latter case we may set $k_4 = 0$ and assuming $k_1 \geq k_2$ we obtain from (18) the nice formula

$\sqrt{k_3} = \sqrt{k_1} \pm \sqrt{k_2}.\quad\quad(32)$

We see these two solutions below in the right figure.

Further generalisations of Descartes’ theorem to further dimensions are in [1], and more can be read about tangent circle packings in [5].

#### References

[1] J.C. Lagarias, C.L. Mallows, and A. Wilks, Beyond the Descartes Circle Theorem, American Mathematical Monthly, 109 (2002), 338-361. Available at http://www.arxiv.org/abs/math?papernum=0101066.

[2] S. Northshield, Complex Descartes Circle Theorem, to appear, American Mathematical Monthly.

[3] D. Pedoe, On a theorem in geometry, American Mathematical Monthly, 74 (1967), 627-640.

[4] P. Sarnak, Integral Apollonian Packings, American Mathematical Monthly, 118 (2011), 291-306.

[5] D. Austin, When Kissing Involves Trigonometry, Feature Column from the AMS, March 2006.

Create a free website or blog at WordPress.com.