# Trigonometry/Calculating Pi

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

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

${\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

${\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 ${\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

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

Störmer showed that

${\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 $\pi$ to over 100,000 decimals.