Problem: Compute $\int _ { 0 } ^ { \infty } \frac { x \sin x } { \left( x ^ { 2 } + 1 \right) ^ { 2 } } dx = \frac { \pi } { 4 e }$
First we can study $\int_{\Gamma_R}g(z)dz$ where $\Gamma_R$ is the upper half circle of radius $R$ and $g(z)=\frac{z}{(z^2+1)^2}e^{iz}$. The singularity in the upper half circle is $z_0 = i$. If we prove that the integral over the contour is $0$, we could conclude with the following result :
$$\int_{\Gamma_R}g(z)dz=\lim_{R\rightarrow \infty} \int_{-R}^{R}g(x)dx = 2\pi i (Res_{z_0}(g))=(2\pi i)\frac{1}{2e}=\frac{i\pi}{e}$$
And by keeping the imaginary part of the solution, we get that :
$$\int _ { -\infty } ^ { \infty } \frac { x \sin x } { \left( x ^ { 2 } + 1 \right) ^ { 2 } } dx = \frac { \pi } { e }$$
Unfortunately I can't seem to find a way to compute the integral from $0$ to $\infty$, also I tried to show that the integral over the contour was equal to 0 without much success.