<s>[INST] Evaluation of integral $\int_{0}^{\infty}\frac{\sin x}{x\left ( 1+x^2 \right )^2}\,{\rm d}x$ I'm trying to evaluate the following integral:
$$\mathcal{J}=\int_{0}^{\infty}\frac{\sin x}{x\left ( 1+x^2 \right )^2}\,{\rm d}x$$
Well there are $3$ poles , one lying on the real line the other on the upper half plane and the other on the lower half plane. The residue at $z=i$ is $\displaystyle -\frac{3}{4e}$ .
I'm integrating on a contour that looks like a semicircle on the upper half plane and has a branch about the origin .
Well I considered the function $\displaystyle f(z)=\frac{e^{iz}+1}{z\left ( z+1 \right )^2}$ which is clearly analytic expect for the poles. Hence if $\gamma$ denotes the contour , then: 
$$\oint_{\gamma}f(z)\,{\rm d}z=\oint_{\gamma}\frac{e^{iz}+1}{z\left ( z^2+1 \right )^2}\,{\rm d}z =\oint_{\gamma}\frac{e^{iz}}{z\left ( z^2+1 \right )^2}\,{\rm d}z+\oint_{\gamma}\frac{{\rm d}z}{z\left ( z^2+1 \right )^2}=-2\pi i \frac{3}{4e}+2\pi i = 2\pi i \left ( 1-\frac{3}{4e} \right )=i \left (2\pi - \frac{3\pi}{2e} \right )$$
Hmm... applying the classical method I get that:
$$\int_{-\infty}^{\infty}f(x)\,{\rm d}x =2\pi - \frac{3\pi}{2e}$$ 
which is almost correct except for that $2$ in front of $\pi$. Where I have gone wrong?
P.S: I used the very obvious that the integrand is even.
 [/INST] Another approach: Parameterize the integral as
$$I(a)=\int_{0}^{\infty}\frac{\sin ax}{x\left ( 1+x^2 \right )^2}\,{\rm d}x$$
Take the Laplace transform, find your partial fractions, and take the inverse transform:
$$\begin{align*}\mathcal{L}_s\{I(a)\}&=\int_0^\infty\int_{0}^{\infty}\frac{\sin ax}{x\left ( 1+x^2 \right )^2}e^{-as}\,{\rm d}a\,{\rm d}x\\
&=\int_0^\infty\frac{\mathcal{L}_s\{\sin ax\}}{x\left ( 1+x^2 \right )^2}\,{\rm d}x\\
&=\int_0^\infty\frac{x}{x\left ( 1+x^2 \right )^2\left(s^2+x^2\right)}\,{\rm d}x\\
&=\int_0^\infty\frac{{\rm d}x}{\left ( 1+x^2 \right )^2\left(s^2+x^2\right)}\\
&=-\frac{1}{(s^2-1)^2}\int_0^\infty\left(\frac{1}{1+x^2}-\frac{s^2-1}{(1+x^2)^2}-\frac{1}{s^2+x^2}\right)\,{\rm d}x\\
&=-\frac{1}{(s^2-1)^2}\left(\frac{\pi}{2}-\frac{\pi(s^2-1)}{4}-\frac{\pi}{2s}\right)\\
&=\frac{\pi}{4}\left(\frac{2}{s}-\frac{2}{s+1}-\frac{1}{(s+1)^2}\right)\\
I(a)&=\frac{\pi}{4}{\mathcal{L}^{-1}}_a\left\{\frac{2}{s}-\frac{2}{s+1}-\frac{1}{(s+1)^2}\right\}\\
&=\frac{\pi}{4}(2+-2e^{-a}-ae^{-a})\end{align*}$$
Finally, since $\mathcal{J}=I(1)$, you have
$$\mathcal{J}=\frac{\pi}{2}-\frac{3\pi}{4e}$$
</s>