Saturday, June 20, 2020 ... Deutsch/Español/Related posts from blogosphere

Why \(\pi\neq 3.1446\)

Despite the absence of any university (or liberal high school) education, a friend of mine is very intelligent and kind of educated. Even when I am rather keen on e.g. a portion of organic chemistry, it seems obvious to me that he actually knows it better than I do. But one of his favorite discoveries on the web is this

Harry Lear's page about an alternative value of \(\pi\)
which claims that all mathematicians are wrong and the actual value of \(\pi\) is approximately \[ \pi = \frac{4}{\sqrt{\varphi}} \approx 3.144605511 \] instead of the usual \(\pi\approx 3.14159265358979\dots\). Here, \(\varphi=(1+\sqrt 5)/2\approx 1.618034\) is the golden ratio. Of course, it's been proven that \(\pi\) is not algebraic. OK, I must admit that this belief partly makes me smile, partly annoys me. When I was 10, I memorized 100 digits of \(\pi\) and I can still tell you what they are at 3 am. At roughly the same time, I also used Commodore 64 to calculate 38000 digits of \(\pi\) according to Machin's (totally precise) formula\[ \pi = 16 \,{\rm atn} \frac{1}{5} - 4 \,{\rm atn} \frac{1}{239} \] whose proof I understood a year later (see Proving Machin's formula here). There are tons of other methods that allow you to calculate \(\pi\) with any accuracy you want. Will I persuade him that \(\pi\neq 3.1446\) and Mr Lear is just an unwise king who harasses his best, third daughter and can't even spell the word "real"? ;-)



OK, at the end, I do believe that the least pedagogically demanding way to calculate \(\pi\) using a simple calculator – or maybe just pen and paper – is via the circumference of a polygon. I just found a page saying that this method was already known to Archimedes. He wasn't just an ancient spoiled brat who liked to have a bath.



OK, let's consider a polygon inscribed in a circle of radius one.



The number \(\pi\) is by definition the ratio of the circumference of the circle and its diameter; equivalently, it's the ratio of the circumference of the upper semicircle and the radius (and the radius is one). We start with the hegagon on the picture where the ratio is simple. The hexagon has six edges whose length happens to be the same as the radius, one, so its circumference is six and one-half of it is \(3\), the zeroth approximation for \(\pi\).

Here is a simple systematic procedure to calculate 10 or 20 correct digits of \(\pi\) just with addition, subtraction, multiplication, division, and the square root (which is needed because we use the Pythagorean theorem). The circumference of the circle is clearly the limit of the circumference of the polygon of \(p\)-gon, where \(p\to\infty\). We will choose\[ p = 6 \cdot 2^n \] so we will look at the circumference of a hexagon, 12-gon, 24-gon, 48-gon, and so forth. The edges of these polygons may be calculated recursively from each other via the Pythagorean theorem. This picture is arguably enough to explain the whole procedure:



