How to find exact value of integral $\int_{0}^{\infty} \frac{1}{\left(x^{4}-x^{2}+1\right)^{n}}dx$? When I first encountered the integral $\displaystyle \int_{0}^{\infty} \frac{1}{x^{4}-x^{2}+1} d x$, I am very reluctant to solve it by partial fractions and search for any easier methods.  Then I learnt a very useful trick to evaluate the integral.
Noting that
$$I(1):= \int_{0}^{\infty} \frac{d x}{x^{4}-x^{2}+1} \stackrel{x \mapsto \frac{1}{x}}{=} \int_{0}^{\infty} \frac{x^{2}}{x^{4}-x^{2}+1}
$$
Combining them yields
\begin{aligned}
I(1)&=\frac{1}{2} \int_{0}^{\infty} \frac{x^{2}+1}{x^{4}-x^{2}+1} d x\\&= \frac{1}{2}\int_{0}^{\infty} \frac{1+\frac{1}{x^{2}}}{x^{2}+\frac{1}{x^{2}}-1} d x \\
&= \frac{1}{2}\int_{0}^{\infty} \frac{d\left(x-\frac{1}{x}\right)}{\left(x-\frac{1}{x}\right)^{2}+1} \\
&= \frac{1}{2}\tan ^{-1}\left(x-\frac{1}{x}\right)_{0}^{\infty} \\
&= \frac{\pi}{2}
\end{aligned}
Later, I started to investigate the integrands with higher powers.
Similarly,
$$
I(2):= \int_{0}^{\infty} \frac{d x}{\left(x^{4}-x^{2}+1\right)^{2}} \stackrel{x \mapsto \frac{1}{x}}{=}\int_{0}^{\infty} \frac{x^{6}}{\left(x^{4}-x^{2}+1\right)^{2}} d x
$$
By division, we decomposed $x^6$ and obtain $$
\frac{x^{6}}{\left(x^{4}-x^{2}+1\right)^{2}}=\frac{x^{2}+1}{x^{4}-x^{2}+1}-\frac{1}{\left(x^{4}-x^{2}+1\right)^{2}}
$$$$
I(2)=\int_{0}^{\infty} \frac{x^{2}+1}{x^{4}-x^{2}+1} d x-\int_{0}^{\infty} \frac{1}{\left(x^{4}-x^{2}+1\right)^{2}}dx
$$
We can now conclude that $$I(2)=I(1)=\frac{\pi}{2} $$
My Question:
How about the integral $$\displaystyle I_{n}=\int_{0}^{\infty} \frac{d x}{\left(x^{4}-x^{2}+1\right)^{n}}$$ for any integer $n\geq 3$?
 A: Too long for a comment
You could be interested by
$$\displaystyle I_{n}=\int_{0}^{t} \frac{d x}{\left(x^{4}-x^{2}+1\right)^{n}}=t \, F_1\left(\frac{1}{2};n,n;\frac{3}{2};e^{+\frac{i \pi }{3}} t^2,e^{-\frac{i \pi
   }{3}} t^2\right)$$ where appears the Appell hypergeometric function of two variables and the roots of the quadratic in $x^2$.
I did not find any interesting reduction formula or any asymptotics for $t \to \infty$.
Nevertheless,
$$\displaystyle J_{n}=\int_{0}^{\infty} \frac{d x}{\left(x^{4}-x^{2}+1\right)^{n}}=\pi \,\frac {a_n}{2^{b_n}}$$ where the $a_n$ correspond to the sequence
$$\{1,1,9,21,25,483,2359,2907,115533,288915,363363,3674619,37326471,\cdots\}$$ and the $b_n$ the sequence
$$\{1,1,4,5,5,9,11,11,16,17,17,20,23,\cdots\}$$ None of these has been found in $OEIS$.
Edit
For
$$I_{m,n}=\int_0^\infty\frac{dx}{(x^m+1)^n}=\frac{\Gamma \left(1+\frac{1}{m}\right) \Gamma \left(n-\frac{1}{m}\right)}{\Gamma(n)} \qquad \text{if} \qquad \Re(m n)>1\land \Re(m)>0$$
gives the simple
$$I_{m,n+1}=\left(1-\frac{1}{m n}\right)I_{m,n}$$
A: Note
$$
\int_0^\infty \frac1{(x^4-x^2+1)^{n+1}}dx=\frac{(-1)^{n}}{n!} \frac{d^{n} J(a)}{da^{n}}\bigg|_{a=1}
$$
where
$$J(a)=\int_0^\infty \frac{dx}{x^4-x^2+a}=\frac1{2\sqrt a} 
\int_0^\infty \frac{d(x-\frac{\sqrt a}x)}{(x-\frac{\sqrt a}x)^2+2\sqrt a-1}
= \frac\pi{2\sqrt{a(2\sqrt a-1)} }
$$
Then
\begin{align}
& \int_0^\infty \frac1{x^4-x^2+1}dx= J(1)=\frac\pi2\\
&\int_0^\infty \frac1{(x^4-x^2+1)^2}dx= -\frac{dJ(a)}{da}\bigg|_{a=1}=\frac\pi2\\
 &\int_0^\infty \frac1{(x^4-x^2+1)^3}dx=\frac12\frac{d^2J(a)}{da^2}\bigg|_{a=1}=\frac{9\pi}{16}\\
