indefinite integration $ \int \frac { x^2 dx} {x^4 + x^2 -2}$ problem : $ \int \frac { x^2 dx}  {x^4 + x^2 -2}$
solution : divide numerator and denominator by $x^2$
$ \int \frac { dx}  {x^2 + 1 -\frac{1}{x^2}}$
Now whats the next step $?$
Am I doing right $?$

$$I= \int \frac { x^2dx}  {x^4 + x^2 -2}$$
Divide by $x^4$.
$$I=\int \frac{\frac{1}{x^2}dx}{1+\frac{1}{x^2}-\frac{2}{x^4}}$$
Let $\frac1x=u$. Then, $du=-\frac{1}{x^2}dx$.
$$I=\int\frac{du}{2u^4-u^2-1}=\int\frac{du}{2u^4-2u^2+u^2-1}=\int\frac{du}{(2u^2+1)(u^2-1)}=\int\frac{du}{(2u^2+1)(u+1)(u-1)}$$
Now this can be solved by using partial fractions.
