Recall that for |x| < 1, we have
[tex]\displaystyle \frac1{1-x} = \sum_{k=0}^\infty x^k[/tex]
It follows that, for |-x²| = |x|² < 1, or just |x| < 1,
[tex]\displaystyle \frac1{1+x^2} = \frac1{1-(-x^2)} = \sum_{k=0}^\infty (-x^2)^k = \sum_{k=0}^\infty (-1)^k x^{2k}[/tex]
Taking the antiderivative of both sides gives us
[tex]\displaystyle \arctan(x) = C + \sum_{k=0}^\infty \frac{(-1)^k}{2k+1} x^{2k+1}[/tex]
where C is a constant, which we determine to be 0, since taking x = 0 on both sides makes the series vanish, while arctan(0) = 0 since 0 = tan(0). So
[tex]\displaystyle \arctan(x) = \sum_{k=0}^\infty \frac{(-1)^k}{2k+1} x^{2k+1}[/tex]
Since tan(π/4) = 1, it follows that π/4 = arctan(1), so in the series we replace x = 1, then solve for π :
[tex]\displaystyle \arctan(1) = \sum_{k=0}^\infty \frac{(-1)^k}{2k+1} 1^{2k+1}[/tex]
[tex]\displaystyle \frac\pi4 = \sum_{k=0}^\infty \frac{(-1)^k}{2k+1}[/tex]
[tex]\displaystyle \pi = \sum_{k=0}^\infty \frac{4(-1)^k}{2k+1}[/tex]
[tex]\pi = 4 - \dfrac43 + \dfrac45 - \dfrac47 +\cdots[/tex]