<s>[INST] Integral of $\int{\frac{\cos^4x + \sin^4x}{\sqrt{1 + \cos 4x}}dx}$ How do we integrate the following?

$\int{\frac{\cos^4x + \sin^4x}{\sqrt{1 + \cos 4x}}dx}$ given that $\cos 2x \gt 0$

I tried to simplify this, but I cannot seem to proceed further than the below form:

$\int{\frac{\sec2x}{\sqrt{2}}dx + \sqrt{2}\int{\frac{\sin^2x\cos^2x}{\cos2x}dx}}$
$\implies \frac{1}{2\sqrt2}\log |\sec 2x + \tan 2x| + \sqrt{2}\int{\frac{\sin^2x\cos^2x}{\cos^2x-\sin^2x}dx} + C$

The answer that I'm supposed to get is:

$\frac{x}{\sqrt2}+C$

Please help, thanks!
 [/INST] Using $\cos2x=1-2\sin^2x=2\cos^2x-1,$
$$I=\dfrac{\sin^4x+\cos^4x}{\sqrt{1+\cos4x}}=\dfrac{(1-\cos2x)^2+(1+\cos2x)^2}{4\sqrt2|\cos2x|}=\dfrac{1+\cos^22x}{2\sqrt2|\cos2x|}$$
For $\cos2x>0,$
$$2\sqrt2I=\sec2x+\cos2x$$
Now use Integral of the secant function
</s>