# 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.

## closed as off-topic by daw, Mark Fantini, Semiclassical, rogerl, LucianOct 24 '14 at 22:01

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – daw, Mark Fantini, Semiclassical
If this question can be reworded to fit the rules in the help center, please edit the question.

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 – Kellen Myers Oct 21 '14 at 10:32

Using the result from this OP: Integral evaluation $\int_{-\infty}^{\infty}\frac{\cos (ax)}{\pi (1+x^2)}dx$. We have $$\int_0^\infty\frac{\cos ax}{1+x^2}\,dx=\frac{\pi}{2}e^{-|a|}$$ 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}$. – Alfred Chern Oct 21 '14 at 11:47
• @AlfredChern Thanks again. Edited... (✿◠‿◠) – Anastasiya-Romanova 秀 Oct 21 '14 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}$$