# Improper integral : $\int_0^{+\infty}\frac{x\sin x}{x^2+1}$ [closed]

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.

• Wolfram says this. Maybe you know those functions and can find a way to get there. Otherwise just know the definite integral is given by Wolfram as $\frac{\pi}{2e}$. Oct 21, 2014 at 10:15
• This is a very difficult one, just as MickG showed ! Oct 21, 2014 at 10:26
• Duplicate of this. Similar to this and this. Linked, by way of differentiation under the integral sign, to this, this, this, this, and this. Oct 21, 2014 at 11:52
• possible duplicate of How would one evaluate $\int\frac{x\sin(x)}{x^2+1}$ over the real line? Oct 21, 2014 at 14:37

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}$.

• I was about to say the same thing. I do wonder though why a person would be doing an integral that requires contours but wouldn't recognize this as one that could/should be done in that way. +1 Oct 21, 2014 at 10:32

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}

• I think you miss a "-" in front of $\lim_{a\rightarrow1}$. Oct 21, 2014 at 11:47
• @AlfredChern Thanks again. Edited... (✿◠‿◠) Oct 21, 2014 at 11:50

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}$$