<s>[INST] A difficult integral $I=\int_0^1\sqrt{1+\sqrt{1-x^2}}\frac{dx}{1+x^2}$ How to prove
$$I=\int_0^1\sqrt{1+\sqrt{1-x^2}}\frac{dx}{1+x^2}=\sqrt{\sqrt{2}+1}\arctan\sqrt{\sqrt{2}+1}-\frac{1}{2}\sqrt{\sqrt{2}-1}\ln(1+\sqrt{2}+\sqrt{2+2\sqrt{2}})$$
$$ I=\int_0^{\pi/4}\sqrt{1+\sqrt{1-\tan^2y}}dy=\int_0^{\pi/4}\sqrt{{cosy}+\sqrt{\cos2y}}\frac{dy}{\sqrt{cosy}} $$
put  $$x=tany$$
 But how to calculate this integral?
 [/INST] Try $x = \sin u$, so that $dx = \cos(u)\, du$.
Then use the fact that: $$\sqrt{1+\sqrt{1-\sin^2 u}} = \sqrt{1+\cos u} =\sqrt{2} |\cos\tfrac{u}{2}|$$ 
The integral converts to:
$$\begin{align}
I &= \int_{0}^{\tfrac{\pi}{2}} \frac{\sqrt{2} \cos\tfrac{u}{2} \, \cos u}{1+\sin^2 u} du \\
\end{align}$$
</s>