&\int_0^\infty \frac1{(x^4-x^2+1)^4}dx=-\frac16\frac{d^3 J(a)}{da^3}\bigg|_{a=1}=\frac{21\pi}{32}\\
&\int_0^\infty \frac1{(x^4-x^2+1)^5}dx=\frac1{24} \frac{d^4 J(a)}{da^4}\bigg|_{a=1}=\frac{25\pi}{32}\\
&\int_0^\infty \frac1{(x^4-x^2+1)^6}dx=-\frac1{120} \frac{d^5 J(a)}{da^5}\bigg|_{a=1}=\frac{483\pi}{512}\\
&\hspace{5mm}\cdots\hspace{2mm}\cdots
\end{align}
A: Glad to see there are several nice answers in various perspectives.  I am now going to give one more by inverse substitution followed by integration by parts.
Using $x \mapsto \frac{1}{x}$ yields
$$
I(m, n, r):=\int_{0}^{\infty} \frac{x^{r} d x}{\left(x^{m}+1\right)^{n}} \stackrel{x \mapsto \frac{1}{x}}{=} \int_{0}^{\infty} \frac{\frac{1}{x^{r}}}{\left(\frac{1}{x^{m}}+1\right)^{n}}\left(\frac{d x}{x^{2}}\right)
$$
Simplifying and then  performing integration by parts,
$$
\begin{aligned}
I(m, n, r) &=\int_{0}^{\infty} \frac{x^{m n-r-2}}{\left(1+x^{m}\right)^{n}} d x \\
&=-\frac{1}{m(n-1)} \int_{0}^{\infty} x^{(n-1)m-r-1} d\left(\frac{1}{\left(1+x^{m}\right)^{n-1}}\right) \\
&=\frac{m(n-1)-r-1}{m(n-1)} \int_{0}^{\infty} \frac{x^{m(n-1)-r-2}}{\left(1+x^{m}\right)^{n-1}} d x \\
&=\left(1-\frac{r+1}{m(n-1)}\right) I(m, n-1, r) \\
&\qquad\qquad  \vdots\\ &=\left(1-\frac{r+1}{m(n-1)}\right)\left(1-\frac{r+1}{m(n-2)}\right) \cdots\left(1-\frac{r+1}{m}\right) I\left(m,1,r\right) \\
&=\prod_{j=1}^{n-1}\left(1-\frac{r+1}{j m}\right)\int_{0}^{\infty} \frac{x^{r}}{x^{m}+1} d x
\end{aligned}
$$
Using the formula proved in my post
$$
\int_{0}^{\infty} \frac{x^{r}}{x^{m}+1} d x=\frac{\pi}{m} \csc \frac{(r+1) \pi}{m},
$$
by putting $r=2k$ and $m=6$, we can conclude
$$
\begin{aligned}
\int_{0}^{\infty} \frac{1}{\left(x^{4}-x^{2}+1\right)^{n}} d x 
=& \int_{0}^{\infty}\left(\frac{x^{2}+1}{x^{6}+1}\right)^{n} d x \\
=& \sum_{k=0}^{n}\left(\begin{array}{c}
n \\
k
\end{array}\right) \int_{0}^{\infty} \frac{x^{2 k}}{\left(1+x^{6}\right)^{n}} d x \\=& \boxed{\sum_{k=0}^{n}\left[\left(\begin{array}{c}
n \\
k
\end{array}\right) \frac{\pi}{6} \csc \frac{(2 k+1) \pi}{6} \prod_{j=1}^{n-1}\left(1-\frac{2 k+1}{6 j}\right)\right]}
\end{aligned}
$$
A: Differentiation sometimes is easier than integration!
Inverse substitution rewrites the integral
$\displaystyle \int_{0}^{\infty} \frac{x^{r}}{x^{m}+a} d x \stackrel{x\mapsto\frac{1}{\sqrt[m]{a}}}{=}\frac{1}{a^{1-\frac{r+1}{m}}} \int_{0}^{\infty} \frac{x^{r}}{x^{m}+1} d x \tag*{} $
where $0<a<2.$
Using the formula proved in my post
$ \displaystyle \int_{0}^{\infty} \frac{x^{r}}{x^{m}+1} d x=\frac{\pi}{m } \csc \frac{(r+1) \pi}{m},\tag*{} $
we get
$ \displaystyle \int_{0}^{\infty} \frac{x^r}{x^{m}+a} d x=a^{-\left(1-\frac{r+1}{m}\right)} \frac{\pi}{m} \csc \frac{(r+1) \pi}{m}\tag*{} $
Differentiating the integral w.r.t. $ a$ by$n-1 $ times yields
$ \displaystyle \int_{0}^{\infty} \frac{(-1)^{r-1}(n-1) ! x^{r}}{\left(x^{m}+a\right)^{n}}=\frac{\pi}{m} \csc \frac{(r+1) \pi}{m}(-1)^{n-1}\left(1-\frac{r+1}{m}\right)\left(2-\frac{r+1}{m}\right)\cdots\left(n-1-\frac{r+1}{m}\right)a^{-\left(n-\frac{r+1}{m}\right)} \tag*{}$
Now we can conclude that
$$\boxed{ \displaystyle \int_{0}^{\infty} \frac{x^{r} d x}{\left(x^{m}+a\right)^{n}}=\frac{\pi}{m(n-1) !} \csc \frac{(r+1) \pi}{m} \prod_{j=1}^{n-1}\left(j-\frac{r+1}{m}\right) a^{-\left(n-\frac{r+1}{m}\right)}}$$
Come back to our integral and use Binomial Theorem.
\begin{aligned}\int_{0}^{\infty} \frac{1}{\left(x^{4}-x^{2}+1\right)^{n}} d x =& \int_{0}^{\infty}\left(\frac{x^{2}+1}{x^{6}+1}\right)^{n} d x =\sum_{k=0}^{n}\left(\begin{array}{l}n \\k\end{array}\right) \int_{0}^{\infty} \frac{x^{2 k}}{\left(x^{6}+1\right)^{n}} d x\end{aligned}
Putting $ m=6, r=2k $ and $ a=1 $ yields
$\displaystyle \boxed{\begin{aligned}\int_{0}^{\infty} \frac{1}{\left(x^{4}-x^{2}+1\right)^{n}} d x &=\sum_{k=0}^{n}\left(\begin{array}{c}n \\k\end{array}\right) \frac{\pi}{6(n-1) !} \csc \frac{(2k+1) \pi}{6} \prod_{j=1}^{n-1}\left(j-\frac{2k+1}{6}\right)\\&=\sum_{k=0}^{n}\left[\left(\begin{array}{l}n \\k\end{array}\right) \frac{\pi}{6} \csc \frac{(2 k+1) \pi}{6} \prod_{j=1}^{n-1}\left(1-\frac{2 k+1}{6 j}\right)\right] \end{aligned} }\tag*{} $
A: With CAS and help of MellinTransfrom:
$$\int_0^{\infty } \frac{1}{\left(x^4-x^2+1\right)^n} \, dx=\\\mathcal{M}_s^{-1}\left[\int_0^{\infty } \mathcal{M}_a\left[\frac{1}{\left(x^4-a x^2+1\right)^n}\right](s) \,
   dx\right](1)=\\\mathcal{M}_s^{-1}\left[\int_0^{\infty } \frac{(-1)^{-s} x^{-2 s} \left(1+x^4\right)^{-n+s} \Gamma (n-s) \Gamma (s)}{\Gamma (n)} \,
   dx\right](1)=\\\mathcal{M}_s^{-1}\left[\frac{(-1)^{-s} \Gamma \left(\frac{1}{4}-\frac{s}{2}\right) \Gamma \left(-\frac{1}{4}+n-\frac{s}{2}\right) \Gamma (s)}{4 \Gamma
   (n)}\right](1)=\\\frac{\Gamma \left(\frac{1}{4}\right) \Gamma \left(-\frac{1}{4}+n\right) \, _2F_1\left(\frac{1}{4},-\frac{1}{4}+n;\frac{1}{2};\frac{1}{4}\right)}{4 \Gamma
   (n)}+\frac{\Gamma \left(\frac{3}{4}\right) \Gamma \left(\frac{1}{4}+n\right) \, _2F_1\left(\frac{3}{4},\frac{1}{4}+n;\frac{3}{2};\frac{1}{4}\right)}{4 \Gamma (n)}$$
