Evaluating $\int\frac{x^4+1}{x^6+1}dx$ I have problem with this integral:
$$\int\dfrac{x^4+1}{x^6+1}dx$$
I guess it is easy, but I was trying for quite a long time and the only thing I got is headache.
Thanks for help 
 A: Try
$$
\frac{x^4+1}{x^6+1}=\frac{x^4-x^2+1}{x^6+1}+\frac{x^2}{x^6+1}
=\frac1{x^2+1}+\frac{x^2}{x^6+1}.
$$
The first term is a table integral. The second term reduces to it with the substitution $t=x^3, dt=3x^2\,dx$.
A: hint 
$$\frac{x^4+1}{x^6+1}=\frac{2}{3(x^2+1)}+\frac{x^2+1}{3(x^4-x^2+1)}$$
And proceed to the next step in decomposing the second fraction of the RHS
A: $\bf{My\; Solution:: }$ Let $$\displaystyle I = \int\frac{x^4+1}{x^6+1}dx = \int \frac{(x^2+1)^2-2x^2}{(x^2+1)\cdot (x^4-x^2+1)}dx$$
$$\displaystyle I  = \int\frac{x^2+1}{x^4-x^2+1}dx-2\int\frac{x^2}{(x^3)^2+1}dx = \int\frac{\left(1+\frac{1}{x^2}\right)}{\left(x-\frac{1}{x}\right)^2+1}dx-\frac{2}{3}\int\frac{3x^2}{(x^3)^2+1}dx$$
For First Integral put $$\displaystyle \left(x-\frac{1}{x}\right)=t\;\;,$$ Then $$\left(1+\frac{1}{x^2}\right)dx =dt$$
And for Second Integral Put $$x^3=u\;\;, 3x^2dx=du$$
So We Get $$\displaystyle I = \int\frac{x^4+1}{x^6+1}dx = \tan^{-1}\left(x-\frac{1}{x}\right)-\frac{2}{3}\tan^{-1}(x^3)+\mathcal{C}$$
