I came across another old post concerning a definite integral whose closed form can be expressed with a complete elliptic integral:
$$I = \int_0^\infty \left(\sqrt{1+x^4} - x^2\right) \, dx = \frac1{6\sqrt\pi} \Gamma^2\left(\frac14\right) = \frac23 K\left(\frac1{\sqrt2}\right)$$
Q: How can we manipulate $I$ to obtain an explicit elliptic integral form?
Consider this part III in a series of similar self-imposed challenges. The goal is to remain in Trig-Land, if possible. I'm well aware of the existing solutions relying on beta and hypergeometric functions. NB: The titular integral is equivalent to that in the third line below. (Part I; part II; bonus post in the same spirit sans elliptic integral)
My attempt
$$\begin{align*} I &= \int_0^\infty \left(\sqrt{1+x^4} - x^2\right) \, dx \\ &= \int_0^\tfrac\pi2 \frac{\sec x - \tan x}{2\cos^2x \sqrt{\tan x}} \, dy & x\to\sqrt{\tan x} \\ &= \int_0^\tfrac\pi2 \sec x (\sec x - \tan x) \sqrt{\tan x} \, dx & \text{by parts} \\ &= \left\{\int_{-\tfrac\pi4}^0 + \int_0^\tfrac\pi4\right\} \frac{2 + \sqrt2 (\sin x - \cos x)}{(\sin x+\cos x)^2} \sqrt{\frac{1-\tan x}{1+\tan x}} \, dy & x\to\frac\pi4-x \\ &= 2\sqrt2 \int_0^\tfrac\pi4 \frac{\cos^2(2x)+2\sqrt2\cos x-\sqrt2\cos x\cos(2x) - 2}{\cos^2(2x) \sqrt{\cos(2x)}} \, dx & x\to-x \\ &= 2\sqrt2 \int_0^\tfrac\pi4 \left[1 - \frac{2+\sqrt2\cos x}{\left(1+\sqrt2\cos x\right)^2} \right] \, \frac{dx}{\sqrt{\cos(2x)}} & \text{partial fractions} \\ &= 2\sqrt2 \left(I_1 - I_2\right) \end{align*}$$
Not mentioned are applications of trig identities, which I think are easy enough for readers to deduce.
Next, denote $Y=\sqrt{1-\frac12\sin^2y}$. The first term is easy to deal with:
$$\begin{align*} I_1 &= \int_0^\tfrac\pi4 \frac{dy}{\sqrt{\cos(2x)}} \\ &= \int_0^\tfrac\pi4 \frac{dx}{\sqrt{1-2\sin^2x}} \\ &= \frac1{\sqrt2} \int_0^\tfrac\pi2 \frac{dy}Y & \sin x=\frac1{\sqrt2} \sin y \\ &= \frac1{\sqrt2} \, K\left(\frac1{\sqrt2}\right) \end{align*}$$
Performing the same transformation on the second term yields a more complicated integrand,
$$I_2 = \int_0^\tfrac\pi2 \frac{\sqrt2 + Y}{\left(1 + \sqrt2 Y\right)^2} \frac{dy}Y \tag{$*$}$$
This is where I'm currently stuck. It seems that, by some clever choice of adding net-zero terms to the numerator, we should be able to reduce $(*)$ to
$$\frac{\sqrt2}3 \int_0^\tfrac\pi2 \frac{dy}Y = \frac{\sqrt2}3 \, K\left(\frac1{\sqrt2}\right)$$
Rationalizing the denominator, we have
$$I_2 = \int_0^\tfrac\pi2 \frac{\sqrt2-3Y+2Y^3}{\cos^4y} \frac{dy}Y = \int_0^\tfrac\pi2 \frac{\sqrt2 - Y \left(1+\sin^2y\right)}{\cos^4y} \, \frac{dy}Y$$
Now, the integral of $\dfrac{1+\sin^2y}{\cos^4y}$ diverges, but I'm thinking there may be some vanishing function $f$ (in the sense $J=\int_0^{\pi/2}f(y)\,dy=0$) that will simultaneously "cancel out" the divergence and the factor of $\cos^4y$. That is,
$$I_2 = I_2 + J \equiv \frac{\sqrt2}3 \int_0^\tfrac\pi2 \frac{dy}Y$$
but whether such a function exists, I'm not sure.