Integral involving elliptic integral functions

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 \, . $$


Well, we are trying to find the following integral:

$$\mathcal{I}:=\int_0^1\frac{1}{1+x}\cdot\left(\int_0^\frac{\pi}{2}\frac{1}{\sqrt{1-\left(x\sin\left(\theta\right)\right)^2}}\space\text{d}\theta\right)\space\text{d}x\tag1$$

Now, the inner integral is known as the complete elliptic integral of the first kind. And can be written as:

$$\int_0^\frac{\pi}{2}\frac{1}{\sqrt{1-\left(x\sin\left(\theta\right)\right)^2}}\space\text{d}\theta=\frac{\pi}{2}\sum_{\text{n}=0}^\infty\left(\frac{\left(2\text{n}\right)!}{2^{2\text{n}}\cdot\left(\text{n}!\right)^2}\right)^2\cdot x^{2\text{n}}\tag2$$

So, we can write:

$$\mathcal{I}=\int_0^1\frac{1}{1+x}\cdot\left(\frac{\pi}{2}\sum_{\text{n}=0}^\infty\left(\frac{\left(2\text{n}\right)!}{2^{2\text{n}}\cdot\left(\text{n}!\right)^2}\right)^2\cdot x^{2\text{n}}\right)\space\text{d}x=$$ $$\frac{\pi}{2}\sum_{\text{n}=0}^\infty\left(\frac{\left(2\text{n}\right)!}{2^{2\text{n}}\cdot\left(\text{n}!\right)^2}\right)^2\int_0^1\frac{x^{2\text{n}}}{1+x}\space\text{d}x\tag3$$

Now, we need to look at using long division on the integrand. Which gives (when $\text{n}\in\mathbb{N}^+$):

$$\frac{x^{2\text{n}}}{1+x}=\frac{1}{1+x}-1+\sum_{\text{k}=1}^\text{n}x^{2\text{k}-1}-\sum_{\text{p}=1}^{\text{n}-1}x^{2\text{p}}\tag4$$


When $\text{n}=0$, we get for $(3)$:

$$\left(\frac{\left(2\cdot0\right)!}{2^{2\cdot0}\cdot\left(0!\right)^2}\right)^2\int_0^1\frac{x^{2\cdot0}}{1+x}\space\text{d}x=\ln\left(2\right)\tag5$$

And it is not hard to prove that:

$$\text{P}_\text{n}:=\int_0^1\frac{x^{2\text{n}}}{1+x}\space\text{d}x=$$ $$\int_0^1\left(\frac{1}{1+x}-1+\sum_{\text{k}=1}^\text{n}x^{2\text{k}-1}-\sum_{\text{p}=1}^{\text{n}-1}x^{2\text{p}}\right)\space\text{d}x=$$ $$\ln\left(2\right)-1+\sum_{\text{k}=1}^\text{n}\frac{1}{2\text{k}}-\sum_{\text{p}=1}^{\text{n}-1}\frac{1}{1+2\text{p}}\tag6$$

So, we can write:

$$\mathcal{I}=\frac{\pi}{2}\left\{\ln\left(2\right)+\sum_{\text{n}=1}^\infty\left(\frac{\left(2\text{n}\right)!}{2^{2\text{n}}\cdot\left(\text{n}!\right)^2}\right)^2\text{P}_\text{n}\right\}\tag7$$