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$?

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*{} $
