Improper integral : $\int_0^{+\infty}\frac{x\sin x}{x^2+1}$ How to evaluate the following improper integral : $$\int_0^{+\infty}\frac{x\sin x}{x^2+1}\,dx$$
I have tried integration by parts and variable substitution, but it didn't work.
 A: Since your integrand is even, this integral is equal to one half of 
$$
\int _{-\infty}^{\infty}\frac{x\sin x}{x^2+1}dx
$$
This integral is the imaginary part of 
$$
\int _{-\infty}^{\infty}\frac{x \cdot e^{ix}}{x^2+1}dx
$$
This can be solved as the contour integral with contour a half disc of radius $R$ with base on the real axis, letting $R$ go to infinity.  The integral along the arc goes to $0$ ( needs some showing ).  The contour integral is equal to the residue at $x=i$, which is $e^{-1}\pi i$. So  taking half the imaginary part, we get $\frac{\pi}{2e}$.
A: Using the result from this OP: Integral evaluation $\int_{-\infty}^{\infty}\frac{\cos (ax)}{\pi (1+x^2)}dx$. We have
\begin{equation}
\int_0^\infty\frac{\cos ax}{1+x^2}\,dx=\frac{\pi}{2}e^{-|a|}
\end{equation}
Thus, our integration is simply
\begin{align}
\int_0^\infty\frac{x\sin x}{1+x^2}\,dx&=-\lim_{a\to1}\partial_a\int_0^\infty\frac{\cos ax}{1+x^2}\,dx\\
&=-\frac{\pi}{2}\lim_{a\to1}\partial_a\left[e^{-|a|}\right]\\
&=\frac{\pi}{2e}
\end{align}
A: According to the residue theory, 
$$
    \int_0^{+\infty}\frac{1}{s^2+x^2}\mathrm{d}x=\frac{\pi}{2s} ~ , ~
    I(\alpha)=\int_0^{+\infty}\frac{x\sin \alpha x}{1+x^2}\mathrm{d}x
$$
Laplace transform:
\begin{align}
    \mathcal{L}\left[ I(\alpha)\right] &= \int_0^{+\infty}\frac{x}{1+x^2}\cdot \frac{x}{s^2+x^2}\mathrm{d}x \\
    &= \int_0^{+\infty}\frac{x^2+1-1}{1+x^2} \cdot \frac{1}{s^2+x^2} \mathrm{d}x \\
    &= \int_0^{+\infty}\frac{1}{s^2+x^2} \mathrm{d}x - \int_0^{+\infty}\frac{1}{1+x^2} \cdot \frac{1}{s^2+x^2} \mathrm{d}x \\
    &= \int_0^{+\infty}\frac{1}{s^2+x^2} \mathrm{d}x - \frac{1}{s^2-1}\int_0^{+\infty}\left( \frac{1}{1+x^2} - \frac{1}{s^2+x^2} \right) \mathrm{d}x \\
    &= \frac{\pi}{2} \cdot \frac{1}{s+1}
\end{align}
Inverse transform:
$$\mathcal{L}^{-1}\left[ I(\alpha)\right] = \frac{\pi}{2}e^{-\alpha} \Longrightarrow I(1)=\int_0^{+\infty}\frac{x\sin x}{1+x^2} \mathrm{d}x=\frac{\pi}{2e}$$
