9
$\begingroup$

This seems counterintuitive, but $22/7$ is closer to $\pi$ than $3.14=314/100$ which has a significantly greater denominator.

Why is $22/7$ a better approximation for $\pi$ than $3.14$?

This has important implications: e.g. Should "$\pi$-day" be the $14^{th}$ of March or $22^{nd}$ of July?

  • 4
    See http://en.wikipedia.org/wiki/Continued_fraction#Best_rational_approximations2010-08-09
  • 21
    Let me try to fix your intuition: when you restrict yourself to denominators which are powers of 10, you make the problem of rational approximation unnecessarily difficult because you added a constraint that doesn't need to be there. You can reach this conclusion without knowing anything about continued fractions.2010-08-09
  • 3
    3/1 is closer to X than 3.001 = 3001/1000 which has a higher denominator , where X = 3.000000000000014.2010-08-09
  • 2
    Actually 3.14 = 157/50.2010-08-09
  • 7
    @Qiaochu: thanks for that, I guess 22/7 is going to be closer to a whole range of real numbers than both 314/100 and 315/100. One of them happens to be pi.2010-08-09
  • 2
    @T: I appreciate the point you're trying to make, but in that case, 3001/1000 would not be the closest approximation (with denominator 1000) to your number. @KennyTM: The point I was trying to make here is that 3.14 must be within 1/100 of pi.2010-08-20
  • 1
    I think the accepted answer (of Vaughn) is flawed! (See my comment to that answer).2010-08-20
  • 4
    That is not an important implication at all.2010-08-21
  • 1
    @Kevin: Who was that comment directed to? What do you mean by it?2010-08-21
  • 1
    @Moron: Sorry, I was referring to the last sentence in the original post.2010-08-22
  • 1
    @Kevin: I see. I believe Douglas was only joking :-)2010-08-22
  • 1
    Can someone explain why @Paxinum answer is not correct?2011-08-22
  • 1
    Yes; that was just an attempt at a joke. @Louis: (a) My question clearly implied that I already knew it to be true, and (b) Compare this to Q: "why is the sky blue?" A: "just look at it; it's blue." [The main question was more between-the-lines; i.e. property X seems counter-intuitive; how can I fix my intuition so as to not walk into property X traps in the future (be they related to \pi or not).]2011-08-22

4 Answers 4

6

It only seems odd to you because you are used to representing numbers in base 10. What if you used base 7?

  • 18
    You'd be constantly confused in supermarkets?2010-08-19
  • 1
    7 is still smaller than 100 in base 7...2010-08-20
  • 0
    Yes, but 3.1 would look nicer than 313/101.2010-08-21
28

Well, just measure $|\pi - 22/7|$ and $|\pi-3.14|$ ...

  • 2
    -1 for smartass answer2010-12-10
  • 0
    measure or calculate?2014-11-06
21

Just for fun...

Here is a proof that $\displaystyle \frac{22}{7}$ is a better approximation than $\displaystyle 3.14$.

First we consider the amazing and well known integral formula for $\displaystyle \frac{22}{7} -\pi$ (for instance see this page: Proof that 22/7 exceeds pi).

$$\int_{0}^{1}\frac{x^{4}(1-x)^{4}}{1+x^2}dx = \frac{22}{7} -\pi$$

We will to show that

$$0 < \frac{22}{7} -\pi < \pi - 3.14$$

That $\displaystyle 0 < \frac{22}{7} - \pi$ follows trivially from the above integral.

We will now show that

$$\int_{0}^{1}\frac{x^{4}(1-x)^{4}}{1+x^2}dx < \frac{1}{700}$$

We split this up as

$$\int_{0}^{1}\frac{x^{4}(1-x)^{4}}{1+x^2}dx = \int_{0}^{\frac{1}{2}}\frac{x^{4}(1-x)^{4}}{1+x^2} + \int_{\frac{1}{2}}^{1}\frac{x^{4}(1-x)^{4}}{1+x^2}dx$$

The first integral can be upper-bounded by replacing $\displaystyle x$ in the denominator with $\displaystyle 0$ and the second integral can be upper-bounded by replacing $\displaystyle x$ in the denominator with $\displaystyle \frac{1}{2}$.

Thus we have that

