Big Idea

How Archimedes Estimated Pi

Start with a circle of radius 1. Put one polygon inside the circle (lower bound) and one outside the circle (upper bound). As you double the number of sides, both bounds close in on pi.

Lower Bound (inside polygon)

pi_lower = (n * a_n) / 2

a_n is the inscribed side length.

Upper Bound (outside polygon)

pi_upper = (n * b_n) / 2

b_n is the circumscribed side length.

a_(2n) = sqrt(2 - sqrt(4 - a_n^2)), b_n = (2 * a_n) / sqrt(4 - a_n^2)

This lab uses only square roots in the core update rule, which mirrors the geometric reasoning Archimedes used.

Interactive Lab

Run the Bounds with Functions

Choose how many doubling rounds to run. Start from a hexagon (6 sides), like Archimedes did.

n sides pi lower pi upper midpoint interval width

Programming Task

Student Challenge

  • Write three functions: circumscribed_side(a), next_inscribed_side(a), and pi_bounds(n, a).
  • Run your code from 6 sides to at least 96 sides.
  • In one sentence: explain why this is a proof-style argument, not just a guess.
  • Extension: keep doubling until the interval width is less than 0.00001.

Python Starter (No math.pi needed)

from math import sqrt

def circumscribed_side(a):
    return (2 * a) / sqrt(4 - a * a)

def next_inscribed_side(a):
    return sqrt(2 - sqrt(4 - a * a))

def pi_bounds(n, a):
    b = circumscribed_side(a)
    lower = (n * a) / 2
    upper = (n * b) / 2
    return lower, upper

def starting_inscribed_side(start_sides):
    n = 6
    a = 1.0
    while n < start_sides:
        a = next_inscribed_side(a)
        n *= 2
    return a

def archimedes_table(rounds=4, start_sides=6):
    n = start_sides
    a = starting_inscribed_side(start_sides)
    rows = []
    for _ in range(rounds + 1):
        lower, upper = pi_bounds(n, a)
        rows.append((n, lower, upper, (lower + upper) / 2, upper - lower))
        a = next_inscribed_side(a)
        n *= 2
    return rows