Here is an approach using contour integration in case anyone is
interested. Suppose we seek to verify that
$$\int_0^\infty \frac{2x}{x^8+2x^4+1} dx = \frac{\pi}{4}$$
or alternatively
$$\int_0^\infty \frac{x}{x^8+2x^4+1} dx = \frac{\pi}{8}.$$
We use a quarter pizza slice contour with the straight components
$\Gamma_0$ and $\Gamma_1$ on the positive real axis and the positive
imaginary axis and having radius $R$ ($\Gamma_2.$)
The denominator here is
$$(x^4+1)^2$$
so the poles are double and located at
$$\rho_{0,1,2,3} = \exp(\pi i/4 + 2\pi i k/4)
= \exp(\pi i/4 + \pi i k/2)$$
with $k = 0,1,2,3.$ Fortunately we can see by inspection that only the
first pole $\rho_0$ is inside the contour (argument is $\pi/4.$)
For the residue we get
$$\frac{1}{2\pi i}
\int_{|z-\rho_0|=\epsilon} \frac{z}{z^8+2z^4+1} \; dz.$$
Exploiting the symmetry put $w=z\exp(-\pi i/4)$ and $z=w\exp(\pi i/4)$
to get
$$\exp(\pi i/2) \frac{1}{2\pi i}
\int_{|w\exp(\pi i/4)-1|=\epsilon}
\frac{w}{w^8-2w^4+1} \; dw
\\ = \frac{i}{2\pi i}
\int_{|w-1|=\epsilon}
\frac{w}{w^8-2w^4+1} \; dw.$$
The residue is thus given by
$$i\times \lim_{w\rightarrow 1}
\left(\frac{(w-1)^2 w}{w^8-2w^4+1}\right)'
= i\times \lim_{w\rightarrow 1}
\left(\frac{w}{(w+1)^2 (w^2+1)^2}\right)'
\\ = i\times \lim_{w\rightarrow 1}
\left(\frac{1}{(w+1)^2 (w^2+1)^2}
\\ - \frac{w}{(w+1)^4 (w^2+1)^4}
(2(w+1)(w^2+1)^2+(w+1)^2 2(w^2+1) 2w\right).$$
This works out to
$$i \times \left(\frac{1}{16} - \frac{16+32}{256}\right)
= -\frac{i}{8}.$$
Returning to the main computation, on the part of the contour that is
on the positive imaginary axis which is $\Gamma_1$ we obtain
$$\int_{\Gamma_1} \frac{z}{8z^8+2z^4+1} \; dz$$
which yields with $z=\exp(\pi i/2) x$
$$- \int_0^R \frac{\exp(\pi i/2) x}{8x^8+2x^4+1}
\; \exp(\pi i/2) dx
= \int_{\Gamma_0} \frac{z}{8z^8+2z^4+1} \; dz.$$
Finally we have by the ML bound for the circular component
$$\lim_{R\rightarrow\infty}
\left|\int_{\Gamma_2} \frac{z}{8z^8+2z^4+1} \; dz\right|
\le \lim_{R\rightarrow\infty} 2\pi R/4 \times
\frac{R}{8R^8-2R^4+1} = 0.$$
It follows that
$$\int_0^\infty \frac{x}{8x^8+2x^4+1} \; dx
= \frac{1}{2}\times 2\pi i \times -\frac{i}{8}
= \frac{\pi}{8}$$
which is the claim.