$\frac{x}{(x-1)^{2}(x+2)}$
Let $\frac{x}{(x-1)^{2}(x+2)}=\frac{A}{(x-1)}+\frac{B}{(x-1)^{2}}+\frac{C}{(x+2)}$
$x=A(x-1)(x+2)+B(x+2)+C(x-1)^{2}$
Substituting x = 1, we obtain
$B=\frac{1}{3}$
Equating the coefficients of $x^{2}$ and constant term, we obtain
$A+C=0$
$-2 A+2 B+C=0$
On solving, we obtain
$A=\frac{2}{9}$ and $C=\frac{-2}{9}$
$\therefore \frac{x}{(x-1)^{2}(x+2)}=\frac{2}{9(x-1)}+\frac{1}{3(x-1)^{2}}-\frac{2}{9(x+2)}$
$\Rightarrow \int \frac{x}{(x-1)^{2}(x+2)} d x=\frac{2}{9} \int \frac{1}{(x-1)} d x+\frac{1}{3} \int \frac{1}{(x-1)^{2}} d x-\frac{2}{9} \int \frac{1}{(x+2)} d x$
$=\frac{2}{9} \log |x-1|+\frac{1}{3}\left(\frac{-1}{x-1}\right)-\frac{2}{9} \log |x+2|+\mathrm{C}$
$=\frac{2}{9} \log \left|\frac{x-1}{x+2}\right|-\frac{1}{3(x-1)}+\mathrm{C}$