Decomposition into partial fractions to compute an integral I'm having problems with: 
$$\int_{-\infty}^{\infty}\frac{x^4+1}{x^6+1}dx$$
I was thinking: $\frac{x^4+1}{x^6+1}$ is an even function and the interval $(-\infty,\infty)$ is symmetric about 0, we could write the integral like:
$$2\int_{0}^{\infty}\frac{(x^4+1)}{x^6+1}dx$$
And for $\frac{x^4+1}{x^6+1}$, I will use the partial fractions. I will write $x^6+1$ like a sum of cubes $x^6+1=(x^2)^3+1^3$ and use the formula $a^3+b^3=(a+b)(a^2-ab+b^2)$ and in the end we will have 
$$x^6+1=(x^2+1)(x^4-x^2+1)$$ But now I'm stuck and do not know how to decompose $x^4-x^2+1$. I was thinking about $(x^2-1)x^2+1$ or $(x^2-\frac{1}{2})^2+\frac{3}{4}$ but I need a form for that like $-(-1+\sqrt3 x-x^2) (1+\sqrt3 x+x^2)$...
A little help here?

Another way,
Solution : 
\begin{align}
\int_{-\infty}^{\infty}\frac{x^4+1}{x^6+1}\,\mathrm dx&=2\int_{0}^{\infty}\frac{x^4+1}{x^6+1}\,\mathrm dx\\[7pt]
&=2\int_{0}^{\infty}\frac{x^4\,\mathrm dx}{x^6+1}+2\int_{0}^{\infty}\frac{\mathrm dx}{x^6+1}\tag{$\color{red}{❤}$}\\[7pt]
&=\frac{\pi}{3\sin\left(\frac{5\pi}{6}\right)}+\frac{\pi}{3\sin\left(\frac{\pi}{6}\right)}\\[7pt]
&=\bbox[5pt,border:3px #FF69B4 solid]{\color{red}{\large\frac{4\pi}{3}}}
\end{align}

Explanation :
$(\color{red}{❤})\;$ $\displaystyle\int_0^\infty\frac{x^{\large n-1}}{x^m+1}\ \,\mathrm dx=\frac{\pi}{m\sin\left(\frac{n\pi}{m}\right)}\,$ for $\,0<n<m$.
