<s>[INST] Calculate $\int_0^1\ln{(\sqrt{1+x}+\sqrt{1-x})}dx$ I am looking for the fastest possible way to calculate:
$$\int_0^1\ln{(\sqrt{1+x}+\sqrt{1-x})}dx$$
The integral appeared on an integration bee where only a few minutes are given to calculate it, so please do not hesitate to use shortcuts in your solution, even if they involve advanced mathematics. Thank you in advance.
 [/INST] $\begin{align}J=\int_0^1\ln{(\sqrt{1+x}+\sqrt{1-x})}dx\end{align}$
Perform the change of variable $\displaystyle y=\frac{1-x}{1+x}$,
$\begin{align}J&=\ln 2\int_0^1 \frac{1}{(1+x)^2}\,dx-\int_0^1 \frac{\ln(1+x)}{(1+x)^2}\,dx+2\int_0^1 \frac{\ln(1+\sqrt{x})}{(1+x)^2}\,dx\\
&=\ln 2\left[\frac{-1}{1+x}\right]_0^1+\left(\left[\frac{\ln(1+x)}{1+x}\right]_0^1-\int_0^1\frac{1}{(1+x)^2}\,dx\right)+2\int_0^1 \frac{\ln(1+\sqrt{x})}{(1+x)^2}\,dx\\
&=\left(-\frac{\ln 2}{2}+\ln 2\right)+\frac{\ln 2}{2}+\left[\frac{1}{1+x}\right]_0^1+2\int_0^1 \frac{\ln(1+\sqrt{x})}{(1+x)^2}\,dx\\
&=\ln 2-\frac{1}{2}+2\int_0^1 \frac{\ln(1+\sqrt{x})}{(1+x)^2}\,dx\\
&=\ln 2-\frac{1}{2}+2\left(\left[-\frac{\ln(1+\sqrt{x})}{1+x}\right]_0^1+\int_0^1\frac{1}{2(1+x)(1+\sqrt{x})\sqrt{x}}\,dx\right)\\
&=-\frac{1}{2}+\int_0^1\frac{1}{(1+x)(1+\sqrt{x})\sqrt{x}}\,dx\\
\end{align}$
Perform the change of variable $\displaystyle y=\sqrt{x}$,
$\begin{align}J&=-\frac{1}{2}+\int_0^1\frac{2}{(1+x^2)(1+x)}\,dx\\
&=-\frac{1}{2}+\int_0^1\left(\frac{1}{1+x}+\frac{1}{1+x^2}-\frac{x}{1+x^2}\right)\,dx\\
&=-\frac{1}{2}+\Big[\ln(1+x)\Big]_0^1+\Big[\arctan x\Big]_0^1-\frac{1}{2}\Big[\ln(1+x^2)\Big]_0^1\\
&=-\frac{1}{2}+\ln 2+\dfrac{\pi}{4}-\frac{1}{2}\ln 2\\
&=\boxed{\dfrac{\pi}{4}+\frac{1}{2}\ln 2-\frac{1}{2}}
\end{align}$
</s>