<s>[INST] Evaluating an improper integral $\int_{0}^{\infty}\frac{x^2}{(x^4+1)^2}dx$ I tried to solve the integral: $$\int_{0}^{\infty}\frac{x^2}{(x^4+1)^2}dx$$
using $ x = \sqrt{\tan(u)}$ and $dx = \frac{ \sec^2(u)}{2\sqrt{\tan(u)}} du,$
but I ended up with an even worse looking integral $$ \int_{0}^{\frac{\pi}{2}}\frac{\sqrt{\tan(u)}}{\sec^2(u)}du.$$
Wolfram gave an answer of $ \dfrac{\pi}{8\sqrt{2}},$ but how would one get to that answer?
 [/INST] Using the method I employed here: we observe that
\begin{equation}
\int_{0}^{\infty} \frac{x^2}{\left(x^4 + 1\right)^2}\:dx = \frac{1}{4} \cdot 1^{\frac{2 + 1}{4} - 2} \cdot B\left(2 - \frac{2 + 1}{4}, \frac{2 + 1}{4} \right) = \frac{1}{4}B\left(\frac{5}{4}, \frac{3}{4}\right)
\end{equation}
Using the relationship between the Beta and Gamma function:
\begin{align}
 \int_{0}^{\infty} \frac{x^2}{\left(x^4 + 1\right)^2}\:dx &= \frac{1}{4}B\left(\frac{5}{4}, \frac{3}{4}\right) = \frac{1}{4}\frac{\Gamma\left(\frac{5}{4}\right)\Gamma\left(\frac{3}{4}\right)}{\Gamma\left(\frac{5}{4} + \frac{3}{4}\right)} \\
&= \frac{1}{4}\frac{\Gamma\left(\frac{5}{4}\right)\Gamma\left(\frac{3}{4}\right)}{\Gamma\left(2\right)} =\frac{\Gamma\left(\frac{5}{4}\right)\Gamma\left(\frac{3}{4}\right)}{8}
\end{align}
</s>