Let's do the decomposition into partial fractions
(x^2+12x-5)/((x+1)^2(x-7))=A/(x+1)^2+B/(x+1)+C/(x-7)x2+12x−5(x+1)2(x−7)=A(x+1)2+Bx+1+Cx−7
=(A(x-7)+B(x+1)(x-7)+C(x+1)^2)/((x+1)^2(x-7))=A(x−7)+B(x+1)(x−7)+C(x+1)2(x+1)2(x−7)
Therefore,
x^2+12x-5=A(x-7)+B(x+1)(x-7)+C(x+1)^2x2+12x−5=A(x−7)+B(x+1)(x−7)+C(x+1)2
Let x=-1x=−1, =>⇒, -16=-8A−16=−8A
Coefficients of x^2x2, 1=B+C1=B+C
Let x=7x=7, =>⇒, 128=64C128=64C
C=2C=2
B=1-C=1-2=-1B=1−C=1−2=−1
A=2A=2
(x^2+12x-5)/((x+1)^2(x-7))=2/(x+1)^2-1/(x+1)+2/(x-7)x2+12x−5(x+1)2(x−7)=2(x+1)2−1x+1+2x−7
So,
int((x^2+12x-5)dx)/((x+1)^2(x-7))=int(2dx)/(x+1)^2-intdx/(x+1)+int(2dx)/(x-7)∫(x2+12x−5)dx(x+1)2(x−7)=∫2dx(x+1)2−∫dxx+1+∫2dxx−7
=-2/(x+1)-ln∣x+1∣+2ln∣x-7∣ + C=−2x+1−ln∣x+1∣+2ln∣x−7∣+C