<s>[INST] Is there an efficient way of showing $\int_{-1}^{1} \ln\left(\frac{2(1+\sqrt{1-x^2})}{1+x^2}\right)dx = 2$? Hi I recently came across the following integral:
$$
\int_{-1}^{1} \ln\left(\frac{2(1+\sqrt{1-x^2})}{1+x^2}\right)dx
$$
When an integral calculator finds the antiderivative of the equation (if it even can) it comes out as this crazy formula.
Anyways the definite integral happens to be equal to 2 and I was wondering if there might be an elegant way of showing that this is the case.
Thank you.
 [/INST] Integrate by parts
\begin{align}
\int_{-1}^{1} \ln \frac{2(1+\sqrt{1-x^2})}{1+x^2}dx=&
- \int_{-1}^1 x \>d\left( \ln \frac{2(1+\sqrt{1-x^2})}{1+x^2} \right)dx\\
=& \int_{-1}^1  \left(\frac{1-\sqrt{1-x^2}}{\sqrt{1-x^2}}
+\frac{2x^2}{1+x^2} \right)dx\\
=&\int_{-1}^1 \left( 1+ \frac1{\sqrt{1-x^2}}-\frac2{1+x^2} \right)dx\\
= &(x+\sin^{-1}x-2\tan^{-1}x)| _{-1}^1=2
\end{align}
</s>