Note that the denominator is:
x^2+2x+1 = (x+1)^2x2+2x+1=(x+1)2
so we can substitute t=x+1t=x+1, x=t-1x=t−1, dx=dtdx=dt and have:
int (x^3dx)/(x^2+2x+1) = int ((t-1)^3dt)/t^2∫x3dxx2+2x+1=∫(t−1)3dtt2
int (x^3dx)/(x^2+2x+1) = int ((t^3-3t^2+3t-1)dt)/t^2∫x3dxx2+2x+1=∫(t3−3t2+3t−1)dtt2
int (x^3dx)/(x^2+2x+1) = int (t-3+3/t-1/t^2)dt∫x3dxx2+2x+1=∫(t−3+3t−1t2)dt
Using the linearity of the integral:
int (x^3dx)/(x^2+2x+1) = int tdt -3int dt +3int (dt)/t-int (dt)/t^2∫x3dxx2+2x+1=∫tdt−3∫dt+3∫dtt−∫dtt2
int (x^3dx)/(x^2+2x+1) = t^2/2 -3t +3lnabst+1/t+C∫x3dxx2+2x+1=t22−3t+3ln|t|+1t+C
and undoing the substitution:
int (x^3dx)/(x^2+2x+1) = (x+1)^2/2 -3(x+1) + 1/(x+1) + 3lnabs(x+1)+C∫x3dxx2+2x+1=(x+1)22−3(x+1)+1x+1+3ln|x+1|+C
Simplifying:
int (x^3dx)/(x^2+2x+1) = ((x+1)^3-6(x+1)^2 +2)/(2(x+1)) + 3lnabs(x+1)+C∫x3dxx2+2x+1=(x+1)3−6(x+1)2+22(x+1)+3ln|x+1|+C
int (x^3dx)/(x^2+2x+1) = (x^3-3x^2-9x-3)/(2(x+1)) + 3lnabs(x+1)+C∫x3dxx2+2x+1=x3−3x2−9x−32(x+1)+3ln|x+1|+C