Here,
#I=int(6x^2+13x+6)/((x+2)(x+1)^2)dx#
To obtain Partial Fractions :
#(6x^2+13x+6)/((x+2)(x+1)^2)=A/(x+2)+B/(x+1)+C/(x+1)^2#
#6x^2+13x+6#=#A(x^2+2x+1)+B(x^2+3x+2)+C(x+2)#
#6x^2+13x+6#=#x^2(A+B)+x(2A+3B+C)+A+2B+2C#
comparing coefficient of #x^2 ,x ,and# constant term :
#color(red)(A+B=6..............to(1)#
#color(red)(2A+3B+C=13...to (2) #
#color(red)(A+2B+2C=6....to(3)#
Taking , #equn.(2)xx2+(3)xx(-1)# ,we get
#color(white)(.)4A+6B+2C=26#
#ul(-A-2B-2C=-6#
#color(red)(3A+4B=20...........to(4)#
Again taking , #equn.(4)+(1)xx(-1)# ,we get
#color(white)(..)3A+4B=20#
#ul(-4A-4B=-24#
#-A=-4 =>color(blue)(A=4#
From #(1) , # #4+B=6=>color(blue)(B=2#
From #(3) ,# #4+2(2)+2C=6=>color(blue)(C=-1#
So,
#I=int[4/(x+2)+2/(x+1)-1/(x+1)^2]dx#
#=>I=4int1/(x+2)dx+2int1/(x+1)dx-int(x+1)^(-2) dx#
#=>I=4ln|x+2|+2ln|x+1|-(x+1)^(-2+1)/(-2+1)+c#
#=>I=4ln|x+4|+2ln|x+1|+1/(x+1)+c#