<s>[INST] Partial fractions integral. Compute $\int_{0}^{1} \frac {x^4+1}{x^6+1}dx$ 
Evaluate $\int_{0}^{1} \frac {x^4+1}{x^6+1}dx$.

I directly approached this with partial fractions and rewritten $x^6+1=(x^2)^3+1=(x^2+1)(x^4+x^2+1)$.
Therefore the integral is:
$$\int_{0}^{1} \frac {x^4+1}{(x^2+1)(x^4+x^2+1)}dx=-2\int_{0}^{1} \frac {x}{1+x^2}dx+2\int_{0}^{1}\frac 1{1+x^2}dx-\int_{0}^1\frac {(x-1)^2}{(x^2+1)^2+(\frac {\sqrt{3}}2)^2}dx$$
But I don't know how to solve the last term.
I answered the question... I realized my silly mistake, sorry for bothering...
 [/INST] I'm sorry but I had a really stupid mistake and now I solved the integral really easily...
So this is what I did:
$$I=\int_0^1 \frac {x^4+1}{(x^2)^3+1}dx=\int_0^1\frac{(x^2+1)^2-2x^2}{(x^2+1)(x^4-x^2+1)}dx$$
then we divide top and bottom by $x^2$ and separate the integrals...
we get:
$$I=\int_0^1\frac{1+\frac 1{x^2}}{(x-\frac 1x)^2+1}dx-2\int_0^1\frac{x^2}{(x^3)^2+1}dx$$
and this is:
$$I=arctan(x-\frac 1x)-\frac 23arctan(x^3)$$
which from $0$ to $1$, we get: $I=\frac \pi3.$
</s>