Take the last known edge of the polygon; in the initial case of the hexagon, it is \(a=1\). Divide it to one-half and see a right triangle with the hypotenuse equal to \(1\), the circle's radius, and one (horizontal) leg that is \(a/2\). By the Pythagorean theorem, the other leg is\[ b = \sqrt{ 1 - \frac{a^2}{4} }. \] On the picture, this leg is the majority of the vertical line interval \(OQ\) that goes from \(O\) to the intersection inside the plus-cross. I don't even want to name the intersection because we won't need it much. OK, the small upper remainder of this line interval \(OQ\) is clearly \(1-b\) and we may calculate the "new" edge which replaces \(a/2\), namely\[ \frac{a_{\rm new}}{2} = \sqrt{\frac{a^2}{4} + (1-b)^2}. \] from a Pythagorean triangle applied to a small upper horizontal triangle \(BQ\)-intersection. OK, it's \(BQP\), \(P\) was the name of the intersection LOL. And we have determined the edge of the finer polygon (it's the 12-gon after the first step whose edge is \(0.51763809\approx 3.105828541 / 6\) or so). We may insert this \(a_{\rm new}\) as the new \(a\) into the procedure which may be repeated as many times as you want. Note that \(a\) is approximately halving after each step so we must multiply it by an extra \(2\) after each step to keep our estimate of \(\pi\). Simple. Here is the code in Mathematica:
steps = 5; digits = 10;
f = {}; k = 3; a = 1; For[n = 0, n <= steps, n++,
f = f~Join~{k*a};
Print[k*a];
b = N[Sqrt[1 - a*a/4], digits];
a = N[Sqrt[a*a/4 + (1 - b)*(1 - b)], digits];
k = k*2;
];
quo = (f[[-1]] - f[[-2]])/(f[[-2]] - f[[-3]])
N[f[[-1]] + (f[[-1]] - f[[-2]])*quo/(1 - quo), digits]
OK, I chose just step=5 iterations of our procedure. We compute everything numerically with a 10-digit precision although Mathematica allows any precision as well as the symbolic precise form of all the numbers that includes a lot of nested square roots. Note that the for-cycle is repeated "step" times. In each step, we multiply the number of edges along the semicircle (originally k=3) by two, calculate \(b\) from the old \(a\) by the simple Pythagorean procedure that I explained a minute ago, and calculate the new \(a\) from the freshly calculated \(b\) as well as the old \(a\). You may easily increase the precision of the printed numbers k*a as well as the number of steps. With our 5 iterations and 10 digits, the cycle prints the following numbers:
3
3.105828541
3.132628613
3.139350203
3.141031951
3.141452472
Excellent, the numbers converge to the usual \(\pi\) but you would need many steps to find 10 digits of \(\pi\). Fortunately, your humble correspondent can give you a great improvement of this procedure which quickly produces a much better precision. I think that this improvement of mine wasn't known to Archimedes but it would be comprehensible to Archimedes.

The trick is that the increments are getting smaller and smaller – and in fact, approximately but almost precisely in the limit, the increments make up a decreasing geometric series. One of the last lines of my code prints the ratio of subsequent differences\[ \frac{f_{-1} - f_{-2}}{f_{-2} - f_{-3}} \approx 0.25 \] The last increment (the last number minus the previous one) divided by the previous increment (the second last number minus the third last number) is clearly approaching \(q=0.25\); one could undoubtedly prove this value of the limit analytically. You may approximate the expected effect of infinitely many improvements by the formula for the geometric series. You just pick the last approximation of \(\pi\) that we had and add \[ (f_{-1} - f_{-2}) \frac{q}{1-q} \] where \(q/(1-q)\) comes from the usual formula for geometric series. Well, with the previous modest 5 iterations, my algorithm prints \(0.25005\) as the ratio (which goes to \(1/4\)) and \[ \pi \approx 3.14159268 \] which is correct except for the last digit. It is clear that the circumferences of the inscribed polygons understate the value of \(\pi\) but my corrected value (with the geometric series added) overstate the value of \(\pi\). step=3 iterations are therefore actually enough to see that \(\pi \lt 3.1416\), safely excluding the silly claim that \(\pi\approx 3.1446\).

If you choose step=25 and digits=35, the last polygon iteration is
3.141592653589793110966783093031637
which means that about 16 significant figures are correct while my geometric-series-corrected value of \(\pi\) is
3.14159265358979323846264338327953
which has about 32 correct significant digits. It is no coincidence that the precision in the "number of digits" has doubled by my geometric-series correction. My single geometric-series correction improves the precision approximately equally as doubling the number of iterations. (I could design a more convoluted hierarchical procedure that changes this doubling to quadrupling, octupling etc., and by a nested combination of these steps, I could get a much more quickly converging method to calculate \(\pi\).)

If a TRF reader has any doubts that the usual 3 or 5 or 30 figures of \(\pi\) are correct and if the reader understands the proof well enough (which only requires the Pythagorean theorem and geometric series), I invite her to repeat the procedure (at least 3 iterations or many more with a calculator and many more with a programming language) to get sure that she has calculated \(\pi\) herself and eliminated every doubt about the validity of the calculation. It's rather important to be "really internally certain" about such fundamental things – so that you don't have to rely on "he said she said" when it comes to such fundamental questions of mathematics (or science).


P.S.: I found Mr Lear's presentation rather incoherent and it seems like a waste of time to dig deeper but I do believe that his "proof" of the clearly invalid statement goes as follows: Invent a random (wrong) identity claiming that \(\pi\) is equal to a simple algebraic expression; measure both using a tape; get an approximately the same result (with the 1% or 0.1% precision) and leverage the agreement to claim that your identity is precise at 40 digits or totally precise LOL. The stupidity of this "strategy to prove a wrong statement" is really beyond imagination but I do think that lots of people "like" similar total crap because the insertion of the "measurement" makes the "proof" more empirical and more scientific. Not really, it is what makes it BS. The value of \(\pi\) is a purely mathematical question which is why one can – and should – determine the answer by "pure thought", without any "experimentation" whatsoever. Also, you might consider approximate numerical "proofs" but then you need to be careful about your actual error margin.

Add to del.icio.us Digg this Add to reddit

snail feedback (0) :

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-1828728-1', 'auto'); ga('send', 'pageview');