Integrating $\displaystyle\int \frac{1+x^2}{1+x^4}dx$ I am trying to integrate this function, which I got while solving $\int\frac{1}{\sin^4( x) + \cos^4 (x)}$:

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

I think to factorise the denominator, and use partial fractions. But I cant seem to find roots of denominator. I also am unable to think substitution.

Hint: $$\int\frac{1+x^{2}}{1+x^{4}}dx=\frac{1}{2}\int\left(\frac{1}{x^{2}+\sqrt{2}x+1}+\frac{1}{x^{2}-\sqrt{2}x+1}\right)dx$$ $$=\frac{1}{2}\int\left(\frac{1}{\left(x+\frac{1}{\sqrt{2}}\right)^{2}+\frac{1}{2}}+\frac{1}{\left(x-\frac{1}{\sqrt{2}}\right)^{2}+\frac{1}{2}}\right)dx.$$
