User:Beneficii/pi

Initial values:

$$\begin{align} P(1) & = 2 \sqrt{2} \\ X(1) & = 0 \\ Y(1) & = 1 \\ D(1) & = \sqrt{2} \end{align}$$

General formulas:

$$\begin{align} & integer\,\, n > 1;\, real\,\, 0 \le X(n), Y(n) \le 1 \\ \pi & = \lim_{n \to \infty} P(n) \\ P(n) & = 2^n D(n) \\ D(n) & = \sqrt{(X(n) - 1)^2 + Y(n)^2} \\ Y(n) & = \sqrt{1 - X(n)^2} \\ X(n) & = (A(n)^2 + 1)^{-1/2} \\ A(n) & = -M(n)^{-1} \\ M(n) & = - Y(n-1)(1 - X(n-1))^{-1} \end{align}$$

Resolving Y(n-1) in M(n):

$$\begin{align} M(n) & = - Y(n-1)(1 - X(n-1))^{-1} \\ & = - \sqrt{1 - X(n-1)^2}(1 - X(n-1))^{-1} \\ & = - \sqrt{(1 + X(n-1))(1 - X(n-1))}(1 - X(n-1))^{-1} \\ & = - (1 + X(n-1))^{1/2} (1 - X(n-1))^{-1/2} \end{align}$$

Resolving M(n) in A(n):

$$\begin{align} A(n) & = -M(n)^{-1} \\ & = - \left [ - (1 + X(n-1))^{1/2} (1 - X(n-1))^{-1/2} \right ]^{-1} \\ & = (1 - X(n-1))^{1/2} (1 + X(n-1))^{-1/2} \end{align}$$

Resolving A(n) in X(n):

$$\begin{align} X(n) & = (A(n)^2 + 1)^{-1/2} \\ & = \left ( \left [ (1 - X(n-1))^{1/2} (1 + X(n-1))^{-1/2} \right ]^2 + 1 \right )^{-1/2} \\ & = \left ( \frac{1 - X(n-1)}{1 + X(n-1)} + 1 \right )^{-1/2} \\ & = \left ( \frac{2}{1 + X(n-1)} \right )^{-1/2} \\ & = \sqrt{\displaystyle \frac{1 + X(n-1)}{2}} \end{align}$$

Resolving X(n) in Y(n):

$$\begin{align} Y(n) & = \sqrt{1 - X(n)^2} \\ & = \sqrt{\displaystyle 1 - \left ( \sqrt{\displaystyle \frac{1 + X(n-1)}{2}} \right )^2} \\ & = \sqrt{\displaystyle \frac{1 - X(n-1)}{2}} \end{align}$$

Resolving X(n) and Y(n) in D(n):

$$\begin{align} D(n) & = \sqrt{(X(n) - 1)^2 + Y(n)^2} \\ & = \sqrt{\displaystyle \left [ \left ( \sqrt{\displaystyle \frac{1 + X(n-1)}{2}} \right ) - 1 \right ]^2 + \left (\sqrt{\displaystyle \frac{1 - X(n-1)}{2}} \right )^2} \\ & = \sqrt{\displaystyle \left ( \frac{1 + X(n-1)}{2} - 2\sqrt{\displaystyle \frac{1 + X(n-1)}{2}} + 1 \right ) + \frac{1 - X(n-1)}{2}} \\ & = \sqrt{\displaystyle \frac{3 + X(n-1)}{2} - 2\sqrt{\displaystyle \frac{1 + X(n-1)}{2}}+ \frac{1 - X(n-1)}{2}} \\ & = \sqrt{\displaystyle 2 - 2\sqrt{\displaystyle \frac{1 + X(n-1)}{2}}} \\ & = \sqrt{2} \sqrt{\displaystyle 1 - \sqrt{\displaystyle \frac{1 + X(n-1)}{2}}} \end{align}$$

Resolving D(n) in P(n):

$$\begin{align} P(n) & = 2^n D(n) \\ & = 2^n \left ( \sqrt{2} \sqrt{\displaystyle 1 - \sqrt{\displaystyle \frac{1 + X(n-1)}{2}}} \right ) \\ & = 2^{n} \sqrt{2} \sqrt{\displaystyle 1 - \sqrt{\displaystyle \frac{1 + X(n-1)}{2}}} \end{align}$$

Resolving P(n) in π:

$$\begin{align} \pi & = \lim_{n \to \infty} P(n) \\ & = \lim_{n \to \infty} 2^{n} \sqrt{2} \sqrt{\displaystyle 1 - \sqrt{\displaystyle \frac{1 + X(n-1)}{2}}} \end{align}$$

So, basically, it's:

$$\begin{align} X(1) &= 0 \\ & integer\,\, n > 1;\, real\,\, 0 \le X(n) \le 1 \\ X(n) &= \sqrt{\displaystyle \frac{1 + X(n-1)}{2}} \\ \pi & = \lim_{n \to \infty} 2^{n} \sqrt{2} \sqrt{\displaystyle 1 - X(n-1)} \end{align}$$