Integrating rational functions. $\int\frac{x^2-3x+1}{x^4-x^2+1}\mathrm{d}x$ Is there really another way of solving this problem $$\int\frac{x^2-3x+1}{x^4-x^2+1}\mathrm{d}x$$
avoiding partial fractions decomposition? I have tried the partial fractions decomposition, but it is not serving me right.

The integral can be split into two pieces:
$$\begin{aligned}
\int {\frac{x}{{{x^4} - {x^2} + 1}}dx}  &= \frac{1}{2}\int {\frac{1}{{{u^2} - u + 1}}du}  \\
&= \frac{1}{{\sqrt 3 }}\arctan \left( {\frac{{2u - 1}}{{\sqrt 3 }}} \right) + C \\&= \frac{1}{{\sqrt 3 }}\arctan \left( {\frac{{2{x^2} - 1}}{{\sqrt 3 }}} \right) + C
\end{aligned}$$
where $u=x^2$, and
$$\int {\frac{{{x^2} + 1}}{{{x^4} - {x^2} + 1}}dx}  = \int {\frac{{1 + \frac{1}{{{x^2}}}}}{{{x^2} + \frac{1}{{{x^2}}} - 1}}dx}  = \int {\frac{{d(x - \frac{1}{x})}}{{{{(x - \frac{1}{x})}^2} + 1}}dx}  = \arctan (x - \frac{1}{x}) + C$$
Therefore
$$\begin{aligned}
\int {\frac{{{x^2} - 3x + 1}}{{{x^4} - {x^2} + 1}}dx}  &= \arctan (x - \frac{1}{x}) - 3\left[ {\frac{1}{{\sqrt 3 }}\arctan \left( {\frac{{2{x^2} - 1}}{{\sqrt 3 }}} \right)} \right] + C \\
&=
 \arctan (x - \frac{1}{x}) - \sqrt 3 \arctan \left( {\frac{{2{x^2} - 1}}{{\sqrt 3 }}} \right) + C
\end{aligned}$$
