Step 1: Choose the method:
The denominator has a repeated factor, so partial fractions are needed. This time I find the constants by substituting convenient values of $x$ (the cover-up idea) instead of comparing coefficients.
Step 2: Set up the identity:
\[ \frac{x}{(x-1)^2(x+2)} = \frac{A}{x-1} + \frac{B}{(x-1)^2} + \frac{C}{x+2} \]
Multiplying out the denominators gives $x = A(x-1)(x+2) + B(x+2) + C(x-1)^2$.
Step 3: Substitute special values:
Put $x = 1$: the $A$ and $C$ terms vanish, leaving $1 = 3B$, so $B = \frac{1}{3}$.
Put $x = -2$: the $A$ and $B$ terms vanish, leaving $-2 = 9C$, so $C = -\frac{2}{9}$.
Put $x = 0$: $0 = -2A + 2B + C = -2A + \frac{2}{3} - \frac{2}{9}$, so $2A = \frac{4}{9}$ and $A = \frac{2}{9}$.
Check with the $x^2$ coefficient: $A + C = \frac{2}{9} - \frac{2}{9} = 0$, as required.
Step 4: Integrate term by term:
\[ \int \left[ \frac{2/9}{x-1} + \frac{1/3}{(x-1)^2} - \frac{2/9}{x+2} \right] dx \]
The middle term uses the power rule: $\int (x-1)^{-2}\,dx = -(x-1)^{-1}$. The other two give natural logarithms.
\[ = \frac{2}{9}\ln|x-1| - \frac{1}{3(x-1)} - \frac{2}{9}\ln|x+2| + C \]
Step 5: Differentiate to confirm:
Differentiating the result gives back $\frac{2}{9(x-1)} + \frac{1}{3(x-1)^2} - \frac{2}{9(x+2)}$, which adds up to the original fraction. So the answer is correct.
Final Answer:
Using the logarithm rule $\ln a - \ln b = \ln\frac{a}{b}$, the integral is
\[ \boxed{\frac{2}{9}\ln\left|\frac{x-1}{x+2}\right| - \frac{1}{3(x-1)} + C} \]