<s>[INST] 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$?
 [/INST] 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}
</s>