We factorise the denominator
#x^3-3x^2=x^2(x-3)#
We start by performing a polynomial long division
#color(white)(aaaa)##x^3-3x^2##color(white)(aaaaaa)##-9##color(white)(aaaa)##|##x^3-3x^2#
#color(white)(aaaa)##x^3-3x^2##color(white)(aaaaaa)####color(white)(aaaaaaa)##|##1#
#color(white)(aaaaaa)##0-0##color(white)(aaaaaa)##-9##color(white)(aaaa)#
Therefore,
#(x^3-3x^2)/(x^3-3x^2)=1-9/(x^2(x-3))#
Now, we perform the partial fraction decomposition
#9/(x^2(x-3))=A/(x^2)+B/(x)+C/(x-3)#
#=(A(x-3)+B(x(x-3))+C(x^2))/(x^2(x-3))#
The denominators are the same, we compare the numerators
#9=A(x-3)+B(x(x-3))+C(x^2)#
Let #x=0#,#=>#,#9=-3A#, #=>#, #A=-3#
Let #x=3#, #=>#, #9=9C#, #=>#,#C=1#
Coefficients of #x^2#
#0=B+C#, #=>#, #B=-C=-1#
Therefore,
#9/(x^2(x-3))=-3/(x^2)-1/(x)+1/(x-3)#
So,
#(x^3-3x^2)/(x^3-3x^2)=1-(-3/(x^2)-1/(x)+1/(x-3))#
#=1+3/(x^2)+1/(x)-1/(x-3)#
Then,
#int((x^3-3x^2)dx)/(x^3-3x^2)=int1dx+3intdx/(x^2)+intdx/(x)-intdx/(x-3)#
#=x-3/x+ln(|x|)-ln(|x-3|)+C#