<s>[INST] Evaluating $ \frac{24}{\pi}\int_0^\sqrt 2\frac{2-x^2}{(2+x^2)\sqrt{4+x^4}}\,\mathrm dx$ I recently came across a problem on definite integration and couldn't solve it despite my efforts. It goes as
$$
\frac{24}{\pi}\int_0^\sqrt 2\frac{2-x^2}{(2+x^2)\sqrt{4+x^4}}\,\mathrm dx
$$
The $2-x^2$ term and the upper limit along with the $2+x^2$ term at the bottom motivated me to substitute $x=2^{1/2}\tan a$. However subsequent steps proceeded to a stage I couldnt simplify.
I tried other substitutions but was unable to proceed
Any help to solve this problem would be appreciated. Please feel free to share your first thoughts and intuition as well.
 [/INST] After the first step from @ClaudeLeibovici’s answer, you can do a crazy u-sub: $$u=\frac{x^2-1}{x^2+1}$$ so $$x=\sqrt{\frac{1+u}{1-u}}$$ By chain rule, $$\implies dx=\frac{1}{2\sqrt{\frac{1+u}{1-u}}}\cdot\frac{2}{(1-u)^2}du$$$$=\frac{du}{(1+u)^\tfrac12(1-u)^\tfrac32}$$ Also, $$\frac{1}{\sqrt{1+x^4}}= \frac{1}{\sqrt{1+\left(\frac{1+u}{1-u}\right)^2}}=\frac{1-u}{\sqrt{2(1+u^2)}}$$ so the integral simplifies to $$-\int u\cdot\left(\frac{1-u}{\sqrt{2(1+u^2)}}\right)\frac{du}{(1+u)^\tfrac12(1-u)^\tfrac32}$$$$=-\int\frac{udu}{\sqrt{2(1+u^2)} (1+u)^\tfrac12(1-u)^\tfrac12}$$$$=-\int\frac{udu}{\sqrt{2(1-u^4)}}=-\frac{1}{2\sqrt2}\arcsin(u^2)+C$$ Putting appropriate limits, you get $\displaystyle\frac{\pi}{4\sqrt2}$ so the final answer should be $3$.
</s>