<s>[INST] How do I integrate $\frac{1}{x^6+1}$ My technique so far was substitution with the intent of getting to a sum of three fractions with squares in their denominators.
$t = x^2 \\
\frac{1}{x^6 + 1} = \frac{1}{t^3+1} = \frac{1}{(t+1)(t^2-t+1)}$
Then I try to reduce this fraction into a sum of two fractions
$\frac{A}{t+1} + \frac{B}{t^2-t+1} = \frac{(At^2-(A-B)t) + A + B}{(t+1)(t^2-t+1)}$
And this is where I reach a dead-end
$\begin{cases}
   At^2-(A-B)t &= 0 \\
   A + B &= 1
  \end{cases}$
Any techniques I'm overlooking?
 [/INST] $$\begin{align}x^6+1=(x^2)^3+1^3&=(x^2+1)(x^4-x^2+1)=(x^2+1)((x^2+1)^2-3x^2)\\&=(x^2+1)(x^2-\sqrt3\,x+1)(x^2+\sqrt3\,x+1)\end{align}$$
Now you can use partial fractions:
$$\frac1{(x^2+1)(x^2-\sqrt3\,x+1)(x^2+\sqrt3\,x+1)}=\frac{Ax+B}{x^2+1}+\frac{Cx+D}{x^2-\sqrt3\,+1}+\frac{Ex+F}{x^2+\sqrt3\,+1}$$
</s>