# Trigonometry/Calculating Pi

Various formulae for calculating pi can be obtained from the power series expansion for ${\displaystyle \arctan(x)}$ .

Since ${\displaystyle \arctan(1)={\frac {\pi }{4}}}$ , we have

${\displaystyle {\frac {\pi }{4}}=1-{\frac {1}{3}}+{\frac {1}{5}}-{\frac {1}{7}}+{\frac {1}{9}}+\cdots }$

This formula (due to Gottfried Leibniz) converges too slowly to be of practical use. However, similar formulae with much faster convergence can be found. John Machin (1680-1752) showed that

${\displaystyle {\frac {\pi }{4}}=4\arctan \left({\tfrac {1}{5}}\right)-\arctan \left({\tfrac {1}{239}}\right)}$ .

This formula was widely used by hand calculators. The first part of the right hand side is easy to calculate since finding ${\displaystyle {\frac {1}{5^{n}}}}$ involves very simple division, and the second part only needs 50 terms to compute 240 decimal places.

Leonhard Euler (1707-1783) showed that

${\displaystyle {\frac {\pi }{4}}=5\arctan \left({\tfrac {1}{7}}\right)+2\arctan \left({\tfrac {3}{79}}\right)}$ .

Störmer showed that

${\displaystyle {\frac {\pi }{4}}=6\arctan \left({\tfrac {1}{8}}\right)+2\arctan \left({\tfrac {1}{57}}\right)+\arctan \left({\tfrac {1}{239}}\right)}$ ,

and this formula was used in 1962 to calculate ${\displaystyle \pi }$ to over 100,000 decimals.