Home » Blog » Compute π using the Taylor polynomial of arctan x

Compute π using the Taylor polynomial of arctan x

For this exercise define

    \[ \alpha = \arctan \frac{1}{5}, \qquad \beta = 4 \alpha - \frac{1}{4} \pi. \]

  1. Using the trig identity

        \[ \tan (A+B) = \frac{\tan A + \tan B}{1 - \tan A \tan B} \]

    twice, once with A = B = \alpha, and then the second time with A = B = 2 \alpha, show that

        \[ \tan (2 \alpha) = \frac{5}{12}, \qquad \tan (4 \alpha) = \frac{120}{119}. \]

    Then use the same identity again with A = 4 \alpha and B = -\frac{1}{4} \pi to show

        \[ \tan \beta = \frac{1}{239}. \]

    This establishes the identity

        \[ \pi = 16 \arctan \frac{1}{5} - 4 \arctan \frac{1}{239}. \]

  2. Using the Taylor polynomial approximation T_{11} (\arctan x) at x =\frac{1}{2} prove that

        \[ 3.158328934 < 16 \arctan \frac{1}{5} < 3.158328972. \]

  3. Using the Taylor polynomial approximation T_3 (\arctan x) at x = \frac{1}{239} prove that

        \[ -0.016736309 < -4\arctan \frac{1}{239} < -0.016736300. \]

  4. Using the above parts show that the value of \pi to seven decimal places is 3.1415926.

  1. Proof. Letting A = B = \alpha = \arctan \frac{1}{5} we have

        \[ \tan (A+B) = \tan (2 \alpha) = \frac{\tan A + \tan B}{1 - \tan A \tan B} = \frac{(2/5)}{1 - (1/25)} = \frac{5}{12}. \]

    Letting A = B = 2 \alpha = 2 \arctan \frac{1}{5} we have

        \[ \tan (A+B) = \tan (4 \alpha) = \frac{\tan A + \tan B}{1 - \tan A \tan B} = \frac{(10/12)}{1 - (25/144)} = \frac{120}{119}. \]

    Letting A = 4 \alpha and B = -\frac{\pi}{4} we have (recalling that \beta = 4 \alpha - \frac{\pi}{4})

        \[ \tan (\beta) = \frac{\tan (4\alpha) + \tan\left(-\frac{\pi}{4}\right)}{1 - \tan (4\alpha) \tan \left( -\frac{\pi}{4} \right)} = \frac{(120/119) - 1}{1 - (120/119)(-1)} = \frac{1}{239}. \]

    But then

        \begin{align*}  && \tan \left( 4 \alpha - \frac{\pi}{4} \right) &= \frac{1}{239}\\[9pt] \implies && 4 \alpha - \frac{\pi}{4} &= \arctan \left( \frac{1}{239} \right) \\[9pt] \implies && \frac{\pi}{4} &= 4 \arctan \frac{1}{5} - \arctan \frac{1}{239} \\[9pt] \implies && \pi &= 16 \arctan \frac{1}{5} - 4 \arctan \frac{1}{239}. \qquad \blacksquare \end{align*}

  2. Proof. We know the Taylor polynomial approximation for \arctan x from this exercise (Section 7.8, Exercise #3):

        \[ T_{11} (\arctan x) = x - \frac{x^3}{3} + \frac{x^5}{5} - \frac{x^7}{7} + \frac{x^9}{9} - \frac{x^{11}}{11}. \]

    Therefore, we can compute an approximation to \arctan x,

        \begin{align*}  &&\arctan x &= \left( x - \frac{x^3}{3} + \frac{x^5}{5} - \frac{x^7}{7} + \frac{x^9}{9} - \frac{x^{11}}{11} \right) + E_{10}(x) \\[9pt] \implies && 16 \arctan \left(\frac{1}{5} \right) &= 16 \left( \frac{1}{5} - \frac{1}{375} + \frac{1}{15625} - \frac{1}{546875} + \frac{1}{17578125} - \frac{1}{537109375} \right) + E_{10}\left( \frac{1}{5} \right)\\[9pt] \implies && 16 \arctan \left( \frac{1}{5} \right) &= 3.158328957 + E_{10} \left( \frac{1}{5} \right), \end{align*}

    where

        \[ \left|E_{10}\left(\frac{1}{5} \right)\right| \leq \frac{(1/5)^{11}}{11} = .000000018. \]

    Therefore,

        \[ 3.158328934 < 16 \arctan \left( \frac{1}{5} \right) < 3.158328972. \qquad \blacksquare\]

  3. Proof. Again using the Taylor polynomial approximation to \arctan x we have

        \begin{align*}  &&T_3 (\arctan x) &= x - \frac{x^3}{3} \\[9pt] \implies && \arctan x &= x - \frac{x^3}{3} + E_2 (x), \qquad |E_2 (x)| \leq \frac{x^3}{3} \\[9pt] \implies && \arctan \left( \frac{1}{239} \right) &= \left( \frac{1}{239} \right) - \frac{(1/239)^3}{3} + E_2 \left( \frac{1}{239} \right) \\[9pt] \implies && -4 \arctan \left( \frac{1}{239} \right) &= -0.01673630401 + E_2 \left( \frac{1}{239} \right) \\[9pt] \implies && -0.016736309 &< -4 \arctan \left( \frac{1}{239} \right) < -0.016736300. \qquad \blacksquare \end{align*}

  4. Finally,

        \begin{align*}   \pi &= 16 \arctan \frac{1}{5} - 4 \arctan \frac{1}{239} \\  &\approx 3.158328957 - 0.01673630401 \\  &\approx 3.1415926.  \end{align*}

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):