<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] note that $$x^4+1=x^4+2x^2+1-2x^2=(x^2+1)^2-2x^2=(x^2-\sqrt{2}x+1)(x^2+\sqrt{2}x+1)$$
</s>