TITLE: Integral involving elliptic integral functions
QUESTION [7 upvotes]: Recently I came across this identity:
$$\int _0^1\:\frac{K\left(x\right)}{1+x}dx=\frac{\pi ^2}{8}$$
Where:
$$K\left(x\right)=\int _0^{\frac{\pi }{2}}\:\frac{1}{\sqrt{1-\left(x\sin \left(\theta \right)\right)^2}}d\theta $$
Any hints to how to prove this identity?

REPLY [7 votes]: For $a \in (0,1)$ we have
\begin{align}
\int \limits_0^1 \frac{\mathrm{d} x}{(1+x) \sqrt{1-a^2 x^2}} &\stackrel{x = \frac{2 t}{a (1+t^2)}}{=} \frac{2}{a} \int \limits_0^\frac{1 - \sqrt{1-a^2}}{a} \frac{\mathrm{d}t}{1 + \frac{2}{a} t + t^2} = \frac{2 a}{1-a^2} \int \limits_0^\frac{1 - \sqrt{1-a^2}}{a} \frac{\mathrm{d}t}{\left(\frac{1+at}{\sqrt{1-a^2}}\right)^2 - 1} \\
&\!\stackrel{u = \frac{\sqrt{1-a^2}}{1+a t}}{=} \frac{2}{\sqrt{1-a^2}} \int \limits_{\frac{\sqrt{1-a^2}}{2-\sqrt{1-a^2}}}^{\sqrt{1-a^2}} \frac{\mathrm{d} u}{1-u^2} \\
&\,\,\,\,\,= \frac{2}{\sqrt{1-a^2}} \left[\operatorname{artanh}\left(\sqrt{1-a^2}\right) - \operatorname{artanh}\left(\frac{\sqrt{1-a^2}}{2-\sqrt{1-a^2}}\right)\right]\\
&\,\,\,\,\,= \frac{\log\left(1+\sqrt{1-a^2}\right)}{\sqrt{1-a^2}} \, .
\end{align}
Using this result with $a = \sin(\theta)$ we find
\begin{align}
\int \limits_0^1 \frac{\operatorname{K}(x)}{1+x}\, \mathrm{d} x &= \int \limits_0^1 \int \limits_0^{\pi/2} \frac{\mathrm{d} \theta \, \mathrm{d} x}{(1+x) \sqrt{1 - x^2 \sin^2(\theta)}} \stackrel{\text{Tonelli}}{=} \int \limits_0^{\pi/2} \int \limits_0^1 \frac{\mathrm{d} x \, \mathrm{d} \theta}{(1+x) \sqrt{1 - \sin^2(\theta) x^2}}\\
&= \int \limits_0^{\pi/2} \frac{\log(1+\cos(\theta))}{\cos(\theta)} \, \mathrm{d} \theta = \frac{\pi^2}{8} \,.
\end{align}
The final integral is evaluated here. Incidentally, the same method can be used to compute
$$ \int \limits_0^1 \frac{\operatorname{E}(x)}{1+x}\, \mathrm{d} x = 1 \, . $$