Let's perform the decomposition into partial fractions
(x+7)/(x^2(x+2))=A/(x^2)+B/(x)+C/(x+2)x+7x2(x+2)=Ax2+Bx+Cx+2
=(A(x+2)+B(x(x+2))+C(x^2))/(x^2(x+2))=A(x+2)+B(x(x+2))+C(x2)x2(x+2)
As the denominators are the same, we compare the numerators
x+7=A(x+2)+B(x(x+2))+C(x^2)x+7=A(x+2)+B(x(x+2))+C(x2)
Let A=0A=0, =>⇒, 7=2A7=2A, =>⇒, A=7/2A=72
Let x=-2x=−2, =>⇒, 5=4C5=4C, =>⇒, C=5/4C=54
Coefficients of xx
1=A+2B1=A+2B, =>⇒, 2B=1-A=1-7/2=-5/22B=1−A=1−72=−52
B=-5/4B=−54
Therefore,
(x+7)/(x^2(x+2))=(7/2)/(x^2)+(-5/4)/(x)+(5/4)/(x+2)x+7x2(x+2)=72x2+−54x+54x+2
So,
int((x+7)dx)/(x^2(x+2))=7/2intdx/(x^2)-5/4intdx/(x)+5/4intdx/(x+2)∫(x+7)dxx2(x+2)=72∫dxx2−54∫dxx+54∫dxx+2
=-7/(2x)-5/4ln(|x|)+5/4ln(|x+2|)+C=−72x−54ln(|x|)+54ln(|x+2|)+C