Calculate $\int_{-\infty}^{\infty}{\frac{dx}{x\sin{(\pi x)}}}$ using residues.

107 Views Asked by At

I want to calculate $$ p.v.\int_{-\infty}^{\infty}{\frac{dx}{x\sin{(\pi x)}}} $$ using residue calculus. The function $ f(z)=\frac{1}{z\sin{(\pi z)}} $ has the double pole $z=0$ and infinite simple poles at $z_n=n\in\mathbb{Z}$. According to residue theorem if we use the closed curve like the one shown in the picture enter image description here

then it can be proved that $$ \int_{-\infty}^{\infty}{f(x)dx}=\pi i\sum_{k=1}^{n}{\mathrm{Res}_{z=z_k}{f(z)}} $$

After calculating the residues the result is $$ \sum_{k=1}^{\infty}{\mathrm{Res}_{z=z_k}{f(z)}}=\sum_{k=1}^{\infty}{\frac{(-1)^n}{n\pi}}=-\frac{\ln{2}}{\pi} $$ Thus the integral will be $$ \int_{-\infty}^{\infty}{\frac{1}{x\sin{(\pi x)}}dx}=-i\ln{2}$$

Is there any mistake in the method I used? The $i$ in the last result doesn't seem like it is supposed to remain as the integral is real.