Im trying to solve $$\int_{0}^{\infty}\dfrac{x^2}{x^6+1} dx$$
So I begin by considering the function $f(z) = \frac{z^2}{z^6+1}$, I consider the isolated singularities, which are indeed simple poles given by $z_k = e^{i\left(\frac{\pi}{6}+\frac{2\pi k}{6}\right)}$ for $k$ from 0 to 5. None of these poles lie on the real axis, and furthermore, I consider the first 3 poles that are in the upper half-plane, $z_0$, $z_1$, and $z_2$. Therefore, I can calculate the integral using the residue theorem by integrating over the semicircle centered at 0 with a radius of $R$. Thus, $$ \int_{0}^{\infty} \frac{x^2}{x^6+1} \, dx = \frac{1}{2}\int_{-R}^{R}f(x) \, dx +\int_{\gamma} f(z) \, dz = 2\pi i \left(\text{Res}(f,z_0)+\text{Res}(f,z_1)+\text{Res}(f,z_2)\right). $$ I have difficulties finding the residues as evaluating the limit becomes complicated and tedious. Is there a more elegant way to solve these residues?
HINT
Another possible approach to compare with:
\begin{align*} \int_{0}^{\infty}\frac{x^{2}}{x^{6} + 1}\mathrm{d}x & = \frac{1}{3}\int_{0}^{\infty}\frac{3x^{2}}{x^{6} + 1}\mathrm{d}x\\\\ & = \frac{1}{3}\int_{0}^{\infty}\frac{\mathrm{d}(x^{3})}{(x^{3})^{2} + 1}\\\\ & = \frac{1}{3}\int_{0}^{\infty}\frac{\mathrm{d}u}{u^{2} + 1} \end{align*}