Consider the given integral.
I=∫x2+1(x+1)3(x−2)dx
I=−527∫dx(x+1)+49∫dx(x+1)2−23∫dx(x+1)3+527∫dx(x−2)
I=−527ln(x+1)+49(−1(x+1))−23(−12(x+2)2)+527ln(x−2)+C
I=527(ln(x−2)−ln(x+1))−491(x+1)+13(x+2)2+C
I=527ln(x−2x+1)−491(x+1)+13(x+2)2+C
Hence, this is the answer.