Evaluate $\int\frac{1}{1+x^6} \,dx$ I came across following problem

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

When I asked my teacher for hint he said first evaluate

$$\int\frac{1}{1+x^4} \,dx$$

I've tried to factorize $1+x^6$ as
$$1+x^6=(x^2 + 1)(x^4 - x^2 + 1)$$
and then writing
$$I=\int\frac{1}{1+x^6} \,dx=\int\frac{1}{(x^2 + 1)(x^4 - x^2 + 1)} \,dx=\int\frac{1+x^2-x^2}{(x^2 + 1)(x^4 - x^2 + 1)} \,dx$$
$$I=\int\frac{1}{x^4 - x^2 + 1} \,dx-\int\frac{x^2}{(x^2 + 1)(x^4 - x^2 + 1)} \,dx$$
However $$x^4-x^2+1=\left(x^2-\frac12\right)^2+\frac{3}{4}$$
But I can't see how it helps
I've also tried to reverse engineer the solution given by Wolfram Alpha
And I need to have terms similar to
$$\frac{x^2-1}{x^4-x^2+1} \quad , \quad \frac{1}{1+x^2} \quad , \quad \frac{1}{(x+c)^2+1}\quad , \quad \frac{1}{(x+c)^2+1}$$ in integrand, How can I transform my cute looking integrand into these huge terms?
Since in exams I will neither have access to WA nor time to reverse engineer the solution moreover it does not seem intuitive,is there any way to solve this problem with some nice tricks or maybe substitutions?
 A: With $1+x^6= (1+x^2)(x^4-x^2+1)$, decompose the integrand
\begin{align}
& \int \frac{dx}{1+x^6}
=\frac13\int \left( \frac{1}{1+x^2}+\frac12\frac{x^2+1}{x^4-x^2+1}- \frac32\frac{x^2-1}{x^4-x^2+1}\right)dx \\
&\hspace{15mm}=\frac13\int \frac{dx}{1+x^2}+\frac16\int \frac{d(x-\frac1x)}{(x-\frac1x)^2+1}dx - \frac12\int \frac{d(x+\frac1x)}{(x+\frac1x)^2-3} dx \\
\end{align}
A: Here's a nice "trick" my former professor taught me
$$ \int\frac{dx}{1+x^6} = \frac{1}{2} \int \frac{(1-x^2+x^4)+x^2+(1-x^4)}{(1+x^2)(1-x^2+x^4)} dx \\
= \frac{1}{2}\int \frac{dx}{1+x^2} + \frac{1}{2} \int \frac{x^2}{1+x^6} dx + \frac{1}{2} \int \frac{1-x^2}{1-x^2+x^4} dx \\
= \frac{1}{2}\int \frac{dx}{1+x^2} + \frac{1}{2} \int \frac{x^2}{1+x^6} dx - \frac{1}{2} \int \frac{1-\frac{1}{x^2}}{x^2-1+\frac{1}{x^2}} dx  $$
The first integral is simply the arctangent of $x$. The second can be solved by substituting $u = x^3$. The third can be solved by substituting $t = x + \frac{1}{x}$
A: By partial fraction expansion, $$I=\int{1\over x^6+1}dx=\int{1\over f(x)}={1\over f'(x_1)}\int{dx\over x-x_1}+{1\over f'(x_2)}\int{dx\over x-x_2}\ldots+{1\over f'(x_6)}\int{dx\over x-x_6}=\sum_{k=0}^6\ln(x-x_k)^{1\over f'(x_k)}$$ where $x_k$ are the roots of the denominator polynomial. The six complex roots of −1 are $(-1)^{1/6}=e^{(2k+1)\pi i/6},\;k=0\ldots5$ So the integral is
[Correction/simplification: ${1\over f'(x_k)}={1\over6x_k^5}=-{x_k\over6}$]
$$I={1\over6}\ln\left(\Pi_{k=0}^5\left(x-e^{\frac{(2k+1)\pi}{6}i}\right)^{e^\frac{-5(2k+1)\pi i}{6}}\right)={1\over6}\ln\left(\Pi_{k=0}^5\left(x-e^{\frac{(2k+1)\pi}{6}i}\right)^{-e^\frac{(2k+1)\pi i}{6}}\right)$$
A: Hint:
$$1+x^6$$ factors with the sixth roots of minus one, $\pm i$ and $\dfrac{\pm\sqrt3\pm i}2$ and by grouping the conjugate roots, we obtain a real factorization:
$$(1+x^2)(1+\sqrt3 x+x^2)(1-\sqrt3 x+x^2).$$
From this we deduce a decomposition in simple fractions,
$$\frac1{1+x^6}=a\frac{2x+b}{1+x^2}+c\frac{(2x+\sqrt3)+d}{1+\sqrt3x+x^2}+e\frac{(2x-\sqrt3)+f}{1-\sqrt3x+x^2}.$$
Then by shitfing the variables,
$$a\frac{2x+b}{1+x^2}+c\frac{2x'+d}{1+x'^2}+e\frac{2x''+f}{1+x''^2}$$ are easy to integrate.
A: As suggested, you can transform your denominator $1+x^6$ into $(1+x^2)(1-x^2+x^4)$. You can then use partial fractions to split the following into something that can be integrated:
$\Large\int \frac{1}{(1+x^2)(1-x^2+x^4)}dx$ 
Hope that helps. It looks like a very nasty and messy integration to do. Best wishes.
