Indefinite integral $\int \frac{1}{1+\sin^4(x)} \, \mathrm dx$ I'm a bit lost in this integral: $$\int \frac{1}{1+\sin^4(x)} \, \mathrm dx$$
I have tried solving with Wolfram, but I was getting a cosecant solution which doesn't seem as the correct method.
Do you have any ideas? :)
EDIT:
Do you please have step-by-step solution, because I am now somewhat lost. Using the substitution $t=\tan(x)$, I got to
$$\int \left(\frac{t^2}{2t^4+2t^2+1}+\frac{1}{2t^4+2t^2+1}\right)\mathrm dt$$
By expanding with 1:
$$\int \frac{1}{1+\sin^4x}\cdot \frac{\frac{1}{\cos^4x}}{\frac{1}{\cos^4x}}\mathrm dx$$
$$\int \:\frac{1}{\frac{1}{\cos^4x}\cdot \frac{\sin^4x}{\cos^4x}}\cdot \frac{1}{\cos^4x} \mathrm dx$$
$$\int \:\frac{1}{\left(\frac{1}{\cos^2x}\right)^2\cdot \tan^4x}\cdot \frac{1}{\cos^2x}\cdot \frac{1}{\cos^2x}\mathrm dx$$
And using the substitution: $t=\tan\left(x\right)$
$$\mathrm dt=\frac{1}{\cos^2x}\mathrm dx$$
$$t^2=\tan^2\left(x\right)$$
$$t^2=\frac{\sin^2x}{\cos^2x}$$
$$t^2=\frac{1-\cos^2x}{\cos^2x}$$
$$t^2=\frac{1}{\cos^2x}-\frac{\cos^2x}{\cos^2x}=\frac{1}{\cos^2x}-1$$
$$t^2+1=\frac{1}{\cos^2x}$$
Using it:
$$\int \:\frac{t^2+1}{2t^4+2t^2+1}\mathrm dt$$
I don't think I got to the expected result but I can't seem to be able to find why…
 A: Following your substitution $t= \tan x$, integrate the resulting as follows
\begin{align}
&\int \frac1{1+\sin^4x}dx\\
=&\int \:\frac{t^2+1}{2t^4+2t^2+1}dt
=\int \frac{1+\frac1{t^2}}{(\sqrt2t)^2 + \frac1{t^2}+1}dt\\
=&\frac{\sqrt2+1}{2\sqrt2} \int \frac{\sqrt2+\frac1{t^2}}{(\sqrt2t)^2 + \frac1{t^2}+1}dt
-\frac{\sqrt2-1}{2\sqrt2} \int \frac{\sqrt2-\frac1{t^2}}{(\sqrt2t)^2 + \frac1{t^2}+1}dt\\
 =&\frac{\sqrt2+1}{2\sqrt2} \int \frac{d(\sqrt2t-\frac1{t})}{(\sqrt2t-\frac1t)^2 + 2(\sqrt2+1)}dt
-\frac{\sqrt2-1}{2\sqrt2} \int \frac{d(\sqrt2t+\frac1{t})}{(\sqrt2t+\frac1t)^2 -2(\sqrt2-1)} dt\\
 =&\frac{\sqrt{\sqrt2+1}}4\tan^{-1} \frac{t-\frac1{\sqrt2 t}}{\sqrt{\sqrt2+1}}
+\frac{\sqrt{\sqrt2-1}}4\coth^{-1} \frac{t+\frac1{\sqrt2 t}}{\sqrt{\sqrt2-1}}+C
\end{align}
A: Double-check my arithmetic, but here's the strategy.
@Bernard's suggested substitution $t=\tan x$ gives
\begin{align}
& \int\left(1-\frac{t^4}{(t^2\sqrt{2}+1)^2-2(\sqrt{2}-1)t^2}\right) dt \\
= {} & t-\int\frac{t^4}{(t^2\sqrt{2}+ct+1)(t^2\sqrt{2}-ct+1)} \, dt\end{align}
with $c:=\sqrt{2\sqrt{2}-1}$. You can do the rest with partial fractions.
A: For $n=4$, you can make it shorter since
$$A=\frac 1{1+\sin^4(x)}=\frac 1{(\sin^2(x)+i)(\sin^2(x)-i)}$$
Using partial fractions and double angle formula
$$A=\frac{i}{\cos (2 x)-(1-2 i)}-\frac{i}{\cos (2 x)-(1+2 i)}$$ Using now the tangent half-angle
$$\int \frac {dx}{1+\sin^4(x)}=\frac{\tan ^{-1}\left(\tan (x)\sqrt{1-i} \right)}{2 \sqrt{1-i}}+\frac{\tan
   ^{-1}\left(\tan (x)\sqrt{1+i} \right)}{2 \sqrt{1+i}}$$
