Answer
$$\int\frac{9x^3-3x+1}{x^3-x^2}dx=9x+2\ln|x|+\frac{1}{x}+7\ln|x-1|+C$$
Work Step by Step
$$I=\int\frac{9x^3-3x+1}{x^3-x^2}dx$$
1) Perform long division:
We perform long division to rewrite the fraction as a polynomial plus a proper fraction, which is $$\frac{9x^3-3x+1}{x^3-x^2}=9+\frac{9x^2-3x+1}{x^3-x^2}=9+\frac{9x^2-3x+1}{x^2(x-1)}$$
2) Express the remainder fraction as a sum of partial fractions:
$$\frac{9x^2-3x+1}{x^2(x-1)}=\frac{A}{x}+\frac{B}{x^2}+\frac{C}{x-1}$$
Clear fractions:
$$Ax(x-1)+B(x-1)+Cx^2=9x^2-3x+1$$ $$Ax^2-Ax+Bx-B+Cx^2=9x^2-3x+1$$ $$(A+C)x^2+(-A+B)x-B=9x^2-3x+1$$
Equating coefficients of corresponding powers of $x$, we get
$-B=1$, so $B=-1$
$-A+B=-3$, so $A=2$
$A+C=9$, so $C=7$
Therefore,
$$\frac{9x^2-3x+1}{x^2(x-1)}=\frac{2}{x}-\frac{1}{x^2}+\frac{7}{x-1}$$
2) Evaluate the integral:
$$I=\int9dx+2\int\frac{1}{x}dx-\int\frac{1}{x^2}dx+7\int\frac{1}{x-1}dx$$ $$I=9x+2\ln|x|+\frac{1}{x}+7\ln|x-1|+C$$