Answer
$$\frac{1}{x} + 3\ln \left| {x - 1} \right| + C$$
Work Step by Step
$$\eqalign{
& \int {\frac{{3{x^2} - x + 1}}{{{x^3} - {x^2}}}} dx \cr
& = \int {\frac{{3{x^2} - x + 1}}{{{x^2}\left( {x - 1} \right)}}} dx \cr
& {\text{Decompose the integrand into partial fractions}} \cr
& \frac{{3{x^2} - x + 1}}{{{x^2}\left( {x - 1} \right)}} = \frac{A}{x} + \frac{B}{{{x^2}}} + \frac{C}{{x - 1}} \cr
& 3{x^2} - x + 1 = A\left( x \right)\left( {x - 1} \right) + B\left( {x - 1} \right) + C{x^2} \cr
& 3{x^2} - x + 1 = A{x^2} - Ax + Bx - B + C{x^2} \cr
& {\text{Collect like terms}} \cr
& 3{x^2} - x + 1 = \left( {A{x^2} + C{x^2}} \right) + \left( { - Ax + Bx} \right) - B \cr
& A + C = 3,{\text{ }} - A + B = - 1,{\text{ }}B = - 1 \cr
& {\text{Solving we obtain}} \cr
& A = 0,{\text{ }}B = - 1,{\text{ }}C = 3 \cr
& {\text{Then}} \cr
& \frac{{3{x^2} - x + 1}}{{{x^2}\left( {x - 1} \right)}} = - \frac{1}{{{x^2}}} + \frac{3}{{x - 1}} \cr
& \int {\frac{{3{x^2} - x + 1}}{{{x^3} - {x^2}}}} dx = - \int {\frac{1}{{{x^2}}}} dx + \int {\frac{3}{{x - 1}}dx} \cr
& {\text{ }} = \frac{1}{x} + 3\ln \left| {x - 1} \right| + C \cr} $$