How do you evaluate the integral $\int_{0}^{\infty} \frac{x \sin x}{1+x^2} dx$? First how would you prove it converges? I've tried using integration by parts but I choose $ u = t $ and $ v = \frac{\sin x}{1+x^2} $ but I was unable to find a primitive for v.
Thank you for your answer.
 A: For convergence, break $(0,\infty)$ into intervals of width $\pi$:
$$\int_0^{\infty} {\frac{x \sin x}{1+x^2} \, dx} = \sum_{k=0}^{\infty} \int_{\pi k}^{\pi k+\pi} {\frac{x \sin x}{1+x^2} \, dx} $$
$\sin x $ is positive on $(0,\pi)$, negative on $(\pi,2\pi)$, positive on $(2\pi,3\pi)$ and so on, and since $x > 0$, the integrand has the same alternating behavior on these intervals. Thus the infinite series on the right is alternating with terms going to 0 (easy to show), so it converges by alternating series test.
A: Convergence van be proved by integration by parts:
$$
\int_{0}^{r} \frac{x \sin x}{1+x^2}\,dx=-\int_{0}^{r} \frac{x}{1+x^2}(\cos x)'\,dx=-\frac{r \cos r}{1+r^2}+\int_{0}^{r} \frac{1-x^2}{(1+x^2)^2}\cos x\,dx.
$$
As $r\to\infty$ we get
$$
\int_{0}^{\infty} \frac{x \sin x}{1+x^2}\,dx=\int_{0}^{\infty} \frac{1-x^2}{(1+x^2)^2}\cos x\,dx,
$$
and the last integral is absolutely convergent.
A: Use a contour integral in the upper complex plane if you know residue calculus.
$\int_0^{+\infty}\frac{x\sin(x)}{1+x^2}dx=\frac12 \operatorname{Im} \int_{\mathbb{R}}\frac{xe^{ix}}{1+x^2}=\frac 12\operatorname{Im}(2i\pi\times\frac{1}{2e})=\frac{\pi}{2e}$
where the residue is obtained from the only pole at $x=i$.
I don't know about proving the convergence without simply integrating it though...
Edit: however, in this complex analysis case, the convergence is assured from Jordan's lemma
A: $\sin(x)$ is a function with a bounded primitive, hence the given integral is convergent (as an improper Riemann integral) by Dirichlet's test. Since the Laplace transform of $\sin(x)$ is $\frac{1}{1+s^2}$ and the inverse Laplace transform of $\frac{x}{1+x^2}$ is $\cos(s)$, the given integral equals:
$$ \int_{0}^{+\infty}\frac{\cos(s)}{1+s^2}\,ds = \frac{1}{2}\text{Re}\int_{-\infty}^{+\infty}\frac{e^{is}}{1+s^2}\,ds $$
that by the residue theorem equals $\color{red}{\large\frac{\pi}{2e}}$.
