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.

Let $$I = \int\frac{1}{\sin^4 x+\cos^4 x}dx = \int\frac{1}{\sin^2 x\cos^2 x\left(\tan^2 x+\cot^2 x\right)}dx$$
$$I =\int\frac{\sin^2 x+\cos^2 x}{\sin^2 x\cos^2 x\left(\tan^2 x+\cot^2 x\right)}dx= \int\frac{\sec^2 x+\csc^2 x}{(\tan x-\cot x)^2+\left(\sqrt{2}\right)^2}dx$$
Now Put $\tan x-\cot x = t\;,$ Then $(\sec^2 x+\csc^2 x)dx=dt$
$$I = \int\frac{1}{t^2+(\sqrt{2})^2}dt = \frac{1}{\sqrt{2}}\tan^{-1}\left(\frac{t}{\sqrt{2}}\right)+\mathcal{C}$$
So $$I = \int\frac{1}{\sin^4 x+\cos^4 x}dx = \frac{1}{\sqrt{2}}\tan^{-1}\left(\frac{\tan x-\cot x}{\sqrt{2}}\right)+\mathcal{C}.$$
