# Integrate expression with $x^6$ [duplicate]

This question already has an answer here:

So I'm trying to integrate this expression, but I'm not figuring out what's the best substitution to do...

$\int \frac {1}{x^6+1} dx$

I tried to take $x^6 +1$ and write $(x^2 + 1) (x^4 -x^2 + 1)$ and then do partial functions, so I reach to the sum of two expressions.

One of them is easy to integrate...

But the other one:

$\frac {x^2-1} {x^4 - x^2 + 1}$

I'm having trouble integrating...

Is there any easier method or is there a way to integrate this right from the beginning or can someone give a hint about how to integrate this last expression?

Thanks!

## marked as duplicate by Git Gud, Yagna Patel, mickep, colormegone, user147263 Jan 1 '16 at 17:57

Hint 2: $$x^6+1=(x^2+1)(x^4-x^2+1)=(x^2+1)((x^2+1)^2-3x^2)=(x^2+1)(x^2+ \sqrt{3}x+1)(x^2- \sqrt{3}x+1)$$
HINT: the partialfrac decomposition is given by $$1/3\, \left( {x}^{2}+1 \right) ^{-1}+1/3\,{\frac {-{x}^{2}+2}{{x}^{4}- {x}^{2}+1}}$$ and $$x^4-x^2+1=(x^2-1/2)^2+\frac{3}{4}$$ $$x^4-x^2+1=(x^2+1)^2-3x^2$$ is better (see above) since we get a product finally we obtain $$1/3\,\arctan \left( x \right) -1/12\,\sqrt {3}\ln \left( {x}^{2}- \sqrt {3}x+1 \right) +1/6\,\arctan \left( 2\,x-\sqrt {3} \right) +1/12 \,\sqrt {3}\ln \left( {x}^{2}+\sqrt {3}x+1 \right) +1/6\,\arctan \left( 2\,x+\sqrt {3} \right)$$ for the first integral and $$1/6\,\sqrt {3}\ln \left( {x}^{2}-\sqrt {3}x+1 \right) -1/6\,\sqrt {3} \ln \left( {x}^{2}+\sqrt {3}x+1 \right)$$ for the second one