Motivated by the final step of my answer in evaluating this integral, I tried to make up an indefinite integral on these lines:
$$\int\frac{x^6-x^5-x+1}{x^8+x^4+1}\mathrm dx$$
My solution:
Since the denominator of the integrand can be factorized as $$(x^4-x^2+1)(x^2-x+1)(x^2+x+1)=(x^6-x^5+x^3-x+1)(x^2+x+1)$$
The integral can be split into two:
$$\begin{align}I&=\int\frac{\mathrm dx}{x^2+x+1}-\frac14\int\frac{\mathrm d(x^4)}{x^8+x^4+1}\\&=\frac2{\sqrt3}\tan^{-1}\left(\frac{2x+1}{\sqrt3}\right)-\frac1{2\sqrt3}\tan^{-1}\left(\frac{2x^4+1}{\sqrt3}\right)+C\end{align}$$
Is there any other method to evaluate this intriguing integral? Any comments or ideas are highly appreciated.