Solve Limit Tend To $\pi$, From Length Of Circle

83 Views Asked by At

Computing the length of a semicircle of radius 1. It's divided in $2^x$ equal arcs, I find the following formula for the total length of the chords created:

$$L=2^{x+1} \sin \left( \frac{45}{2^{x-1}} \right)$$

When $x \to \infty$ we see, geometrically, that this expression tends to be the length of the circle:

$$2^{x+1} \sin \left( \frac{45}{2^{x-1}} \right)$$

My goal is to define $\pi$ as the value of that expression when $x \to \infty$ (the limit). But how can I rigorously prove that this limit exists and that the expression tends to be the length of the circle? In other words, how can I write rigorously the geometric ideas?

Note: The number $\frac{45}{2^{x-1}}$ is in degrees.

3

There are 3 best solutions below

1
On

Well, if you define $45^{\circ}$ as equal to $\displaystyle\frac{\pi}{4}$ radians (equivalent to defining $\pi$ by $\text{circumference} = \pi d$), the limit's existence and value follows:

$$\lim_{n\to\infty}2^{n+1}\sin\bigg(\frac{45^{\circ}}{2^{n-1}}\bigg)=\lim_{n\to\infty}2^{n+1}\sin\bigg(\frac{\pi}{4\cdot2^{n-1}}\bigg)=\lim_{n\to\infty}\pi\cdot\frac{\displaystyle\sin\big(\frac{\pi}{2^{n+1}}\big)}{\displaystyle\frac{\pi}{2^{n+1}}}$$ $$=\pi\lim_{\frac{\pi}{2^{n+1}}\to 0^{+}}\frac{\displaystyle\sin\big(\frac{\pi}{2^{n+1}}\big)}{\displaystyle\frac{\pi}{2^{n+1}}}=\boxed{\pi}$$

0
On

Yes, your formula does converge to $\pi$, as Joshua Wang's answer nicely shows. However, in the comments there's some discussion about the problem of determining the value of $\sin \left(\frac{45°}{2^{x-1}}\right)$ without using a formula based on radians, since they are based on $\pi$.

The traditional approach is to simply bisect an angle whose sine is known from geometry (eg 30°, 45°, or 60°), and calculate the sine of the resulting half-angle. Algebraically, that comes down to solving a quadratic.

It can be shown that for any angle $\theta$, $$\cos 2\theta = \cos^2\theta - \sin^2\theta$$ Thus $$\sin^2\theta = (1-\cos 2\theta)/2$$ $$\sin^2\theta = (1-\sqrt{1-\sin^2 2\theta})/2$$ Or $$\sin^2(\theta/2)=(1-\sqrt{1-\sin^2\theta})/2$$

So now we have a method of determining $\sin^2(\theta/2)$ from $\sin^2\theta$. Unfortunately, it involves taking a square root at every step (and an extra one to get the sine from its square).

This method can be used to quickly get a few decimals of $\pi$, but when we run this algorithm on a computer we'll soon run into arithmetic errors, mostly due to those nested square roots. Eg, using standard double-precision floating point numbers, which have 53 bits of precision, we can get a little over 26 bits of $\pi$, which is around 8 decimal digits.

Here's a short Python program to illustrate:

from math import sqrt

y2 = 1 / 2
m = 4
for i in range(1, 20):
    y = sqrt(y2)
    print(i, m * y)
    y2 = (1 - sqrt(1 - y2)) / 2
    m *= 2

Output

1 2.8284271247461903
2 3.061467458920718
3 3.121445152258053
4 3.1365484905459406
5 3.140331156954739
6 3.141277250932757
7 3.1415138011441455
8 3.1415729403678827
9 3.141587725279961
10 3.141591421504635
11 3.141592345611077
12 3.1415925765450043
13 3.1415926334632482
14 3.141592654807589
15 3.1415926453212153
16 3.1415926073757197
17 3.1415929109396727
18 3.141594125195191
19 3.1415965537048196

(Click here for a live version of the script, running on the SageMathCell server).

It works well up to the 14th step, but then the approximations get worse. We could use various tricks to reduce those errors, or use numbers with more precision, but there are much faster ways to compute $\pi$.


FWIW, here's a link to a similar pi calculator I wrote a few years ago, which uses $\tan$ rather than $\sin$, and which avoids the square roots. There are a couple of other pi programs on that page, including a link to the very fast Salamin-Brent algorithm. https://chat.stackoverflow.com/transcript/message/33735078#33735078


One simple way to improve the precision is to eliminate the subtraction in the numerator.

$$\sin^2(\theta/2)=\frac{1-\sqrt{1-\sin^2\theta}}2$$ So $$\sin^2(\theta/2)=\left(\frac{1-\sqrt{1-\sin^2\theta}}2\right) \left(\frac{1+\sqrt{1+\sin^2\theta}}{1+\sqrt{1-\sin^2\theta}}\right)$$ $$=\frac{\sin^2\theta}{2(1+\sqrt{1-\sin^2\theta})}$$

Our Python code becomes

from math import sqrt

y2 = 1 / 2
m = 4
for i in range(1, 30):
    y = sqrt(y2)
    print(i, m * y)
    y2 /= 2 * (1 + sqrt(1 - y2))
    m *= 2

Output

1 2.8284271247461903
2 3.0614674589207183
3 3.1214451522580524
4 3.1365484905459393
5 3.140331156954753
6 3.141277250932773
7 3.1415138011443013
8 3.1415729403670913
9 3.1415877252771596
10 3.1415914215111997
11 3.1415923455701176
12 3.1415925765848725
13 3.1415926343385627
14 3.1415926487769856
15 3.141592652386591
16 3.141592653288993
17 3.141592653514593
18 3.141592653570993
19 3.1415926535850933
20 3.141592653588618
21 3.1415926535894996
22 3.1415926535897203
23 3.1415926535897754
24 3.141592653589789
25 3.1415926535897927
26 3.1415926535897936
27 3.1415926535897936
28 3.1415926535897936
29 3.1415926535897936

And now the value of $\pi$ is correct upto the 2nd last digit, but notice that the convergence slows down after step 20 or so. We're winning the battle against the limited precision of floating-point numbers, but it's a hard struggle. ;)

0
On

Converted to radians, we have $$L_x=2^{x+1} \sin \left(\frac{\pi }{2^{x+1}}\right)$$ Use the double inequality $$t-\frac{t^3}{6} \leq \sin(t) \leq t$$ which makes $$\pi -\frac{\pi ^3}{24 \times 4^x}\leq L_x \leq \pi$$ So, if you need $k$ significant figures $$x_{(k)}= -\frac{\log \left(\frac{3\ 10^{-k}}{\pi ^2}\right)}{2 \log (2)}-\frac{3}{2}$$ For $k=10$, then $x=16$ and computing $$L_{16}=131072 \sin \left(\frac{\pi }{131072}\right)=\color{red}{3.141592653}29$$