The Computation of π by Archimedes

22
The Computation of π by Archimedes Bill McKeeman Dartmouth College 2012.02.15

description

The Computation of π by Archimedes. Bill McKeeman Dartmouth College 2012.02.15. Abstract. - PowerPoint PPT Presentation

Transcript of The Computation of π by Archimedes

Page 1: The Computation of  π by Archimedes

The Computation of π by Archimedes

Bill McKeemanDartmouth College

2012.02.15

Page 2: The Computation of  π by Archimedes

AbstractIt is famously known that Archimedes approximated π by computing the perimeters of many-sided regular polygons, one polygon inside the circle and one outside. This presentation recapitulates Archimedes' computation, using MATLAB instead of hand, ink and papyrus. The surprise to me was how many "tweaks" Archimedes applied at various stages of an otherwise systematic approach.

Page 3: The Computation of  π by Archimedes

follow along…http://www.mathworks.com/matlabcentral/fileexchange/29504-the-computation-of-pi-by-archimedes/content/html/ComputationOfPiByArchimedes.html

MATLAB publication is a sort of self-checking paper. This URL takes you to the MATLAB version of the talk. Grey background is the MATLAB code; typeset material is MATLAB comments, everything else is MATLAB output.

Page 4: The Computation of  π by Archimedes

Earlier that 200BCE

Archimedes lived in Sicily, Euclid in Egypt, Pythagoras in Turkey and Italy

Page 5: The Computation of  π by Archimedes

Archimedes did other thingsSyracuse was often under attack. Archimedes invented weapons to defend his city. This iron ship-dumper may be a myth. Other weapons such as fireballs were not.

When a Roman sneak attack finally conquered Syracuse, Archimedes was considered by the commanding general as the most important “catch.” Unfortunately a Roman soldier killed old Archimedes for not being instantly obedient. Too bad for the Roman soldier.

Page 6: The Computation of  π by Archimedes

R

A polygon inside the circle and a polygon outside the circle.

The perimeters of the polygons bound the circumference of the circle which (by definition) is 2πR.

The inner hexagon has perimeter 6R which implies 6R<2πR, or 3<π.

Increasing the number of edges tightens the bounds.

Thus thought Archimedes.

The Plan

Page 7: The Computation of  π by Archimedes

Greek Numbers (1)Greeks used uppercase letters to represent decimal digits (lower case is used here for readability when mixed with English). For example ˏαυκδ′ means 1424. The prefix ˏ turns α into 1000. The postfix ′ ends the number (identifying it amongst Greek text).

Page 8: The Computation of  π by Archimedes

Greek Numbers (2)• In case you noticed it, 27 letters are needed for this scheme,

so 3 ancient letters were used in addition to the 24 we know.• Greeks had no digit 0.• Greeks had no decimal point.• Greeks did have rational numbers.

For example: γ′ζ″ means 3⅟₇• Greek numbers evolved over the centuries.

Page 9: The Computation of  π by Archimedes

Greek MathFinally, algebra was unavailable, so words were used to describe computations and algorithms. The flavor of ancient presentation is provided by Archimedes' statement

"The surface of any sphere is four times its greatest circle."

We would write A = 4πR².

Page 10: The Computation of  π by Archimedes

The Computation of πThe result presented by Archimedes translates to

3¹⁰/₇₁ < π < 3⅟₇

This is what we want to compute in MATLAB using only the tools available to Archimedes.

(I will compromise by using decimal integers, fractions and algebraic notation. You will thank me.)

Page 11: The Computation of  π by Archimedes

The Outer N-gon

The first equation is a consequence of similar triangles. The second and third equations are algebraic manipulations of the first. The fourth equation is an application of the Pythagorean Theorem.

Page 12: The Computation of  π by Archimedes

The IterationThe last two formulas on the previous page are combined into an iteration.

So, if an is known, so is en, and therefore the half-perimeter nen, and, finally, an upper bound on π.

Page 13: The Computation of  π by Archimedes

The ComputationArchimedes started with the hexagon. That is:

R = 1; e₆ = R√(4/3); a₆ = R√(1/3)

