# Is $22/7$ equal to the $\pi$ constant? [duplicate]

When I calculate the value of $22/7$ on a calculator, I get a number that is different from the constant $\pi$.

Question: How is the $\pi$ constant calculated? (The simple answer, not the Wikipedia calculus answer.)

-

## marked as duplicate by Jonas Meyer, t.b., Guess who it is., Sivaram Ambikasaran, Grumpy ParsnipDec 21 '11 at 17:20

No, pi is not equal to $22/7$. –  Mikko Korhonen Dec 21 '11 at 15:45
Indeed; $\pi$ cannot be expressed as the ratio of two integers. There are a number of methods for computing $\pi$, however. –  Guess who it is. Dec 21 '11 at 15:49
As a primary school pupil in England, I was told that $\pi = \frac{22}{7}$. This was bad education. The rational number $\frac{22}{7}$ is a commonly used APPROXIMATION for $\pi,$ useful in some practical calculations where absolute accuracy is not essential. But $\pi$ is an irrational (even transcendental) number, so is certainly not equal to the rational number $\frac{22}{7}.$ The calculation of $\pi$ to any desired degree of accuracy is the subject of much mathematics, and I am sure you will receive informative answers here. –  Geoff Robinson Dec 21 '11 at 15:51
When I was in grade school, our teacher taught us that $\pi$ was exactly $\frac{22}7$, and that its decimal expansion did not repeat. My first mathematical proof ever was to convince myself and a friend that the decimal expansion of any rational number must terminate or repeat. –  Thomas Andrews Dec 21 '11 at 16:02
@Geoff Robinson: I suspect the prevalence of stories such as yours comes from bad writing (textbook authors, at least in pre-calculator times, saying something like "In the problems below, use $\pi = \frac{22}{7}$) in conjunction with clueless teachers. That is, teachers see $\pi = \frac{22}{7}$ written in a book and take the statement out of context, and textbook authors write something like this without realizing the possible consequences of their poor wording. –  Dave L. Renfro Dec 21 '11 at 17:06

$\pi$ is not equal to $22/7$. As a matter of fact, it cannot be expresses as a ratio of two whole numbers at all. It is a transcendental number, i.e. not algebraic, i.e. there exists no algebraic equation $\displaystyle\sum_{i=0}^Na_ix^i = 0$ that has $\pi$ as its root. We can only approximate the value of $\pi$. This has been proven by Ferdinand von Lindemann in the 19th century. I suggest you read more about transcendental numbers to get more familiar with the concept.

-
Thanks, you are right. I wrote a paper on the transcendentals and thought I had remembered who proved it, but looks like I got things messed up. –  user12205 Dec 21 '11 at 16:52
Looks like my math teachers in high school were way wrong. Thanks everyone for the insight. –  user14993 Dec 22 '11 at 16:11

In answer to your second question, NOVA has an interactive exhibit that uses something like Archimedes method for approximating $\pi$. Archimedes method predates calculus, but uses many of its concepts.

Note that "simple" and "calculus" are not disjoint concepts.

-

Pi ($\pi$) is a mathematically defined, a priori constant, one definition being the ratio of the circumference of a circle to its diameter. In some places, it also has (had) a (mathematically inaccurate) legal definition. The mathematical definition is universally agreed upon. In the decimal number system, it has an infinite decimal expansion, and so cannot be represented (mathematically) exactly as a decimal number (in a finite amount of space). For most non-mathematical purposes, (e.g. architecture, agriculture), accuracy past a few decimal places is not necessary. For astronomy, aviation & aeronotics, more accuracy is usually needed -- maybe ten or twenty decimal places (please correct me if I'm wrong). The estimation of $\pi$ has a very long history (compared to the span of recorded history and of the history of mathematics). There are in turn many books on Pi. For example, The Joy of Pi & A History of Pi to name a few.

There are even more methods of calculating $\pi$, including, amazingly, some relatively recent developments. Perhaps the easiest method, if you want to avoid advanced mathematics (and calculus is too advanced) and take a few things on faith, is to use simple geometry and rely on a trigonometry function (which could be argued is circular reasoning since we will use the fact that $360$ degrees equals $2\pi$ radians). You can use, for example, the area of a regular $n$-gon (for $n$ large) with vertices on a circle of radius $1$ as an approximation for $\pi$. This area is then $$A_n=n\cdot\sin\frac{\theta_n}{2}\cos\frac{\theta_n}{2}=\frac{n}{2}sin\theta_n \qquad\text{for}\qquad \theta_n=\frac{360\text{ deg}}{n}=\frac{2\pi}{n}\text{ (rad)}$$ (draw a triangle from the center to two adjacent vertices, bisect this triangle by a line from the center to the midpoint of the vertices, calculate lengths, the area of this whole triangle, and multiply by the number of these which is $n$). With a little calculus knowledge, we can also verify that in fact (when $\theta_n$ is in radians!), $$\lim_{n \to \infty}A_n= \lim_{n \to \infty}\frac{sin\frac{2\pi}{n}}{\frac{2}{n}}= \lim_{x \to 0}\frac{\sin\pi x}{x}=\pi\;.$$ A more recently found formula (Bailey–Borwein–Plouffe, 1995) whose statement requires not so much math is $$\pi=\sum_{n=0}^{\infty} \left( \frac{4}{8n+1} - \frac{2}{8n+4} - \frac{1}{8n+5} - \frac{1}{8n+6} \right) \left( \frac{1}{16} \right)^n$$ which converges very quickly to the answer, i.e., not very many terms are needed to get any given desired accuracy, since as can be seen, the $n$th term is (much) less than $16^{-n}$, so that the first $n$ terms easily give $n$ hexadecimal (base 16) digits, or $n\log{16}\simeq{1.2n}$ decimal places of accuracy.

The (early) history of approximations to $\pi$ can also be (roughly) traced by the its (various) continued fraction expansions, e.g. $\pi = 3 + \frac{1}{7+}\frac{1}{15+}\frac{1}{1+}\frac{1}{292+}\dots$, with the number of terms used increasing (roughly!) with historical time; so $3$ is the simplest approximation, then $22/7$, then $333/106$, etc.

-

As already mentioned by others, $\pi \neq 22/7$. To answer your question, how to compute digits of $\pi$, $\pi$ can be obtained as a limit of sequence of numbers which can be computed to great accuracy.

For instance, the Madhava-Leibniz formula can be used to compute the digits of $\pi$. In fact, it was one of the first ways to compute the digits of $\pi$. $$\pi = 4 \times \left(1 - \frac13 + \frac15 - \frac17 + \frac19 - \cdots \right)$$ If we truncate the above series at $n$-terms, i.e. if we denote $$x_n = 4 \times \left(1 - \frac13 + \frac15 - \frac17 + \frac19 - \cdots + (-1)^{n} \frac1{2n+1}\right)$$ error analysis will give you that the $|| x_n - \pi|| \leq \left( \frac2n \right)$. The convergence of this series is hence slow. If you want an accuracy upto $2$ digits, you need to take of the order of $200$ terms.

There are other well-known series/ products which converge to $\pi$.

-