Indefinite integration problem $\int {\frac{1}{1+ \tan^4 x}}dx$ The following problem came up in my last examination.

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

The difficulty I was facing was that I wasn't able to find anything to substitute as there was nothing special in the numerator. So I tried the following approach:

$$ \int {\frac{1}{1+ \tan^4 x}}dx = \int {\frac{\cos^4 x}{\cos^4 x + \sin^4 x}}dx$$

However this came to no good as it was still useless to substitute $\sin x$ as $t$ and get $dt=\cos x dx$
Next I tried substituting $\tan x$ as $t$
$$ t=\tan x \implies dt=\sec^2 x dx \implies dx=\frac{dt}{1+t^2} $$
giving me  

$$ \int {\frac{dx}{(1+t^4)(1+t^2)}}$$

My question then is how do I split these into partial fractions and solve the integral? And, of course, if there is a better way to solve this integral, please suggest one.

Duplication formulas and the relation $\frac{1}{2-u^2}=\frac{1}{2\sqrt{2}}\left(\frac{1}{\sqrt{2}-u}-\frac{1}{\sqrt{2}+u}\right)$ give a good way:
$$ I = \int\frac{\cos^4 t}{\sin^4 t+\cos^4 t}\,dt=\int\frac{\cos^4 t}{1-2\sin^2t\cos^2 t}=\int\frac{\left(\frac{1+\cos(2t)}{2}\right)^2}{1-\frac{1}{2}\sin^2(2t)}\,dt$$
hence:
$$ I = \frac{1}{2}\int\frac{(1+\cos(2t))^2}{1+\cos^2(2t)}\,dt=\frac{t}{2}+\int\frac{\cos(2t)}{2-\sin^2(2t)}\,dt$$
and:
$$ I = \color{red}{\frac{t}{2}+\frac{1}{4\sqrt{2}}\log\frac{\sqrt{2}+\sin(2t)}{\sqrt{2}-\sin(2t)}}.$$
