What is the sum of
$\sum_{k=0}^\infty \frac{(-1)^{k+1}}{2k+1}$? What is the sum of the following expression:
$$\sum_{k=0}^\infty \frac{(-1)^{k+1}}{2k+1}$$

I know it is convergent but I cannot evaluate its sum.
Consider adding $x^{2k+1}$ to the summand:

$$f(x)=\sum_{k=0}^\infty\frac{(-1)^kx^{2k+1}}{2k+1}$$

Then...

$$f'(x)=\sum_{k=0}^\infty(-1)^kx^{2k}=\frac1{1+x^2}$$

Thus,

$$f(x)=\arctan(x)$$

And


  $$\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}=f(1)=\arctan(1)=\frac\pi4$$


This is Leibniz's formula for $\pi$.
hint
use the fact that
$$\frac {x^k}{2k+1}=\frac {1}{\sqrt {-x}}\frac {(\sqrt{-x})^{2k+1}}{2k+1} $$
for $x&lt;0$