Improper rational/trig integral comes out to $\pi/e$ During my studying to integration I find this integration.  So I tried to prove but I got stuk.  So I need help in this integration. 
$$\displaystyle\int_{-\infty}^{\infty} \frac{x \sin (x)}{1+x^2}  dx = \frac {\pi}{e} $$
 A: Consider the contour integral
$$ \oint_C dz \frac{z e^{i z}}{1+z^2}$$
where $C$ is a semicircle in the upper half plane of radius $R$.  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}}$$
As $R \to \infty$, the magnitude of the second integral is bounded by
$$\frac{R^2}{R^2-1} \int_0^{\pi} d\theta \, e^{-R \sin{\theta}} \le \frac{2 R^2}{R^2-1} \int_0^{\pi/2} d\theta \, e^{-2 R \theta/\pi} \le \frac{\pi}{R} $$
and thus vanishes in that limit.  Thus, by the residue theorem, the first integral on the LHS is $i 2 \pi$ times the residue of the integrand of the contour integral at the pole $z=i$, or 
$$\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}$$
The result sought is found by taking the imaginary part of the above result.
A: This is too long for a comment and it could be off-topic.
There is no doubt that Ron Gordon's solution is the most elegant for this problem.
I have been thinking about sine and cosine integral functions (see my early comment) just because $$\frac x{1+x^2}=\frac 12 \Big(\frac 1{x-i}+\frac 1{x+i}\Big)$$ and $$\int \frac{\sin(x)}{x+a}\,dx=\cos (a) \text{Si}(a+x)-\sin (a) \text{Ci}(a+x)$$ Combining all of that leads to $$\int \frac{x \sin (x)}{1+x^2}\,  dx=\frac{i \left(e^2-1\right) \big(\text{Ci}(i-x)-\text{Ci}(i+x)\big)-\left(e^2+1\right)
   \big(\text{Si}(i-x)+ \text{Si}(i+x)\big)}{4 e}$$ and then the result after using the bounds. 
