<s>[INST] 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.
 [/INST] Once we know the answer,
$$\displaystyle\int\frac{x^4-2}{x^2\sqrt{x^4+x^2+2}}dx =\int\frac{x^4-2}{x^3\sqrt{\frac{x^4+x^2+2}{x^2}}}dx=\int\frac{x-\frac2{x^3}}{\sqrt{x^2+1+\frac2{x^2}}}dx$$
Put $\displaystyle x^2+1+\frac2{x^2}=u^2$
</s>