Since , the integrand has poles at for k = 1, 2, 3 ... The residues at are , the residues at for k>1 are .Originally Posted byEne Dene

Now integrate from z=-R + 0i along the real axis to z=+R+0i and then on the half circle back to z = -R+0i. The result is

and by the Residue Theorem this equals

where M is a suitable number (about ). Send R to infinity, then the integral along C goes to zero, and we obtain

.

Splitting the infinite sum into terms with even k = 2r and odd k = 2r+1 (allowed since the sum converges absolutely), we obtain

since both sums are essentially alternating harmonic series - you can see this by using the formula .

Thus as asserted.