It’s easy for MATLAB to check the iteration formula is converging to 3.141592653589793…: % a π a₆ = R/e₆ % 1.73205 3.4641 a₁₂ = a₆ + √(a₆² + 1) % 3.73205 3.31539 a₂₄ = a₁₂ + √(a₁₂² + 1) % 7.59575 3.15966 a₄₈ = a₂₄ + √(a₂₄² + 1) % 15.2571 3.14609 a₉₆ = a₄₈ + √(a₄₈² + 1) % 30.5468 3.14271 e₉₆ = R/a₉₆

Page 14: The Computation of  π by Archimedes

Hand CalculationUnfortunately for Archimedes, he did not have double precision floating point so he, and therefore we, still have some work to do. It is simpler for hand calculation if intermediate results are improper fractions with a large integer part. To make this happen, the iteration formula is multiplied by an arbitrary integer constant c (to be chosen later).

Page 15: The Computation of  π by Archimedes

MATLAB Fractions

• Switch to “Greek Mode” (rational arithmetic)• Need to take square roots.

– Archimedes picked approximations that led to an elegant result.– Nobody knows how Archimedes did square roots.– So, I’ll skip my speculations here.

• Archimedes stated without explanation:

Its easy to check in MATLAB

assert((265/153)^2 < 3 && 3 < (1351/780)^2)

Page 16: The Computation of  π by Archimedes

The Upper Bound (1)

For the upper bound computation, Archimedes chose the following starting values:

c = 153a₆ = 256 (a little less than 265.0038)b₆ = 306

Therefore a₉₆ will be less than the fully accurate irrational value and e₉₆ will be greater than the fully accurate half-side of the 96-gon, and finally 96*e₉₆ is greater than the half-perimeter and therefore greater than π.

Page 17: The Computation of  π by Archimedes

The Upper Bound (2)c = 153a₆ = 265 b₆ = 306a₁₂ = 571

Archimedes (very carefully ) chose b₁₂

Note that the difference between the true irrational value 591.143 and Archimedes choice 591.125 is very small

Page 18: The Computation of  π by Archimedes

The Upper Bound (3)c = 153a₆ = 265 b₆ = 306a₁₂ = 571 b₁₂ = 591a₂₄ = 1162⅟₈ b₂₄ = 1172⅟₈a₄₈ = 2334⅟₄ b₄₈ = 2339⅟₄a₉₆ = 4673⅟₂

…continuing, Archimedes chose again…

…and again…

Page 19: The Computation of  π by Archimedes

The Upper Bound (4)c = 153a₆ = 265 b₆ = 306a₁₂ = 571 b₁₂ = 591a₂₄ = 1162⅟₈ b₂₄ = 1172⅟₈a₄₈ = 2334⅟₄ b₄₈ = 2339⅟₄a₉₆ = 4673⅟₂Using e₉₆ = c/a₉₆

hi = 96c/a₉₆ = 96*153/4673⅟₂ = 3¹³³⁵/₉₃₄₇

Then Archimedes made another choice, picking the elegant 3¹/₇ because

π < 3¹³³⁵/₉₃₄₇ < 3¹/₇

This establishes the upper bound on π.

Page 20: The Computation of  π by Archimedes

The Lower BoundThe lower bound computation is similar. The starting values and numbers are different. The final result is

a₆ = 1351 b₆ = 1560 c = 780a₁₂ = 2911 b₁₂ = 3013³/₄a₂₄ = 5924³/₄ b₂₄ = 1838⁹/₁₁ c = 240a₄₈ = 3661⁹/₁₁ b₄₈ = 1009⅟₆a₉₆ = 2016⅟₆ b₉₆ = 2017⅟₄ c = 66Using e₉₆ = c/a₉₆

lo = 96c/a₉₆ = 96*66/2017⅟₄ = 3¹¹³⁷/₈₀₆₉

Then Archimedes made his final choice, picking 3¹⁰/₇₁

Page 21: The Computation of  π by Archimedes

The Result

The values Archimedes provided:

3¹⁰/₇₁ < 3¹¹³⁷/₈₀₆₉ < π < 3¹³³⁵/₉₃₄₇ < 3¹/₇

established the bounds on π. Archimedes wrote

ΟΕΔ

These days we say “what was required to be proved” or

QED.

meaning ὅπερ ἔδει δεῖξαι

Page 22: The Computation of  π by Archimedes

Summary Calculation