<s>[INST] Computing $\int_{0}^{\infty} \frac{x^2 + a}{x^6 + a^3}dx$ I wish to compute

$$\int_{0}^{\infty} \frac{x^2 + a}{x^6 + a^3}dx, \quad a>0$$

but have no contour to work with. Does anyone have ideas on how to compute this integral?
 [/INST] \begin{align*}
\int_{0}^{\infty} \frac{x^2 + a}{x^6 + a^3} \, dx
&= \frac{1}{a^{3/2}} \int_{0}^{\infty} \frac{x^2 + 1}{x^6 + 1} \, dx  \\
&= \frac{1}{a^{3/2}} \int_{0}^{1} \frac{x^2 + 1}{x^6 + 1} \, dx+\frac{1}{a^{3/2}} \int_{1}^{\infty} \frac{x^2 + 1}{x^6 + 1} \, dx\\
&= \frac{1}{a^{3/2}} \int_{0}^{1} \frac{x^2 + 1}{x^6 + 1} \, dx+\frac{1}{a^{3/2}} \int_{0}^{1} \frac{x^{-2} + 1}{x^{-6} + 1}x^{-2} \, dx \mbox{ (for the second:}x \rightarrow 1/x )\\
&= \frac{1}{a^{3/2}} \int_{0}^{1} \frac{x^2 + 1}{x^4-x^2 +1} \, dx\\
&= \frac{1}{a^{3/2}} \int_{0}^{\frac{\pi}{2}} \frac{\sin^2t + 1}{\sin^4t-\sin ^2t +1} \, d\sin t =I\\
\end{align*}
Now by symmetry and $t \rightarrow \pi/2-t$ we obtain
\begin{align}
2I&=\frac{1}{a^{3/2}}\int_{0}^{\frac{\pi}{2}} \frac{\sin^2t + 1}{\sin^4t-\sin ^2t +1} \, \cos tdt+\frac{1}{a^{3/2}}\int_{0}^{\frac{\pi}{2}} \frac{\cos^2t + 1}{\cos^4t-\cos ^2t +1} \, \sin tdt\\
&=\frac{1}{a^{3/2}}\int_{0}^{\frac{\pi}{2}}\frac{\cos t +\sin t}{1-\cos t \sin t} \, dt\\
&=\frac{1}{a^{3/2}}\int_{0}^{\frac{\pi}{2}}\frac{(-2)(-\cos t -\sin t)}{1+(\cos t- \sin t)^2} \, dt\\
&=\frac{-2}{a^{3/2}}\arctan(\cos t- \sin t)\Big|_0^{\pi/2}\\
&=\frac{\pi}{a^{3/2}}
\end{align}
</s>