Use partial fractions :
Let 1/(x-1)(x+1)(x+2) = A/(x-1) + B/(x+1) + C/(x+2)
A(x+1)(x+2) + B(x-1)(x+2) + C(x-1)(x+1) = 1
For x = 1 : A = 1/6
For x = -1 : B = -1/2
For x = -2 : C = 1/3
so, 1/(x-1)(x+1)(x+2) = 1/6(x-1) - 1/2(x+1) + 1/3(x+2)
Integrating the above expression we get
(1/6)ln(x-1) - (1/2)ln(x+1) + (1/3)ln(x+2) + c
where c is the constant of integration