Solving by the method of partial fractions,
x(x−1)2(x+2)=Ax−1+B(x−1)2+Cx+2
x=A(x+2)(x−1)+B(x+2)+C(x−1)2
Put x=1⇒1=3B
⇒B=13
Put x=−2⇒−2=9C
⇒C=−29
Put x=0⇒0=A(0+2)(0−1)+B(0+2)+C(0−1)2
⇒−2A+2B+C=0
⇒−2A+2×13−29=0
⇒−2A+2×3−29=0
⇒−2A+6−29=0
⇒−2A=−49
⇒A=−4−2×9
∴A=29
∴A=29,B=13,C=−29
x(x−1)2(x+2)=291x−1+131(x−1)2−291x+2
Integrating both sides w.r.t x we get
∫x(x−1)2(x+2)=29∫dxx−1+13∫dx(x−1)2−29∫dxx+2
=29ln|x−1|+13(x−1)33−29ln|x+2|+c
=29[ln|x−1|−ln|x+2|]+13(x−1)33+c
=29ln(|x−1||x+1|)+(x−1)39+c