Borwein's algorithm (others)

From Free net encyclopedia

Jonathan and Peter Borwein devised various algorithms to calculate the value of π. The most prominent and oft-used one is explained under Borwein's algorithm and Bailey-Borwein-Plouffe formula. Other algorithms found by them include the following:

  1. Quadratic convergence, 1987:
    • Start out by setting
      <math>x_0 = \sqrt2</math>
      <math>y_0 = \sqrt[4]2</math>
      <math>p_0 = 2+\sqrt2</math>
    • Then iterate
      <math>x_k = \frac{1}{2}(x_{k-1}^{1/2} + x_{k-1}^{-1/2})</math>
      <math>y_k = \frac{y_{k-1}x_{k-1}^{1/2} + x_{k-1}^{-1/2}} {y_{k-1}+1}</math>
      <math>p_k = p_{k-1}\frac{x_k+1}{y_k+1}</math>

    Then pk converges monotonically to π; with

    <math>p_k - \pi = 10^{-2^{k+1}}</math>

    for <math>k >= 2</math>

  2. Cubical convergence, 1991:
    • Start out by setting
      <math>a_0 = \frac{1}{3}</math>
      <math>s_0 = \frac{\sqrt{3} - 1}{2}</math>
    • Then iterate
      <math>r_{k+1} = \frac{3}{1 + 2(1-s_k^3)^{1/3}}</math>
      <math>s_{k+1} = \frac{r_{k+1} - 1}{2}</math>
      <math>a_{k+1} = r_{k+1}^2 a_k - 3^k(r_{k+1}^2-1)</math>

    Then ak converges cubically against 1/π; that is, each iteration approximately triples the number of correct digits.

  3. Quartical convergence, 1984:
    • Start out by setting
      <math>a_0 = \sqrt{2}</math>
      <math>b_0 = 0\,\!</math>
      <math>p_0 = 2 + \sqrt{2}</math>
    • Then iterate
      <math>a_{n+1} = \frac{\sqrt{a_n} + 1/\sqrt{a_n}}{2}</math>
      <math>b_{n+1} = \frac{\sqrt{a_n} (1 + b_n)}{a_n + b_n}</math>
      <math>p_{n+1} = \frac{p_n b_{n+1} (1 + a_{n+1})}{1 + b_{n+1}}</math>

    Then pk converges quartically against π; that is, each iteration approximately quadruples the number of correct digits. The algorithm is not self-correcting; each iteration must be performed with the desired number of correct digits of π.

  4. Quintical convergence:
    • Start out by setting
      <math>a_0 = \frac{1}{2}</math>
      <math>s_0 = 5(\sqrt{5} - 2)</math>
    • Then iterate
      <math>x_{n+1} = \frac{5}{s_n} - 1</math>
      <math>y_{n+1} = (x_{n+1} - 1)^2 + 7\,\!</math>
      <math>z_{n+1} = \left(\frac{1}{2} x_{n+1}\left(y_{n+1} + \sqrt{y_{n+1}^2 - 4x_{n+1}^3}\right)\right)^{1/5}</math>
      <math>a_{n+1} = s_n^2 a_n - 5^n\left(\frac{s_n^2 - 5}{2} + \sqrt{s_n(s_n^2 - 2s_n + 5)}\right)</math>
      <math>s_{n+1} = \frac{25}{(z_{n+1} + x_{n+1}/z_{n+1} + 1)^2 s_n}</math>

    Then ak converges quintically against 1/π (that is, each iteration approximately quintuples the number of correct digits), and the following condition holds:

    <math>0 < a_n - \frac{1}{\pi} < 16\cdot 5^n\cdot e^{-5^n}\pi</math>
  5. Nonical convergence:
    • Start out by setting
      <math>a_0 = \frac{1}{3}</math>
      <math>r_0 = \frac{\sqrt{3} - 1}{2}</math>
      <math>s_0 = (1 - r_0^3)^{1/3}</math>
    • Then iterate
      <math>t_{n+1} = 1 + 2r_n\,\!</math>
      <math>u_{n+1} = (9r_n (1 + r_n + r_n^2))^{1/3}</math>
      <math>v_{n+1} = t_{n+1}^2 + t_{n+1}u_{n+1} + u_{n+1}^2</math>
      <math>w_{n+1} = \frac{27 (1 + s_n + s_n^2)}{v_{n+1}}</math>
      <math>a_{n+1} = w_{n+1}a_n + 3^{2n-1}(1-w_{n+1})\,\!</math>
      <math>s_{n+1} = \frac{(1 - r_n)^3}{(t_{n+1} + 2u_{n+1})v_{n+1}}</math>
      <math>r_{n+1} = (1 - s_{n+1}^3)^{1/3}</math>

    Then ak converges nonically against 1/π; that is, each iteration approximately multiplies the number of correct digits by nine.

  6. Another formula for π, 1989:
    • Start out by setting
      <math>A = 212175710912 \sqrt{61} + 1657145277365</math>
      <math>B = 13773980892672 \sqrt{61} + 107578229802750</math>
      <math>C = (5280(236674+30303\sqrt{61}))^3</math>
    • Then
      <math>1 / \pi = 12\sum_{n=0}^\infty \frac{ (-1)^n (6n)! (A+nB) }{(n!)^3(3n)! C^{n+1/2}}</math>

    Each additional term of the series yields approximately 31 digits.

    • Jonathan Borwein and Peter Borwein, 1993:
      • Start out by setting
        <math>\,A = 63365028312971999585426220</math>
        <math>+ 28337702140800842046825600\sqrt5</math>
        <math>+ 384\sqrt5(10891728551171178200467436212395209160385656017</math>
        <math>+ 4870929086578810225077338534541688721351255040\sqrt5)^{1/2}</math>
        <math>\,B = 7849910453496627210289749000</math>
        <math>+ 3510586678260932028965606400\sqrt5</math>
        <math>+ 2515968\sqrt{3110}(6260208323789001636993322654444020882161</math>
        <math>+ 2799650273060444296577206890718825190235\sqrt5)^{1/2}</math>
        <math>\,C = -214772995063512240</math>
        <math>- 96049403338648032\sqrt5</math>
        <math>- 1296\sqrt5(10985234579463550323713318473</math>
        <math>+ 4912746253692362754607395912\sqrt5)^{1/2}</math>
      • Then
        <math>\frac{\sqrt{-C^3}}{\pi} = \sum_{n=0}^{\infty} {\frac{(6n)!}{(3n)!(n!)^3} \frac{A+nB}{C^{3n}}}</math>

      Each additional term of the series yields approximately 50 digits.

        </ol>