2. Where πr² and 2πr come from

📖 Reading · 15 min
💡 Every code box below is live — edit it and hit Run.

Two formulas everybody memorises and almost nobody derives. Both are limits, and both were computed by Archimedes around 250 BC — two thousand years before anyone had a definition of "limit" to compute them with.

That's the point of putting them here. The method of this course is older than its vocabulary, and seeing it work on a circle makes the vocabulary feel inevitable rather than arbitrary.

First: why is there a \pi at all?

Before hunting for the number, ask why a single number should exist. Why should every circle in the universe have the same circumference-to-diameter ratio?

Because of similarity. Scale every length in a shape by the same factor k and any ratio of two lengths in that shape is unchanged — the k's cancel. Inscribe a regular hexagon in a circle: its perimeter over the circle's diameter is exactly 3, for a hexagon of any size. Inscribe a regular 12-gon: some other fixed number, again the same for every size.

And all circles are similar to one another — a circle is the shape you get by pushing "regular polygon" to its limit. So the ratio C/d cannot depend on which circle you picked. It's one number. Call it \pi, and C = \pi d = 2\pi r becomes a definition, not a theorem.

The theorem is the value.

Archimedes' bracket

You can't measure a curve with a ruler, but you can measure a polygon. So trap the circle between two polygons you can measure: one inscribed (perimeter too small) and one circumscribed (perimeter too big). Then double the number of sides and watch the gap close.

Work in a unit circle, r = 1, so the circumference is 2\pi and half of it is \pi. Let s_n be the side length of the inscribed regular n-gon. The hexagon is the free lunch: six equilateral triangles, so s_6 = 1, and

\pi > \frac{6 \times 1}{2} = 3

There's the "\pi is a bit more than 3" you've known since school, earned in one line.

Now double. Writing c_n = \cos(\pi/n) = \sqrt{1 - (s_n/2)^2}, the half-angle identity gives

s_{2n} = \sqrt{2 - 2c_n}

and the circumscribed polygon's side is s_n / c_n. So at every stage:

\frac{n \, s_n}{2} \;<\; \pi \;<\; \frac{n \, s_n}{2 c_n}

Nothing but square roots. Archimedes ran this to n = 96 by hand and got 3\frac{10}{71} < \pi < 3\frac{1}{7}, which pins \pi to two decimal places.

This is a limit argument in every respect except the word. A quantity you can't compute is squeezed between two you can, and the squeeze tightens without bound. In §1 you'll meet it again under its modern name, the squeeze theorem.

The area: unroll the circle

Cut the disc into 2n thin pie slices and lay them alternately point-up and point-down. They interlock into something close to a parallelogram. As the slices get thinner, two things happen: the wavy top and bottom edges flatten, and the slanted ends straighten up. In the limit you have a rectangle.

Its height is the slice length, r. Its base is half the slices, laid end-to-end along their arcs — half the circumference, \pi r. So

A = \pi r \cdot r = \pi r^2

The area again: peel it like an onion

Here's the argument that generalises, and it is secretly an integral.

Think of the disc as nested rings. The ring at radius s with thickness ds is, unrolled, essentially a thin rectangle of length 2\pi s (its circumference) and height ds. Add up all the rings from 0 to r:

A = \int_0^r 2\pi s \, ds = 2\pi \cdot \frac{r^2}{2} = \pi r^2

You don't know that notation yet — it's §4. But you already know how to read it: chop into pieces, approximate each piece by something easy, add up, let the pieces shrink. Identical to the area problem from the last lesson.

The fact that should stop you

\frac{d}{dr}\left(\pi r^2\right) = 2\pi r

The derivative of the area is the circumference. Not a coincidence and not about circles specifically: grow the radius by a hair dr and the extra area you gain is a thin ring, whose area is its length times its thickness, C \cdot dr. So the rate at which area grows with radius is the boundary length.

The same argument in three dimensions says the derivative of the sphere's volume is its surface area:

