User:Fredrik/Pi




 * For the Greek letter, see pi (letter). For additional uses, see pi (disambiguation).

Pi or &pi; is a mathematical constant, approximately equal to 3.14, that represents the ratio of any circle's circumference to its diameter in Euclidean geometry. The number also represents the ratio of a circle's area to the square of its radius, and appears in many other formulas from mathematics and geometry as well. Pi is an irrational number, which means that its decimal expansion 3.1415926535897932... never ends or repeats. Throughout the history of mathematics, much effort has been made to determine &pi; more accurately and understand its nature; fascination with the number has even carried over into culture at large.

The Greek letter &pi;, often spelled out pi in text, was adopted for the number from the Greek word for perimeter, probably by William Jones in 1706, and popularized by Leonhard Euler some years later. "&pi;" is usually pronounced as pie when referring to the constant, although the letter is properly pronounced pee otherwise. The constant is occasionally also referred to as the circular constant, Archimedes' constant, or Ludolph's number.

History
The history of &pi; parallels the development of mathematics as a whole. Some authors divide progress into three periods: the ancient period during which &pi; was studied geometrically, the classical era following the development of calculus in Europe around the 17th century, and the age of digital computers.

Geometrical period
That the ratio of the circumference to the diameter of a circle is the same for all circles, and that it is slightly more than 3, was known to ancient Egyptian, Babylonian, Indian and Greek geometers. The earliest known approximations date from around 1900 BC; they are 25/8 (Babylonia) and 256/81 (Egypt), both within 1% of the true value. The Indian text Shatapatha Brahmana gives &pi; as 339/108 &asymp; 3.139. The Books of Kings (600 BC) appears to suggest &pi; = 3, which is notably worse than other estimates available at the time, although the interpretation of the passage is disputed.

Archimedes (287-212 BC) was the first to estimate &pi; rigorously. He realized that its magnitude can be bounded from below and above by inscribing circles in regular polygons and calculating the outer and inner polygons' respective perimeters:



By using the equivalent of 96-sided polygons, he proved that 223/71 &lt; &pi; &lt; 22/7. Taking the average of these values yields &pi; &asymp; 3.1419.

In the following centuries, most significant development took place in India and China. Around 480, the Chinese mathematician Zu Chongzhi gave the approximation &pi; = 355/113, and showed that 3.1415926 &lt; &pi; &lt; 3.1415927, which would stand as the most accurate value for &pi; over the next 900 years.

Classical period
Until the second millennium, &pi; was known to less than 10 decimal digits. The next major advancement in the study of &pi; came with the development of calculus, and in particular the discovery of infinite series which in principle permit calculating &pi; to any desired accuracy by adding sufficiently many terms. Around 1400, Madhava of Sangamagrama found the &pi; first known such series,


 * $$\frac{\pi}{4} = 1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \cdots,$$

now known as the Gregory-Leibniz series since it was rediscovered by James Gregory and Gottfried Leibniz in the 17th century. Unfortunately, the rate of convergence is too slow to calculate many digits in practice; about 4,000 terms must be summed to improve upon Archimedes' estimate. However, by transforming the series into


 * $$\pi = \sqrt{12} \, \left(1-\frac{1}{3 \cdot 3} + \frac{1}{5 \cdot 3^2} - \frac{1}{7 \cdot 3^3} + \cdots\right)$$

Madhava was able to calculate &pi; as 3.14159265359, correct to 11 decimal places. The record was beaten in 1424 by the Persian astronomer Ghiyath al-Kashi, who determined 16 decimals of &pi;.

The first major European contribution since Archimedes was made by the German mathematician Ludolph van Ceulen (1540–1610), who used a geometrical method to compute 32 decimals of &pi;. He was so proud of the calculation, which required the most part of his life, that he had the digits engraved into his tombstone.

Around the same time, the methods of calculus and determination of infinite series and products for geometrical quantities began to emerge in Europe. The first such representation was the Viète formula,
 * $$\frac2\pi = \frac{\sqrt2}2 \cdot \frac{\sqrt{2+\sqrt2}}2 \cdot \frac{\sqrt{2+\sqrt{2+\sqrt2}}}2 \cdot \cdots,$$

found by François Viète in 1593. Another famous result is Wallis' product,


 * $$\frac{\pi}{2} = \frac{2}{1} \cdot \frac{2}{3} \cdot \frac{4}{3} \cdot \frac{4}{5} \cdot \frac{6}{5} \cdot \frac{6}{7} \cdot \frac{8}{7} \cdot \frac{8}{9} \cdots,$$

written down by John Wallis in 1655. Isaac Newton himself derived a series for &pi; and calculated 15 digits, although he later confessed: "I am ashamed to tell you to how many figures I carried these computations, having no other business at the time."

John Machin was the first to compute 100 decimals of &pi;, using the formula


 * $$\frac{\pi}{4} = 4 \, \arctan \frac{1}{5} - \arctan \frac{1}{239}$$

