Curious and short question about $\int^\infty_0 \frac{\sin^2(x)}{x^2(x^2+1)}dx$ This is a really short and kind of an interesting thing that popped out in my mind.
Question. Consider $$\int^\infty_0 \frac{\sin^2(x)}{x^2(x^2+1)}dx$$ I have tried with integration by parts, substitutions and a lot of ways to try to tackle this, in a way that no Laplaces are used or Residue theorem or Feynman's integration or any advanced deep analysis theory. Because there are already videos about it, but since I'm not yet that far into math, I went and gave it some more last thoughts with everything that I've learned. And I thought about the Series Expansion of $\sin^2(x)$, is there a way to use the series expansion of $\sin^2(x)=x^2+\frac{x^4}{3}-\frac{2x^6}{45}-\frac{x^8}{315}+O(x^9)$ in order to integrate this? This is just an idea and I don't even know if it's possible, it was just a curious thought.
 A: This integral can be rewritten as
$$\int_0^\infty \dfrac{\sin^2(x)dx}{x^2}-\int_0^\infty \dfrac{\sin^2(x)dx}{x^2+1}$$
For the first integral, let
$$I(a)=\int_{0}^{\infty}\frac{\sin^2(ax)dx}{x^2}$$
Differentiating both sides yields
$$\frac{dI}{da}=\int_{0}^{\infty}\frac{\sin(2ax)dx}{x}=\dfrac{\pi}{2}$$
Thus, $I(a)=\dfrac{\pi a}{2}+C$ and $I(a)=\dfrac{\pi a}{2}$ because $I(0)=0$. Setting $a=1$ gives us $I(1)=\dfrac{\pi}{2}$.
We now have
$$\displaystyle\dfrac{\pi}{2}-\dfrac{1}{2}\int_{0}^\infty\dfrac{dx}{x^2+1}+\dfrac{1}{2}\int_0^\infty \dfrac{\cos(2x) dx}{x^2+1}=\dfrac{\pi}{4}+\dfrac{1}{2}\int_0^\infty \dfrac{\cos(2x)dx}{x^2+1}$$
This integral evaluates to $\dfrac{\pi e^{-2}}{2}$ (see https://math.stackexchange.com/a/9409/877722) and so your integral is equal to $\dfrac{\pi}{4}(1+e^{-2})$.
A: It is possible to compute the antiderivative.
Use this tool (which uses Maxima) and look at all the intermediate steps (they are very instructive to read). Look here for Wolfram Alpha solution.
So, omitting the integration constant,  the final result is
$$4x \int\frac{\sin^2(x)}{x^2(x^2+1)}dx=2 \left(\cos (2 x)-x \tan ^{-1}(x)-1\right)+$$ $$x (-i \cosh (2) (\text{Ci}(2 i-2
   x)-\text{Ci}(2 x+2 i))+$$ $$2 i (\text{Ei}(-2 i x)-\text{Ei}(2 i x))+\sinh (2)
   (\text{Si}(2 i-2 x)-\text{Si}(2 x+2 i)))$$ where appear  the exponential, sine and cosine integral functions.
