# question about extension of Cauchy's residue theorem

Prove that $\int\limits_{0}^{\infty} \frac{\sin x}{x(1+x^2)^2}dx = \frac{\pi(2e-3)}{4e}$.

There goes an extension of Cauchy's residue theorem that states if a finite number of poles lie directly on the contour $C$, then $\oint_C f(z)dz = 2\pi i \sum R^+ + \pi i \sum R^0$, where $\sum R^+$ denotes sum of residues at poles on the positive side of the contour and $\sum R^0$ denotes sum of residues at poles lying directly on the contour.

Here at the problem, at first I converted the integral $\oint_C \frac{e^{iz}}{z(z^2+1)^2}$ where $C$ is positive semicircular contour indented at $0$. Clearly the pole directly on the contour is $z=0$ and that one on the positive side being $z=i$ which is of order $2$. So calculating the residues at those poles and using the above extension and comparing imaginary parts on both sides should give us the correct result. But this isn't. Can someone explain why?

• I see no pole at $z=0$. Think about $\sin{x}$ for small $x$; do you get a removable singularity? – Jacob Manaker May 30 '17 at 5:28
• But excluding the point $z=0$ still doesn't resolve the problem. – am_11235... May 30 '17 at 5:38

This version of the theorem relies on your function tending to $0$ rapidly enough on large arcs. What you are really doing is applying the residue theorem to semicircles of large radius $R$ in the upper half-plane and taking the limit as $R \rightarrow \infty$, and expecting the contribution from the arc to vanish in the limit.
This does not work with $\sin(z)$, which is unbounded. You'll be more successful calculating the integral of $\frac{e^{ix}}{x (1 + x^2)^2} \, \mathrm{d}x$ and taking its imaginary part. The contribution from the arc will then vanish, since $|e^{iz}|$ is so small when $\mathrm{Im}[z]$ is large.
• Yes I used $e^{iz}$ in place of $\sin z$. That's why I mentioned "..comparing imaginary parts on both sides... ". But still it doesn't work. – am_11235... May 30 '17 at 5:36
• @am_11235... Why don't you edit your question to make it clear you are integrating $f(z)=e^{iz}/(z(1+z^2)^2)$? – Lord Shark the Unknown May 30 '17 at 5:38
• Well, I keep getting the result $\frac{\pi(e-1)}{e}$ considering only the poles at $z=i$ and $z=0$. – am_11235... May 30 '17 at 5:41
• @am_11235... My guess is you may have the wrong residue at $z=i$ (it should be $-\frac{3}{4e}$), and forgotten to divide the result by $2$ at then end (the integral is only over $[0,\infty)$, not $(-\infty,\infty)$) but it's hard to tell from here – user420261 May 30 '17 at 5:47