<s>[INST] Integral $\int\left(\frac{1}{x^4+x^2+1}\right)dx$ Someone can halp me to solve this integral:
$$\int\left(\frac{1}{x^4+x^2+1}\right)$$
solution$$\frac{1}{4}\ln\left(\frac{x^2+x+1}{x^2-x+1}\right)+\frac{1}{2\sqrt3}\arctan\frac {x^2-1}{x\sqrt3}$$ 
I don't manage using partial fraction because $${x^4+x^2+1}$$ has $\Delta\lt 0$ and substituing $t=x^2,$ $2x$ appears.That's a problem. 
 [/INST] HINT:
$$\dfrac2{x^4+x^2+1}=\dfrac{x^2+1-(x^2-1)}{x^4+x^2+1} =\dfrac{1+\dfrac1{x^2}}{x^2+1+\dfrac1{x^2}}-\dfrac{1-\dfrac1{x^2}}{x^2+1+\dfrac1{x^2}}$$
Now as $\int\left(1+\dfrac1{x^2}\right)dx=x-\dfrac1x,$
write the denominator as $\left(x-\dfrac1x\right)^2+3$
Similarly for the second integral.
</s>