When struggling with the integral in my answer , $$ \int \frac{x^{2}}{\left(x^{4}+1\right)^{2}} d x= \frac{\pi}{8 \sqrt{2}}, $$ I encountered the simpler integral, $$\int_{0}^{\infty} \frac{x^{2}}{x^{4}+1} d x=\frac{\pi}{\sqrt{2}}.$$
Then I am wondering how hard the integral will be as the power of $x^4+1$ increases, differentiation come to my mind and reminded me that it is easier than integration. So I started my journey by defining $$ I_{n}(a):=\int_{0}^{\infty} \frac{x^{2}}{\left(x^{4}+a\right)^{n}} d x, \text { where } n \in \mathbb{N} \textrm{ and }a>0. $$
and then begin with $I_1(a)$. $$ \begin{aligned} \int_{0}^{\infty} \frac{x^{2}}{x^{4}+a} d x &=\int_{0}^{\infty} \frac{1}{x^{2}+\frac{a}{x^{2}}} d x \\ &=\frac{1}{2} \int_{0}^{\infty} \frac{(1-\frac{\sqrt{a}}{x^{2}})+(1+\frac{\sqrt{a}}{x^{2}})}{x^{2}+\frac{a}{x^{2}}} d x \\ &=\frac{1}{2} \int_{0}^{\infty} \frac{d\left(x+\frac{\sqrt{a}}{x}\right)}{\left(x+\frac{\sqrt{a}}{x}\right)^{2}-2 \sqrt{a}}+\frac{1}{2} \int_{0}^{\infty} \frac{d\left(x-\frac{\sqrt{a}}{x}\right)}{\left(x-\frac{\sqrt{a}}{x}\right)^{2}+2 \sqrt{a}} \\ & =\frac{1}{4 \sqrt{2} a^{\frac{1}{4}}}\left[\ln \left| \frac{x+\frac{\sqrt{a}}{x}-\sqrt{2 \sqrt{a}}}{x+\frac{\sqrt{a}}{x}+\sqrt{2 \sqrt{a}}}\right|\right]_{0}^{\infty}+\frac{1}{2 \sqrt{2} a^{\frac{1}{4}}}\left[\tan ^{-1}\left(\frac{x-\frac{\sqrt{a}}{x}}{\sqrt{2 \sqrt{a}}}\right)\right]_0^{\infty} \end{aligned} $$
Hence $$ I_{1}(a)=\int_{0}^{\infty} \frac{x^{2}}{x^{4}+a} d x=\frac{\pi}{2 \sqrt{2} a^{\frac{1}{4}}} $$ Differentiating $I_1(a)$ w.r.t. $a$ by $(n-1)$ times yields $$ \begin{aligned} \int_{0}^{\infty} \frac{d^{n-1}}{d a^{n-1}}\left(\frac{x^{2}}{x^{4}+a}\right) d x&=\frac{d}{d a^{n-1}}\left(\frac{\pi}{2 \sqrt{2}} a^{-\frac{1}{4}}\right) \\ \int_{0}^{\infty} \frac{(-1)^{n-1}(n-1) ! x^{2}}{\left(x^{4}+a\right)^{n}} d x&=\frac{\pi}{2 \sqrt{2}}\left(-\frac{1}{4}\right)\left(-\frac{5}{4}\right) \cdots\left(-\frac{4 n-3}{4}\right) a^{-\frac{4 n-3}{4}} \end{aligned} $$
Simplifying and expressing in product gives $$ \boxed{\int_{0}^{\infty} \frac{x^{2}}{\left(x^{4}+a\right)^{n}} d x= \frac{\sqrt{2} \pi}{4^{n}(n-1) ! a^{\frac{4 n-3}{4}}} \prod_{k=1}^{n-1}(4 k-3)} $$
In particular, when $a=1$, $$ \boxed{\int_{0}^{\infty} \frac{x^{2}}{\left(x^{4}+1\right)^{n}} d x= \frac{\sqrt{2} \pi}{4^{n}(n-1) !} \prod_{k=1}^{n-1}(4 k-3)} $$
By the formula, we can easily find, for example,
$$ \int_{0}^{\infty} \frac{x^{2}}{\left(x^{4}+a\right)^{2}} d x= \frac{\sqrt{2} \pi}{4^{2}\cdot 1!} \cdot 1 =\frac{\pi \sqrt{2}}{16}, $$ $$ \int_{0}^{\infty} \frac{x^{2}}{\left(x^{4}+a\right)^{3}} d x= \frac{\sqrt{2} \pi}{4^{3} \cdot 2 !} \cdot 1 \cdot 5 =\frac{5 \pi \sqrt{2}}{128}, $$$$\int_{0}^{\infty} \frac{x^{2}}{\left(x^{4}+1\right)^{4}} d x=\frac{\pi \sqrt{2}}{4^{4} \cdot 3 !} \cdot 5 \cdot 9=\frac{15 \sqrt{2} \pi}{512}, $$
$\vdots \tag*{} $
$$ \begin{aligned} \int_{0}^{\infty} \frac{x^{2}}{\left(x^{4}+1\right)^{10}} d x =\frac{\pi \sqrt{2}}{4^{10} \cdot 9 !} \cdot 1 \cdot 5 \cdot 9 \cdot 13 \cdot 17 \cdot 21 \cdot 25 \cdot 29 \cdot 33=\frac{1762475 \sqrt{2} \pi}{134217728} \end{aligned} $$ *Checked by the Wolframalpha.
Although I had found the formula for the integral, the last product $ \displaystyle \prod_{k=1}^{n-1}(4 k-3)$ can’t be easily found. Do we have any method to simplify the product?
For generalization, I believe that if we can handle the first one, say
$$ I_1(a)=\int_{c}^{d} \frac{f(x)}{x^{m}+a} d x, $$ we can discover, by differentiation, the formula for $$I_n(a)=\int_{c}^{d} \frac{f(x)}{(x^{m}+a)^n} d x.$$
Do you agree? Comments and alternate solutions are warmly welcome.