Let x(x+1)(x+2)=A(x+1)+B(x+2)
⇒x=A(x+2)+B(x+1)
Equating the coefficients of x and constant term, we obtain
A+B=1,2A+B=0
On solving, we obtain
A=−1 and B=2
∴x(x+1)(x+2)dx=−1(x+1)+2(x+2)
⇒∫x(x+1)(x+2)dx=∫−1(x+1)+2(x+2)dx
=−log|x+1|+2log|x+2|+C
=log(x+2)2−log|x+1|+C
=log(x+2)2(x+1)+C