$$\int_{0}^{1}\frac{x^{4}(1-x)^{4}}{1+x^2}dx < \int_{0}^{\frac{1}{2}}x^{4}(1-x)^{4}dx + \int_{\frac{1}{2}}^{1} \frac{4x^{4}(1-x)^{4}}{5}dx $$

Now $$\int_{0}^{\frac{1}{2}}x^{4}(1-x)^{4}dx = \int_{\frac{1}{2}}^{1}x^{4}(1-x)^{4}dx$$ as $\displaystyle x^4(1-x)^4$ is symmetric about $\displaystyle x = \frac{1}{2}$

It is also known that $$\int_{0}^{1}x^{4}(1-x)^{4}dx = \frac{1}{630}$$ (see the above page again)

Thus we have that

$$\int_{0}^{1}\frac{x^{4}(1-x)^{4}}{1+x^2}dx < \frac{1}{2*630} + \frac{4}{5*2*630} = \frac{1}{700}$$

Thus we have that

$$\frac{22}{7} - \pi < \frac{1}{700}$$

i.e

$$2\pi > 2(\frac{22}{7} - \frac{1}{700})$$

$$2\pi > \frac{22}{7} + \frac{22}{7} - \frac{2}{700}$$

$$2\pi > \frac{22}{7} + \frac{2200}{700} - \frac{2}{700}$$

$$2\pi > \frac{22}{7} + \frac{2198}{700}$$

$$2\pi > \frac{22}{7} + \frac{314}{100}$$

Thus we have that

$$0 < \frac{22}{7} - \pi < \pi - \frac{314}{100}$$

18

It has to do with the continued fraction expansion of $\pi$. Suppose $[a_1, a_2, \ldots]$ is the continued fraction of an irrational number $\alpha$ -- that is, if $a_n$ is the (essentially unique) sequence of natural numbers such that if we define partial convergents by $x_1 = a_1$, $x_2 = a_1 + 1/a_2$, $x_3 = a_1 + 1/(a_2 + 1/a_3)$, $x_4 = a_1 + 1/(a_2 + 1/(a_3 + 1/a_4))$, and so on, then $\alpha = \lim_{n\to\infty} x_n$. Then the partial convergents $x_n$ are rational numbers that approximate $\alpha$ better than anything that is not a partial convergent, in the following sense: a rational number $\frac pq$ satisfies the inequality $|\alpha - \frac pq| < \frac 1{2q^2}$ if and only if $\frac pq$ is one of the convergents $x_n$. (One could, of course, come up with different notions of what constitutes a "good" approximation.)

The continued fraction expansion of $\pi$ is $[3,7,15,1,292,1,1,\dots]$, so the first few convergents are $3$, $\frac{22}{7}$, $\frac{333}{106}$, $\frac{355}{113}$, etc. Thus $\frac{22}{7}$ is a better approximation than $\frac{314}{100}$ (in the above sense) because it appears in the list of partial convergents, while $\frac{314}{100}$ does not.

Incidentally, the approximation $x_n$ is best when the coefficient $a_{n+1}$ is quite large, so the size of $a_5 = 292$ means that $x_4 = \frac{355}{113}$ is a particularly good approximation.