\frac{d}{dr}\left(\frac{4}{3}\pi r^3\right) = 4\pi r^2 \quad\checkmark

That's the Fundamental Theorem of Calculus, visible in a shape you can hold. In §12 it becomes the divergence theorem, and by then the phrase "what happens inside is determined by what crosses the boundary" will be the whole subject.

Doing it in Python

Archimedes' doubling, exactly as he ran it:

from math import sqrt

s, n = 1.0, 6  # inscribed hexagon in a unit circle
print(f"{'n':>7} {'lower':>12} {'upper':>12} {'gap':>12}")
for _ in range(8):
    c = sqrt(1 - (s / 2) ** 2)
    print(f"{n:>7} {n * s / 2:>12.9f} {n * s / (2 * c):>12.9f} "
          f"{n * s / (2 * c) - n * s / 2:>12.9f}")
    s = sqrt(2 - 2 * c)
    n *= 2

print("\npi is trapped, and the trap tightens by a factor of 4 each doubling")

Run it far enough, though, and it falls apart:

from math import sqrt, pi

s, n = 1.0, 6
print(f"{'n':>12} {'naive':>15} {'error':>12}")
for k in range(28):
    c = sqrt(1 - (s / 2) ** 2)
    s = sqrt(2 - 2 * c)   # 2 and 2c are both close to 2: catastrophic cancellation
    n *= 2
    if k % 4 == 3:
        print(f"{n:>12} {n * s / 2:>15.10f} {n * s / 2 - pi:>12.2e}")

print("\nthe estimate improves, then rots -- and eventually collapses to 0")

The mathematics is fine; the arithmetic isn't. As n grows, c \to 1, so 2 - 2c subtracts two nearly-equal numbers and the significant digits cancel away. Multiply top and bottom by 2 + 2c and the subtraction disappears:

s_{2n} = \sqrt{2 - 2c} = \sqrt{\frac{(2-2c)(2+2c)}{2+2c}} = \sqrt{\frac{4 - 4c^2}{2+2c}} = \frac{s_n}{\sqrt{2 + 2c}}

from math import sqrt, pi

s, n = 1.0, 6
print(f"{'n':>12} {'stable':>15} {'error':>12}")
for k in range(28):
    c = sqrt(1 - (s / 2) ** 2)
    s = s / sqrt(2 + 2 * c)   # algebraically identical, numerically sane
    n *= 2
    if k % 4 == 3:
        print(f"{n:>12} {n * s / 2:>15.10f} {n * s / 2 - pi:>12.2e}")

print("\nsame formula, rearranged -- now it converges all the way to machine precision")

Two algebraically identical expressions, wildly different answers. Keep that in mind; it comes back with interest in §3 when we differentiate numerically.

And the onion, adding up rings:

from math import pi

r, n = 2.0, 200_000
ds = r / n
area = sum(2 * pi * (i * ds) * ds for i in range(n))

print(f"onion sum : {area:.6f}")
print(f"pi r^2    : {pi * r ** 2:.6f}")
print(f"error     : {area - pi * r ** 2:.6f}   (one missing outer ring, ~C*ds)")

Worked example

A circular pizza of radius 30 cm is cut into 8 equal slices. What's the area of one slice, and the length of its curved edge?

A slice is a fixed fraction of the whole, so both scale the same way:

A_{\text{slice}} = \frac{1}{8}\pi r^2 = \frac{\pi \cdot 900}{8} \approx 353.4 \text{ cm}^2

\text{arc} = \frac{1}{8}(2\pi r) = \frac{2\pi \cdot 30}{8} \approx 23.6 \text{ cm}

Now the useful generalisation. A slice of angle \theta in radians is the fraction \theta/2\pi of the circle, so

\text{arc} = \frac{\theta}{2\pi} \cdot 2\pi r = r\theta, \qquad A_{\text{sector}} = \frac{\theta}{2\pi} \cdot \pi r^2 = \frac{1}{2}r^2\theta

