Proving the Madhava-Leibniz series for pi(π) 


One of the earliest known approximations of $\pi$ was done by an Indian mathematician Madhava of Sangamagrama during the 14th century and Gottfried Leibniz in 1676.
The Madhava and Leibniz series were later joined to become one which is now know as the Madhava-Leibniz series approximation of $\pi$, it is an approximation that uses alternating series by generalizing series expansion for the inverse tangent function.
The series for the inverse tangent function is defined by:
$\arctan{x}=x-\frac{x^3}{3}+\frac{x^5}{5}-\frac{x^7}{7}+...$
The Leibniz formula is obtained for $\frac{\pi}{4}$ by substituting $x=1$ into the series. This will yield the Madhava-Leibniz series which is given by:
$1-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\frac{1}{9}-...=\frac{\pi}{4}$.
It can be proved as thus:
Proof:
Let $\frac{\pi}{4}=\arctan(1)$
$=\int^{1}_{0}\frac{1}{1+x^2}dx$
$=\int^{1}_{0}(\sum^{n}_{k=0}(-1)^{k}x^{2k}+\frac{(-1)^{n+1}x^{2n+1}}{1+x^2})dx$
$=(\sum^{n}_{k=0}\frac{(-1)^k}{2k+1})+(-1)^{n+1}(\int^{1}_{0}\frac{x^{2n+2}}{1+x^2}dx)$
The integral parts yieds
$0\geq\int^{1}_{0}\frac{x^{2n+2}}{1+x^2}dx\geq\int^{1}_{0}x^{2n+2}dx=\frac{1}{2n+3}\rightarrow{0}$ as $n\rightarrow\infty$
By squeeze theorem as $n\rightarrow\infty$
$\frac{\pi}{4}=\sum^{\infty}_{k=0}\frac{(-1)^k}{2k+1}$
The series converges very slowly exhibiting sublinear convergence. Calculating $\pi$ correct to $10$ decimal places using direct summation of series requires about $5$ billion terms because $\frac{1}{2k+1}<10^{-10}$ for $k>5×10^9-\frac{1}{2}$.
If the series is truncated at the right time, the decimal expansion of the approximation will agree with that of $\pi$ for many more digits
$3.1415924535897933238464643383279...$