Answer
$$\frac{{{x^2}}}{2} - 2x + \frac{1}{2}\ln \left( {{x^2} + 1} \right) + C$$
Work Step by Step
$$\eqalign{
& \int {\frac{{{x^3} - 2{x^2} + 2x - 2}}{{{x^2} + 1}}} dx \cr
& {\text{This is an improper rational function}}{\text{; use the long division to obtain}} \cr
& \frac{{{x^3} - 2{x^2} + 2x - 2}}{{{x^2} + 1}} = x - 2 + \frac{x}{{{x^2} + 1}} \cr
& {\text{Then the integrand can be written as}} \cr
& \int {\frac{{{x^3} - 2{x^2} + 2x - 2}}{{{x^2} + 1}}} dx = \int {\left( {x - 2 + \frac{x}{{{x^2} + 1}}} \right)} dx \cr
& {\text{Integrating}} \cr
& = \frac{{{x^2}}}{2} - 2x + \frac{1}{2}\ln \left( {{x^2} + 1} \right) + C \cr} $$