with


 * $$\arctan \, x = x - \frac{x^3}{3} + \frac{x^5}{5} - \frac{x^7}{7} + \cdots.$$

Formulas of this type, now known as Machin-like formulas, were used to set several successive records and remained the best known method for calculating &pi; well into the age of computers. A remarkable record was set by the calculating prodigy Johan Zacharias Dase, who in 1814 employed a Machin-like formula to calculate 200 decimals of &pi; in his head. The best value at the end of the 19th century was due to William Shanks, who took 15 years to calculate &pi; with 707 digits, although due to a mistake only the first 527 were correct. (To avoid such errors, modern record calculations of any kind are often performed twice, with two different formulas. If the results are the same, they are likely to be correct.)

Theoretical advances in the 18th century led to insights about &pi;'s nature that could not be achieved through numerical calculation alone. Johann Heinrich Lambert proved the irrationality of &pi; in 1761, and Adrien-Marie Legendre proved in 1794 that also &pi;&sup2; is irrational. When Leonhard Euler in 1735 solved the famous Basel problem – finding the exact value of


 * $$\frac{1}{1^2} + \frac{1}{2^2} + \frac{1}{3^2} + \frac{1}{4^2} + \cdots$$

which is &pi;&sup2;/6, he established a deep connection between &pi; and the prime numbers. Both Legendre and Leonhard Euler speculated that &pi; might be transcendental, a fact that was proved in 1882 by Ferdinand von Lindemann.

Age of computers
The advent of digital computers in the 20th century led to an increased rate of new &pi; calculation records. John von Neumann used ENIAC to compute 2037 digits of &pi; in 1949, a calculation that took 70 hours. Additional thousands of decimal places were obtained in the following decades, with the million-digit milestone passed in 1973. Progress was not only due to faster hardware, but also new algorithms. One of the most significant developments was the discovery of the fast Fourier transform (FFT) in the 1960s, which allows computers to perform arithmetic on extremely large numbers quickly.

In the beginning of the 20th century, the Indian mathematician Srinivasa Ramanujan found many new formulas for &pi;, some remarkable for their elegance and mathematical depth. One of his most famous formulas is the series


 * $$\frac{1}{\pi} = \frac{2 \sqrt 2}{9801} \sum_{k=0}^\infty \frac{(4k)!(1103+26390k)}{(k!)^4 396^{4k}}$$

which can be derived using the theory of modular functions. The series converges extraordinarily quickly, adding about eight decimals per term. Due to scarce distribution of Ramanujan's published work, it was however not widely known until around 1985 when William Gosper used it to calculate 17 million decimals of &pi;. Based on Ramanujan's ideas, Gregory and David Chudnovsky also found the formula


 * $$\frac{426880 \sqrt{10005}}{\pi} = \sum_{k=0}^\infty \frac{(6k)! (13591409 + 545140134k)}{(3k)!(k!)^3 (-640320)^{3k}}$$

which delivers 14 digits per term. The Chudnovsky brothers used this formula to set several &pi; computing records in the end of the 1980s, including the first calculation of over one billion (1,011,196,691) decimals in 1989. It remains the formula of choice for &pi; calculating software that runs on personal computers, as opposed to the supercomputers used to set modern records.

Whereas series typically increase the accuracy with a fixed amount for each added term, there exist iterative algorithms that multiply the number of correct digits at each step, with the downside that each step generally requires an expensive calculation. A breakthrough was made in 1975, when Richard Brent and Eugene Salamin independently discovered the Brent-Salamin algorithm, which uses only arithmetic to double the number of correct digits at each step. The algorithm consists of setting


 * $$a_0 = 1 \quad \quad \quad b_0 = \frac{1}{\sqrt 2} \quad \quad \quad t_0 = \frac{1}{4} \quad \quad \quad p_0 = 1$$

and iterating


 * $$a_{n+1} = \frac{a_n+b_n}{2} \quad \quad \quad b_{n+1} = \sqrt{a_n b_n}$$
 * $$t_{n+1} = t_n - p_n (a_n-a_{n+1})^2 \quad \quad \quad p_{n+1} = 2 p_n$$

until an and bn are close enough. Then the estimate for &pi; is given by


 * $$\pi \approx \frac{(a_n + b_n)^2}{4 t_n}.$$

Using this scheme, 25 iterations suffice to reach 45 million correct decimals. A similar algorithm that quadruples the accuracy in each step has been found by Jonathan and Peter Borwein. The methods have been used by Yasumasa Kanada and team to set most of the &pi; calculation records since 1980, up to a calculation of 206,158,430,000 decimals of &pi; in 1999. The current record is 1,241,100,000,000 decimals, set by Kanada and team in 2002. Although most of Kanada's previous records were set using the Brent-Salamin algorithm, the 2002 calculation made use of two Machin-like formulas that were slower but crucially reduced memory consumption. The calculation was performed on a 64-node Hitachi supercomputer with 1 terabyte of main memory, capable of carrying out 2 trillion operations per seconds.

