# Compute $\int _0^\infty\frac{x \sin x}{1+x^2}dx$ with the residue theorem

Compute $\int _0^\infty\frac{x \sin x}{1+x^2}dx$ with the residue theorem

Ok so I have done a couple of these but I'm stuck on this one. I want to use

$$\int_0^\infty \frac{ze^{iz}}{1+z^2}dz$$

and then take the imaginary part of the answer at the one, that is how I have done it so far. But I have to use Jordans Lemma here, right? And I'm not really sure what to do when the lower limit is zero, I have only done it with $-\infty$. Any suggestions?

Consider the contour integral

$$\oint_C dz \frac{z \, e^{i z}}{1+z^2}$$

where $C$ is a semicircle of radius $R$ in the upper half plane. Then the contour integral is equal to

$$\int_{-R}^R dx \frac{x \, e^{i x}}{1+x^2} + i R \int_0^{\pi} d\theta \, e^{i \theta} \, \frac{R e^{i \theta} e^{i R e^{i \theta}}}{1+R^2 e^{i 2 \theta}}$$

Now we want to take the limit as $R \to \infty$ and show that the second integral, which represents the integral about the arc, goes to zero in this limit. We do this by showing that the magnitude of the integral goes to zero. Note that, by the Cauchy-Schwartz inequality,

$$R\left |\int_0^{\pi} d\theta \, e^{i \theta} \, \frac{R e^{i \theta} e^{i R e^{i \theta}}}{1+R^2 e^{i 2 \theta}} \right | \le R\int_0^{\pi} d\theta \, \left | e^{i \theta} \, \frac{R e^{i \theta} e^{i R e^{i \theta}}}{1+R^2 e^{i 2 \theta}}\right | \le \frac{R^2}{R^2-1}\int_0^{\pi} d\theta \, e^{-R \sin{\theta}}$$

Now we make use of the inequality

$$\sin{\theta} \ge \frac{2}{\pi} \theta \quad \forall\theta \in [0,\pi/2]$$

We use the symmetry of the integrand and conclude that the integral about the arc is bounded by

$$\frac{2 R^2}{R^2-1}\int_0^{\pi/2} d\theta \, e^{-2 R \theta/\pi} = \frac{\pi R}{R^2-1}$$

which indeed vanishes as $R \to \infty$.

By the residue theorem, the contour integral is also equal to $i 2 \pi$ times the residue at the pole $z=i$. The pole $z=-i$ is excluded because it is not contained within $C$. Thus,

$$\int_{-\infty}^{\infty} dx \frac{x \, e^{i x}}{1+x^2} = i 2 \pi \frac{i \,e^{-1}}{2 i} = i \frac{\pi}{e}$$

Take the imaginary part, take the positive half of the interval (even integrand), and you get the result from @Jack's solution.

$x\sin x$ is an even function, hence: $$\int_{0}^{+\infty}\frac{x\sin x}{1+x^2}\,dx = \frac{1}{2}\int_{-\infty}^{+\infty}\frac{x\sin x}{1+x^2}\,dx = \frac{1}{2}\cdot\text{Im}\int_{-\infty}^{+\infty}\frac{z e^{iz}}{1+z^2}\,dz$$ and the last integrand function has two simple poles at $z=\pm i$. By integrating along a rectangle countour enclosing $i$ in the upper half-plane and using the residue theorem we have: $$\int_{-\infty}^{+\infty}\frac{z e^{iz}}{1+z^2}\,dz = 2\pi i\cdot\text{Res}\left(\frac{z e^{iz}}{1+z^2},z=i\right) = 2\pi i\cdot \frac{i e^{i^2}}{2i}$$ hence: $$\int_{0}^{+\infty}\frac{x\sin x}{1+x^2}\,dx = \color{red}{\frac{\pi}{2e}}.$$ It is interesting to point out that since $\mathcal{L}(\sin x)=\frac{1}{1+s^2}$ and $\mathcal{L}^{-1}\left(\frac{x}{1+x^2}\right)=\cos(s)$, we have: $$\int_{0}^{+\infty}\frac{x\sin x}{1+x^2}\,dx = \int_{0}^{+\infty}\frac{\cos(s)}{1+s^2}\,ds.$$

• Oh i missed that with the even integrand! The rest of this you wrote I can do but my professor demands that we show that the upper half circle tends to zero as we go to infinity, that for me is always the tricky part. – user269620 Oct 22 '15 at 19:05