We perform this integral by substitution.
Let u=x+5u=x+5, =>⇒, dx=dudx=du
x=u-5x=u−5
and
x^2-6x-20=(u-5)^2-6(u-5)-20x2−6x−20=(u−5)2−6(u−5)−20
=u^2-10u+25-6u+30-20=u2−10u+25−6u+30−20
=u^2-16u+35=u2−16u+35
Therefore,
int((x^2-6x-20)dx)/(x+5)∫(x2−6x−20)dxx+5
=int((u^2-16u+35)du)/u=∫(u2−16u+35)duu
=int(u-16+35/u)=∫(u−16+35u)
=u^2/2-16u+35lnu=u22−16u+35lnu
=(x+5)^2/2-16(x+5)+35ln(|x+5|)+C=(x+5)22−16(x+5)+35ln(|x+5|)+C
=(x+5)(x+5-32)/2+35ln(|x+5|)+C=(x+5)x+5−322+35ln(|x+5|)+C
=((x+5)(x-27))/2+35ln(|x+5|)+C=(x+5)(x−27)2+35ln(|x+5|)+C