<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] 
$$\int { \frac { \cos ^{ 4 } x+\sin ^{ 4 } x }{ \sqrt { 1+\cos4x }  } dx } =\frac { 1 }{ \sqrt { 2 }  } \int { \frac { { \left( \sin ^{ 2 }{ x+\cos ^{ 2 }{ x }  }  \right)  }^{ 2 }-2\sin ^{ 2 }{ x\cos ^{ 2 }{ x }  }  }{ \sqrt { \cos ^{ 2 }{ 2x }  }  } dx } =\\ =\frac { 1 }{ \sqrt { 2 }  } \int { \frac { 1-\frac { \sin ^{ 2 }{ 2x }  }{ 2 }  }{ \cos { 2x }  }  } dx=\frac { 1 }{ 2\sqrt { 2 }  } \int { \frac { 2-\sin ^{ 2 }{ 2x }  }{ \cos { 2x }  }  } dx=\\ =\frac { 1 }{ 2\sqrt { 2 }  } \int { \frac { \cos ^{ 2 }{ 2x } +1 }{ \cos { 2x }  }  } dx=\frac { 1 }{ 2\sqrt { 2 }  } \left[ \int { \cos { 2xdx }  } +\int { \frac { dx }{ \cos { 2x }  }  }  \right] =\\ =\frac { 1 }{ 4\sqrt { 2 }  } \int { d\left( \sin { 2x }  \right)  } +\frac { 1 }{ 2\sqrt { 2 }  } \int { \frac { \cos { 2xdx }  }{ \cos ^{ 2 }{ 2x }  }  } =\\ =\frac { \sin { 2x }  }{ 4\sqrt { 2 }  } +\frac { 1 }{ 4\sqrt { 2 }  } \int { \frac { d\left( \sin { 2x }  \right)  }{ 1-\sin ^{ 2 }{ 2x }  }  } =\frac { \sin { 2x }  }{ 4\sqrt { 2 }  } +\frac { 1 }{ 8\sqrt { 2 }  } \left[ \int { \frac { d\left( \sin { 2x }  \right)  }{ 1-\sin { 2x }  }  } +\int { \frac { d\left( \sin { 2x }  \right)  }{ 1+\sin { 2x }  }  }  \right] =\\ =\frac { \sin { 2x }  }{ 4\sqrt { 2 }  } +\frac { 1 }{ 8\sqrt { 2 }  } \left[ \int { \frac { d\left( 1+\sin { 2x }  \right)  }{ 1+\sin { 2x }  }  } -\int { \frac { d\left( 1-\sin { 2x }  \right)  }{ 1-\sin { 2x }  }  }  \right] =\\ =\frac { \sin { 2x }  }{ 4\sqrt { 2 }  } +\frac { 1 }{ 8\sqrt { 2 }  } \ln { \left| \frac { 1+\sin { 2x }  }{ 1-\sin { 2x }  }  \right| + } C\\ $$

</s>