A problem on indefinite integration $$\int\frac{x^4-2}{x^2\sqrt{x^4+x^2+2}}dx$$
I tried some substitutions, but none succeeded in simplifying the expression. Please help.

Disclaimer I'm cheating, I get the final answer from WA and reverse engineering out the steps.  People have any intuition how to get the steps without cheating, please update this answer.
$$\begin{align}
  \int \frac{x^4 - 2}{x^2 \sqrt{x^4+x^2+2}} dx
= & \int \frac{2x^4 + x^2 - (x^4 + x^2 + 2)}{x^2 \sqrt{x^4+x^2+2}} dx\\
= & \int \frac{\frac{x}{2}(x^4+x^2+2)' - (x^4+x^2+2)}{x^2 \sqrt{x^4+x^2+2}} dx\\
= & \int \left[ 
  \frac{1}{x} \frac{d}{dx}\left(\sqrt{x^4+x^2+2}\right) 
+ \frac{d}{dx}\left(\frac{1}{x}\right) \sqrt{x^4+x^2+2} \right] 
dx\\
= & \frac{\sqrt{x^4+x^2+2}}{x} + \text{constant.}
\end{align}$$
