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?
 A: $\displaystyle I=\int_0^1\sqrt{1+\sqrt{1-x^2}}\frac{dx}{1+x^2}\,dx$
Perform the change of variable $y=\sqrt{1-x^2}$,
$\begin{align}I&=\int_0^1 \frac{x}{(2-x^2)\sqrt{1-x}}\,dx\tag{1}\\
&=\Big[\sqrt{\sqrt{2}-1} \cdot\text{arctanh}\left(\sqrt{\sqrt{2}-1}\sqrt{1-x}-\sqrt{\sqrt{2}+1}\cdot\arctan\left(\sqrt{\sqrt{2}+1}\sqrt{1-x}\right)\right)\Big]_0^1\\
&=\boxed{\sqrt{\sqrt{2}+1}\cdot\arctan\left(\sqrt{\sqrt{2}+1}\right)-\sqrt{\sqrt{2}-1}\cdot\text{arctanh}\left(\sqrt{\sqrt{2}-1}\right)}
\end{align}$
Addendum:
if you want to transform the integral into an integral whose integrand is a  rational fraction,
perform the change of variable $y=\sqrt{1-x}$ in $(1)$
$\begin{align}I=\int_0^1 \dfrac{2(x^2-1)}{x^4-2x^2-1}\,dx\end{align}$
A: By enforcing the substitution $x=\sin\theta$ we are left with
$$ I = \int_{0}^{\pi/2}\sqrt{1+\cos\theta}\frac{\cos\theta}{1+\sin^2\theta}\,d\theta = \sqrt{2}\int_{0}^{\pi/2}\frac{\cos\theta\cos\frac{\theta}{2}}{1+\sin^2\theta}\,d\theta$$
and by enforcing the substitution $\theta=2\varphi$ we get:
$$ I = 2 \sqrt{2}\int_{0}^{\pi/4}\frac{\cos(\varphi)(2\cos^2(\varphi)-1)}{1+4\sin^2(\varphi)\cos^2(\varphi)}\,d\varphi. $$
By setting $\varphi=2\arctan t$, the original integral is converted into the integral of a rational function over the interval $J=\left(0,\tan\frac{\pi}{8}\right)=\left(0,\sqrt{2}-1\right)$, namely
$$ I = 4\sqrt{2}\int_J \frac{1-7 t^2+7 t^4-t^6}{1+20 t^2-26 t^4+20 t^6+t^8}\,dt. $$
Now the closed form of $I$ just depends on the partial fraction decomposition of the last integrand function, i.e. on the roots of $p(t)=1+20 t^2-26 t^4+20 t^6+t^8$. $p(t)$ is an even and palindromic polynomial, so its roots are given by triple-nested square roots, but finding them is pretty easy, since the whole problem boils down to solving a quadratic equation. I will let you fill the missing details.
A: 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}$$
