I am trying to calculate the following improper integral:
$$ \int_{-\infty }^{\infty }\frac{x}{x-\sinh \left( \frac{\pi x}{2}\right) }ds $$
I try to calculate it using the residues theorem. Therefore I extend the integrand away from the real axis as:
$$ \frac{z}{z-\sinh \left( \frac{\pi z}{2}\right) } $$
The integrand has only poles on $ z=\pm i $, because at $z=0$ the limit is $ -\frac{2}{\pi-2}\ $. Then I consider a contour integral that comprises the integral along the real axis from −R to +R together with the integral along the semi-circular arc on the upper half-plane. When R→∞ the contribution from the straight line part approaches the required integral because the curved section vanishes in the limit.
According to this, the integral should be equal to: $$ 2 \pi i Res(\frac{z}{z-\sinh \left( \frac{\pi z}{2}\right) },z=i)= 2 \pi i (i)=-2\pi=-6.283185308 $$
But when I numerically compute the above integral has a value of $ -3.838888154$.
What I am doing wrong?
Thanks a lot!
There are further poles, as you can see e.g. in these plots. I doubt that these poles can be expressed in closed form.