$\frac{2}{9} \log (x-1)+\frac{1}{3} \times \frac{1}{x-1}+\frac{2}{9} \log (x+2)+\mathrm{c}$, where c is a constant of integration
$\frac{2}{9} \log (x-1)-\frac{1}{3} \times \frac{1}{(x-1)}+\frac{2}{9} \log (x+2)+\mathrm{c}$, where c is a constant of integration
$\frac{2}{9} \log (x-1)+\frac{1}{3} \times \frac{1}{x-1}-\frac{2}{9} \log (x+2)+\mathrm{c}$, where c is a constant of integration
$\frac{2}{9} \log (x-1)-\frac{1}{3} \times \frac{1}{x-1}-\frac{2}{9} \log (x+2)+\mathrm{c}$, where c is a constant of integration
Solution
Let $I=\int \frac{x}{(x-1)^2(x+2)} \mathrm{d} x$
Let $\frac{x}{(x-1)^2(x+2)}=\frac{\mathrm{A}}{(x-1)}+\frac{\mathrm{B}}{(x-1)^2}+\frac{\mathrm{C}}{(x+2)}$
$\therefore \quad x=\mathrm{A}(x-1)(x+2)+\mathrm{B}(x+2)+\mathrm{C}(x-1)^2$
for $x=1$, we get $\mathrm{B}=\frac{1}{3}$
for $x=-2$, we get $\mathrm{C}=\frac{-2}{9}$
Equating the coefficients of $x^2$, we get
$\mathrm{A}+\mathrm{C}=0$
$\therefore \quad A=\frac{2}{9}$
$\begin{aligned} \therefore \quad \mathrm{I} & =\frac{2}{9} \int \frac{1}{(x-1)} \mathrm{d} x+\frac{1}{3} \int \frac{1}{(x-1)^2} \mathrm{~d} x-\frac{2}{9} \int \frac{1}{(x+2)} \mathrm{d} x \\ & =\frac{2}{9} \log (x-1)-\frac{1}{3} \times \frac{1}{(x-1)}-\frac{2}{9} \log (x+2)+\mathrm{c}\end{aligned}$