Let $k=\frac{x}{\sqrt{x^{2}+8}}$. Then
$$
E(k) = E\left(\frac{x}{\sqrt{x^{2}+8}}\right) = \int_{0}^{\pi/2}\sqrt{1 - \frac{x^{2}}{x^{2}+8}\sin^{2}t}\,dt.
$$
Substituting this into $I$ and interchanging the order of integration, we obtain
$$
I = \int_{0}^{\pi/2}\int_{0}^{1}\frac{\sqrt{1 - \frac{x^{2}}{x^{2}+8}\sin^{2}t}}{\sqrt{8 - 7x^{2}-x^{4}}}\,dx\,dt.
$$
We have $8 - 7x^{2}-x^{4} = (8+x^2)(1-x^2)$. Thus, $\sqrt{8 - 7x^{2}-x^{4}}=\sqrt{(x^{2}+8)(1-x^{2})}$. Also,
$$
1 - \frac{x^{2}}{x^{2}+8}\sin^{2}t = \frac{8 + x^{2}(1-\sin^2 t)}{x^{2}+8} = \frac{8 + x^{2}\cos^{2}t}{x^{2}+8}.
$$
The integrand in $x$ becomes
$$
\frac{\sqrt{8+x^{2}\cos^{2}t}}{(x^{2}+8)\sqrt{1-x^{2}}}.
$$
Let $x=\sin\phi$, $\phi\in[0,\pi/2]$. Then $dx=\cos\phi\,d\phi$ and $\sqrt{1-x^{2}}=\cos\phi$. The integral in $x$ becomes
$$
\int_{0}^{1}\frac{\sqrt{8+x^{2}\cos^{2}t}}{(x^{2}+8)\sqrt{1-x^{2}}}\,dx = \int_{0}^{\pi/2}\frac{\sqrt{8+\sin^{2}\phi\cos^{2}t}}{\sin^{2}\phi+8}\,d\phi.
$$
Hence
$$
I = \int_{0}^{\pi/2}\int_{0}^{\pi/2}\frac{\sqrt{8+\sin^{2}\phi\cos^{2}t}}{\sin^{2}\phi+8}\,d\phi\,dt.
$$
Let $u=\cos t$. Then $u\in[0,1]$ and $dt=-du/\sqrt{1-u^{2}}$. The $t$-integral becomes
$$
\int_{0}^{\pi/2}\frac{\sqrt{8+\sin^{2}\phi\cos^{2}t}}{\sin^{2}\phi+8}\,dt = \int_{0}^{1}\frac{\sqrt{8+u^{2} \sin^{2}\phi}}{(\sin^{2}\phi+8)\sqrt{1-u^{2}}}du.
$$
Interchanging integrals again:
$$
I = \int_{0}^{1}\frac{1}{\sqrt{1-u^{2}}}\left(\int_{0}^{\pi/2}\frac{\sqrt{8+u^{2}\sin^{2}\phi}}{\sin^{2}\phi+8}d\phi\right)du.
$$
Let $\sin\phi=v$. Then $\phi=0\to v=0$, $\phi=\pi/2\to v=1$, and $d\phi=\frac{dv}{\sqrt{1-v^{2}}}$.
$$
\int_{0}^{\pi/2}\frac{\sqrt{8+u^{2}\sin^{2}\phi}}{8+\sin^{2}\phi}d\phi = \int_{0}^{1}\frac{\sqrt{8+u^{2}v^{2}}}{8+v^{2}}\frac{dv}{\sqrt{1-v^{2}}}.
$$
Thus
$$
I = \int_{0}^{1}\int_{0}^{1}\frac{\sqrt{8+u^{2}v^{2}}}{(8+v^{2})\sqrt{1-u^{2}}\sqrt{1-v^{2}}}du\,dv.
$$
After arriving at the double integral
$$
I = \int_{0}^{1}\int_{0}^{1}\frac{\sqrt{8+u^{2}v^{2}}}{(8+v^{2})\sqrt{1-u^{2}}\sqrt{1-v^{2}}} \,du\,dv,
$$
we introduce substitutions designed to remove the square roots $\sqrt{1-u^{2}}$ and $\sqrt{1-v^{2}}$. Specifically, set
$$
u = \frac{w}{\sqrt{1+w^{2}}}, \quad v = \frac{z}{\sqrt{1+z^{2}}}.
$$
These substitutions map $[0,1]$ in $u$ and $v$ to $[0,\infty)$ in $w$ and $z$, respectively. Indeed, as $u\to 1$, $w\to\infty$, and as $v\to 1$, $z\to\infty$. Also, when $u=0$, $w=0$, and similarly $v=0$ maps to $z=0$. Thus, the integration domain in $(w,z)$-space is $[0,\infty)\times[0,\infty)$.
For $u$: We have
$$
u = \frac{w}{\sqrt{1+w^{2}}} \implies u^{2}=\frac{w^{2}}{1+w^{2}}, \quad 1-u^{2}=\frac{1}{1+w^{2}}.
$$
Differentiating,
$$
du = \frac{d}{dw}\left(\frac{w}{\sqrt{1+w^{2}}}\right)dw = \frac{1}{(1+w^{2})^{3/2}}\,dw.
$$
Hence
$$
\sqrt{1-u^{2}} = \frac{1}{\sqrt{1+w^{2}}}.
$$
For $v$: Similarly,
$$
v = \frac{z}{\sqrt{1+z^{2}}} \implies 1-v^{2}=\frac{1}{1+z^{2}}, \quad dv=\frac{1}{(1+z^{2})^{3/2}}\,dz.
$$
Thus
$$
\sqrt{1-v^{2}} = \frac{1}{\sqrt{1+z^{2}}}.
$$
Substitute these into the integral. The integrand involves $\frac{1}{\sqrt{1-u^{2}}\sqrt{1-v^{2}}}$, which becomes $\sqrt{(1+w^{2})(1+z^{2})}$. The factors $du\,dv$ transform to $\frac{dw}{(1+w^{2})^{3/2}}\frac{dz}{(1+z^{2})^{3/2}}$.
After expressing $8+v^{2}$ and $8+u^{2}v^{2}$ in terms of $w,z$, and simplifying, one obtains:
$$
I = \int_{0}^{\infty}\int_{0}^{\infty} \frac{\sqrt{8(1+w^{2})(1+z^{2})+w^{2}z^{2}}}{(8+9z^{2})\sqrt{1+w^{2}}\sqrt{1+z^{2}}} \cdot \frac{1}{(1+w^{2})(1+z^{2})} \cdot \frac{1}{\sqrt{(1+w^{2})(1+z^{2})}} \,dw\,dz.
$$
To factor this into a product, we make the trigonometric substitutions
$$
w=\tan\alpha,\quad z=\tan\beta, \quad \alpha,\beta\in[0,\pi/2].
$$
This choice is natural because $\sec^{2}\alpha=1+\tan^{2}\alpha=1+w^{2}$ and $\sec^{2}\beta=1+\tan^{2}\beta=1+z^{2}$.
Using these substitutions and trigonometric identities such as $\cos^{2}\alpha=1/\sec^{2}\alpha$ and $\cos^{2}\beta=1/\sec^{2}\beta$, and after algebraic manipulation, the integral factors as:
$$
I = \frac{1}{3}\left(\int_{0}^{\pi/2}\frac{dx}{\sqrt{1+\cos^{2}x}}\right)\left(\int_{0}^{\pi/2}\sqrt{1+\cos^{2}x}\,dx\right).
$$
$$I(n)=\int_0^\frac{\pi}{2} \frac{E\left(\frac{\sin x}{2n-1}\right)}{\sqrt{1-\left(\frac{\sin x}{2n-1}\right)^2}}dx = E\left(\frac{1}{\sqrt{n}}\right)K\left(\frac{1}{\sqrt{n}}\right), n>1$$
The form of the result suggest that the same approach seen in 3.2 (Ramanujan Rotations) from this article (starting from page 17) might work, but adapted for $E(\sqrt k)K(\sqrt k)$ instead of $K(\sqrt s) K(\sqrt t)$.
– Zacky Dec 14 '24 at 02:18