An important recent development was the BBP formula, found in 1995 by Simon Plouffe together with David H. Bailey and Peter Borwein. The formula,


 * $$\pi = \sum_{k=0}^\infty \frac{1}{16^k} \left( \frac{4}{8k + 1} - \frac{2}{8k + 4} - \frac{1}{8k + 5} - \frac{1}{8k + 6}\right),$$

is remarkable because it allows extracting any individual hexadecimal or binary digit of &pi; without calculating all the preceding ones. Between 1998 and 2000, the distributed computing project PiHex used a modification of the BBP formula due to Fabrice Bellard to compute the quadrillionth (1,000,000,000,000,000:th) bit of &pi;, which turned out to be 0.

Use in mathematics and science
&pi; is ubiquitous in mathematics, appearing even in places that lack an obvious connection to the circles of Euclidean geometry.

Geometry and trigonometry
For any circle with radius r and diameter d = 2r, the circumference is &pi;d and the area is &pi;r2. Further, &pi; appears in formulas for areas and volumes of many other geometrical shapes based on circles, such as ellipses, spheres, cones, and tori. Accordingly, &pi; appears in definite integrals that describe circumference, area or volume of shapes generated by circles. In the basic case, half the area of the unit disc is given by
 * $$\int_{-1}^1 \sqrt{1-x^2}\,dx = \frac{\pi}{2}$$

and
 * $$\int_{-1}^1\frac{1}{\sqrt{1-x^2}}\,dx = \pi$$

gives half the circumference of the unit circle. More complicated shapes can be integrated as solids of revolution.

From the unit-circle definition of the trigonometric functions also follows that the sine and cosine have period 2&pi;. That is, for all x and integers n, sin(x) = sin(x + 2&pi;n) and cos(x) = cos(x + 2&pi;n). Because sin(0) = 0, sin(2&pi;n) = 0 for all integers n. Also, the angle measure of 180&deg; is equal to &pi; radians. In other words, 1&deg; = 180/&pi;.

In modern mathematics, &pi; is often defined using trigonometric functions, for example as the smallest positive x for which sin x = 0, to avoid unnecessary dependence on the subtleties of Euclidean geometry and integration. Equivalently, &pi; can be defined using the inverse trigonometric functions, for example as &pi; = 2 arccos(0) or &pi; = 4 arctan(1). Expanding inverse trigonometric functions as power series is the easiest way to derive infinite series for &pi;.

Higher analysis and number theory


The frequent appearance of &pi; in complex analysis can be related to the behavior of the exponential function of a complex variable, described by Euler's formula


 * $$e^{i\phi} = \cos \phi + i\sin \phi \!$$

where i is the imaginary unit satisfying i2 = &minus;1 and e &asymp; 2.71828 is Euler's number. This formula implies that imaginary powers of e describe rotations on the unit circle in the complex plane; these rotations have a period of 360&deg; = 2&pi;. In particular, the 180&deg; rotation &phi; = &pi; results in the remarkable Euler's identity


 * $$e^{i \pi} = -1.\!$$

There are n different n-th roots of unity
 * $$e^{2 \pi i k/n} \qquad (k = 0, 1, 2, \dots, n - 1).$$

The Gaussian integral


 * $$\int_{-\infty}^{\infty}e^{-x^2}dx=\sqrt{\pi}.$$

A consequence is that the gamma function of a half-integer is a rational multiple of &radic;&pi;.

zeta function and primes

Culture
Main article: Cultural references to &pi;

A number of science fiction authors have referenced physical or metaphysical implications of &pi;. For example, Arthur C. Clarke and Stephen Baxter describe an alien world where spheres have the circumference-to-diameter ratio &pi; = 3 in Time's Eye. In Eon by Greg Bear, &pi; is used to calculate the curvature of space. In Carl Sagan's novel Contact, made into a film in 1997, a message from the creator of the universe is found embedded in &pi; – when expressed in base 11.

Sometimes &pi; is used for a more immediate or comedic effect. In an episode of The Simpsons, Professor Frink shouts "&pi; is exactly 3!" to gain the full attention of a hall full of scientists. In the Star Trek episode Wolf in the Fold, when an evil being assumes control of the ship, Spock orders the ship computer to "compute to the last digit the value of &pi;". The computer, of course, gets caught up in an infinite loop and is rendered unusable to the enemy.

&pi; enthusiasts may celebrate March 14 (3/14) as the Pi Day, and July 22 (22/7) as the Pi Approximation Day.

Some people attempt to memorize many digits in &pi;. The current world record is held by Akira Haraguchi, who in 2005 recited 83,431 decimals from memory. The semi-serious field of piphilology comprises the use of &pi; mnemonics, such as the phrase:

How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics!

Counting the number of letters in each words gives the decimals 3.14159265358979. Some enthusiasts have written poems encoding hundreds of digits.

Nobel Prize laureate Richard Feynman, known for his interest in mental calculation, once remarked that he wanted to memorize &pi; to the 767:th decimal place. The decimals 762 through 767 are all nines, allowing him to finish the recitation with "...nine, nine, nine, nine, nine, nine, and so on".