Both formulas are clean only in radians. That is the entire reason radians exist, and it's the subject of the last lesson in this module.

Your turn

1. A regular hexagon is inscribed in a circle of radius r. Show its perimeter is 6r, and hence that \pi > 3.

2. Why does the circumscribed n-gon have side length s_n / c_n, where s_n is the inscribed side and c_n = \cos(\pi/n)?

3. The area of a disc is \pi r^2 and its circumference is 2\pi r. What does that predict for a square of "radius" a (half its side), and does it work?

Solutions

1. Join the centre to two adjacent vertices. The central angle is 360°/6 = 60°, and the two radii are equal, so the triangle is isosceles with a 60° apex — hence equilateral. Its third side, the hexagon's edge, is therefore r. Six of them give perimeter 6r.

The hexagon is strictly inside the circle and a straight line is the shortest path between two points, so 6r < C = 2\pi r, giving \pi > 3.

2. Both polygons are made of n congruent isosceles triangles with apex angle 2\pi/n at the centre. Bisect one: the half-angle is \pi/n.

For the inscribed polygon the hypotenuse is the radius 1, so the half-side is \sin(\pi/n) and s_n = 2\sin(\pi/n). For the circumscribed polygon the adjacent side is the radius 1 (the edge is tangent, touching at distance exactly 1), so the half-side is \tan(\pi/n).

\frac{\text{circumscribed side}}{\text{inscribed side}} = \frac{2\tan(\pi/n)}{2\sin(\pi/n)} = \frac{1}{\cos(\pi/n)} = \frac{1}{c_n}

The two polygons are similar figures, scaled apart by exactly 1/c_n — which is why the bracket tightens: c_n \to 1.

3. A square of half-side a has area 4a^2 and perimeter 8a. And

\frac{d}{da}\left(4a^2\right) = 8a \quad\checkmark

It works, and for the same reason: grow a by da and you add a thin frame of area (perimeter \times thickness).

The subtlety is that you must parameterise by the inradius — the distance from centre to edge. Parameterise by the full side L instead and you get A = L^2, P = 4L, but dA/dL = 2L \neq 4L. Growing L by dL pushes only two of the four sides outward, so you gain half the frame. Measure from the centre outward, as the circle's r does, and the identity is restored.

Check yourself in code

Reproduce Archimedes' bracket. Starting from the inscribed hexagon in a unit circle (s = 1, n = 6), print the lower and upper bounds for \pi at n = 6, 12, 24, 48, 96 to 6 decimal places.

Use c = \sqrt{1 - (s/2)^2}, bounds \frac{ns}{2} and \frac{ns}{2c}, and the stable doubling s \leftarrow s/\sqrt{2 + 2c}.

Print exactly this:

n= 6  3.000000 < pi < 3.464102
n=12  3.105829 < pi < 3.215390
n=24  3.132629 < pi < 3.159660
n=48  3.139350 < pi < 3.146086
n=96  3.141032 < pi < 3.142715
from math import sqrt

s, n = 1.0, 6
for _ in range(5):
    c = sqrt(1 - (s / 2) ** 2)
    # print the bracket for this n, then double the polygon
from math import sqrt

s, n = 1.0, 6
for _ in range(5):
    c = sqrt(1 - (s / 2) ** 2)
    print(f"n={n:>2}  {n * s / 2:.6f} < pi < {n * s / (2 * c):.6f}")
    s = s / sqrt(2 + 2 * c)
    n *= 2

C = 2\pi r is a definition made legitimate by similarity; A = \pi r^2 is a limit of shapes you can already measure. Both were computed by squeezing an unknown between two knowns and tightening — the move this whole course is built on. And the derivative of the area being the circumference is the Fundamental Theorem of Calculus, showing up two millennia early.

Next: a fast refresher on the functions we'll be differentiating, and the four transformations that let you read a graph without plotting it.