<s>[INST] How do I solve $\int_0^\infty \frac{x^2}{x^4+1} \, dx$? 
$$\int_0^\infty \frac{x^2}{x^4+1} \; dx $$

All I know this integral must be solved with beta function, but how do I come to the form $$\beta (x,y)=\int_0^1 t^{x-1}(1-t)^{y-1}\;dt \text{ ?}$$
 [/INST] $$\begin{eqnarray*}I=\int_0^{+\infty}\frac{x^2\,dx}{x^4+1}\stackrel{\text{parity}}{=} \frac{1}{2} \int_{-\infty}^{+\infty}\frac{dx}{x^2+\frac{1}{x^2}}&=&\frac{1}{2} \int_{-\infty}^{+\infty}\frac{dx}{\left(x-\frac{1}{x}\right)^2+2} \\[8pt]
(\text{by Glasser's Master Theorem})&=&\int_0^{+\infty}\frac{dx}{x^2+2}=\color{red}{\frac{\pi}{2\sqrt{2}}}.\end{eqnarray*} $$
As a reference, http://mathworld.wolfram.com/GlassersMasterTheorem.html.
Through the Beta function, by setting $\frac{1}{x^4+1}=u$,
$$ I=\frac{1}{4}\int_{0}^{1}u^{-3/4}(1-u)^{-1/4}\,du=\frac{\Gamma\left(\frac{1}{4}\right)\,\Gamma\left(\frac{3}{4}\right)}{4}=\frac{\pi}{4\sin\frac{\pi}{4}} =\color{red}{\frac{\pi}{2\sqrt{2}}}$$
by the reflection formula for the $\Gamma$ function.
</s>