Evaluate the integral $ \int_0^{ + \infty } {\frac{{x^2 - 1}}{{x^2 + 1}}\frac{{\sin x}}{x}dx} $ So I have an assignement to do and it has multiple integrals, I did all of them but this one I can't seem to know how to do it.
$$
\int_0^{ + \infty } {\frac{{x^2  - 1}}{{x^2  + 1}}\frac{{\sin x}}{x}dx} 
$$
I mean don't get me wrong I tried a lot of methodes that I know of, also I tried every app that has step by step solving but nothing seems to work, if any could help me with this problem and provied a little explanation I'd appreciate it.
If this question is a duplicate please provied me with a link.
 A: A method using the Laplace transform.
Use the property that $$\int_{0}^{\infty} f(x)g(x)\,dx=\int_{0}^{\infty} (\mathcal{L} f)(y)\cdot(\mathcal{L}^{-1} g)(y)\,dy$$
Setting $f(x)=\sin x$ and $g(x)=\frac{x^2-1}{x(x^2+1)}$, we have:
$$(\mathcal{L} f)(y)=\frac{1}{1+y^2}$$
$$(\mathcal{L}^{-1} g)(y)=2\cos (y)-1$$
Hence $$\begin{align}\int_{0}^{\infty} \frac{(x^2-1)\sin x}{x(x^2+1)}\,dx &= 2\int_{0}^{\infty} \frac{\cos (y)}{1+y^2}\,dy-\int_{0}^{\infty} \frac{1}{1+y^2}\,dy\\&=\left(\frac{1}{e}-\frac{1}{2}\right)\pi \end{align}$$
A: Hint
Write
$$\frac{x^2-1}{x \left(x^2+1\right)}=\frac{(x-1) (x+1)}{x (x-i) (x+i)}$$ Use partial fraction decomposition and you will face antiderivatives
$$I_k=\int \frac {\sin(x)}{x+k}\,dx$$ Using a quite obious change of variable and basic trigonometric will give the antiderivative and then the integral.
A: Use $ \int_0^{ \infty } \frac{x\sin x}{{x^2  + 1}}dx
= \frac{\pi}{2e} $ to obtain
$$
\int_0^{ \infty } {\frac{{x^2  - 1}}{{x^2  + 1}}\frac{{\sin x}}{x}dx} 
= \int_0^{ \infty }{\frac{2x\sin x}{{x^2  + 1}}-\frac{{\sin x}}{x}\ dx} 
= \frac{\pi}{e}-\frac{\pi}{2}
$$