At the risk of self-promotion, I wrote a brief exposition of all this in a bit more detail -- you can find it on my website if you're interested, at http://www.math.psu.edu/climenha/contfrac.html.

  • 1
    And of course, as Kaestur's comment points out, Wikipedia has all this and much, much more.2010-08-09
  • 2
    @Vaughn: It's still worthwhile to have it here! I posted the link just as a quick reference for anyone who wants to write a real answer.2010-08-09
  • 1
    Thanks for that -- secretly I already knew about continued fractions, but didn't feel that answered the "why" question. However, I didn't want to deny the future reader the pleasure of discovering continued fractions (which 100% should be mentioned when this question is asked) by adding a note to the question.2010-08-20
  • 1
    Since you are using regular continued fractions, why “essentially unique?” The a_n sequence is unique, is it not?2010-08-20
  • 6
    Wait a minute! This is inaccurate: "22/7 is better approximation than 314/100 because 22/7 appears in the CF while 314/100 does not". The more accurate statement about continued fractions is "if m/n is a convergent, then it is a closer approximation than a/b, where (a,b) = 1 and b <= n". The restriction on denominator is important. For instance 31415/10000 is a better approximation than 22/7 to pi. I don't think it is a convergent of the CF though.2010-08-20
  • 1
    @Christopher: "essentially unique" because, for example, 3/2 = [1; 2] = [1; 1, 1]. There's a slight ambiguity with rational numbers unless you adopt further conventions on exactly which representations we consider.2010-08-21
  • 1
    @Moron: I suppose I didn't give a precise definition of "better approximation". I was really thinking in terms of the quantity |nx - m|, where m/n is the approximation to x, rather than the quantity |x - m/n|. That is, we try to minimise the error multiplied by the denominator (or perhaps the square of the denominator). I think then there are stronger statements available, and it may be the case that 22/7 is a better approximation (in this sense) than 31415/10000. (I haven't checked, though... I could be wrong.)2010-08-21
  • 2
    @Vaughn: Maybe, but I don't think that really answers the question that was asked.2010-08-21
  • 1
    @Vaughn: Also, I am not sure of your claim about |nx -m|. For instance for m/n=22/7 you get the difference to be approx 0.008... Now if you look at the decimal places of pi, there are locations where at least 3 consecutive zeroes appear. So if you choose n to be the appropriate power of 10, you will get a better approximation and it seems unlikely that that power of 10 will be the denominator of a convergent (of course, no proof).2010-08-21
  • 1
    @Vaughn: In fact consider 688/219. This is a better approximation (defined in terms of |nx -m|) than 22/7. The way I got it was to add numerators and denominators (separately) of two consecutive convergents (333+355)/(106+113).2010-08-21
  • 1
    Right, you got me curious, so I checked the write-up I did on this a while back. Theorem 19 in Khinchin's book "Continued Fractions" says that if m/n is a rational approximation satisfying |x - m/n| < 1/(2n^2), then m/n appears as a convergent. So all good approximations appear as convergents if we quantify "good approximation" by multiplying the error term together with the square of the denominator. As for whether this really answers the question that was asked, the OP specifically mentioned the size of the denominators, so I think it's only fair to bring them in somehow.2010-08-21
  • 2
    @Vaughn. Only a mind reader would infer that that is the definition of 'better approximation' from what you have written in your answer. Besides, it is a totally unnatural definition of 'better approximation', IMO. I believe OP (and others who answered this) were only looking to compare the error terms in determining which is better approximation. Yes OP mentioned denominators, but this is just convoluted, IMO. Anyway, I suggest you edit your answer and make it clear.2010-08-21
  • 1
    @Moron: In fact, when I wrote my original answer I didn't remember what the precise result was, only that there was some definition of "better approximation" for which some such result was true, so you're absolutely right that my original answer doesn't contain enough information to deduce that this definition is what was meant. I've edited accordingly.2010-08-21
  • 1
    I believe that considering the size of the denominator is very natural in quantifying how "good" an approximation is. The original question was provoked by the fact that a larger denominator does not always lead to a smaller error term. Thus quality of the approximation should correspond to both small error term and small denominator. There are certainly various ways to quantify it, so this is by no means the only natural definition, but it leads to a very nice theorem, so I wouldn't call it "totally unnatural". It's actually quite a standard notion in Diophantine approximation...2010-08-21
  • 1
    @Vaughn: Size of denominator is natural, I agree, but I don't think I have heard about the size of the square of the denominator. For questions of such elementary level, I would consider it unnatural, though. Can you please point me to some reference which considers the square of the denominator multiplied by the error term as a measure of approximation? Thanks.2010-08-21
  • 1
    @Moron: "An Introduction to Diophantine Approximation", by JWS Cassels (Cambridge, 1957) defines the Diophantine class of a number as the highest power of the denominator for which infinitely many "good" approximations (error term times denominator to that power is less than 1) exist. Then there is a distinction between Diophantine numbers, which have finite Diophantine class, and Liouville numbers, which have infinite Diophantine class. I am not a number theorist, but I believe these notions are standard in that field. (Certainly they have important applications to dynamical systems.)2010-08-21
  • 1
    @Vaughn: Thanks! I will check out that book.2010-08-21
  • 0
    I've just stumbled back on this thread from elsewhere and noticed that it looks somewhat disjointed, as Aryabhata's username has changed from what it was when we had this exchange of comments (at the time it was "Moron")... I figured I should add this by way of historical explanation so that the exchange would make a little more sense, since I can't go back and edit my comments to use Aryabhata's current username.2012-03-14