To begin with, let's simplify the integrand:
∫ 4 x + 4 x ( x + 1 ) 2 d x = 4 ∫ x + 1 x ( x + 1 ) 2 d x = 4 ∫ 1 x ( x + 1 ) d x {\displaystyle {\begin{aligned}\int {\frac {4x+4}{x(x+1)^{2}}}\,dx&=4\int {\frac {x+1}{x(x+1)^{2}}}\,dx\\&=4\int {\frac {1}{x(x+1)}}\,dx\end{aligned}}}
Next we use partial fractions to solve 1 x ( x + 1 ) = A x + B x + 1 {\displaystyle {\frac {1}{x(x+1)}}={\frac {A}{x}}+{\frac {B}{x+1}}} . Multiplying both sides by x ( x + 1 ) {\displaystyle x(x+1)} we obtain 1 = A ( x + 1 ) + B x = ( A + B ) x + A {\displaystyle 1=A(x+1)+Bx=(A+B)x+A} , and when we compare coefficients we find that A + B = 0 {\displaystyle A+B=0} , A = 1 {\displaystyle A=1} and hence B = − 1 {\displaystyle B=-1} . Therefore,
4 ∫ 1 x ( x + 1 ) d x = 4 ∫ ( A x + B x + 1 ) d x = 4 ∫ ( 1 x − 1 x + 1 ) d x = 4 ( ln | x | − ln | x + 1 | + C ) {\displaystyle {\begin{aligned}4\int {\frac {1}{x(x+1)}}\,dx&=4\int \left({\frac {A}{x}}+{\frac {B}{x+1}}\right)\,dx\\&=4\int \left({\frac {1}{x}}-{\frac {1}{x+1}}\right)\,dx\\&=4(\ln |x|-\ln |x+1|+C)\end{aligned}}}