The given function is x 2 +x+1 ( x+1 ) 2 ( x+2 ) .
Using method of partial fractions,
x 2 +x+1 ( x+1 ) 2 ( x+2 ) = A ( x+1 ) + B ( x+1 ) 2 + C ( x+2 ) x 2 +x+1=A( x+1 )( x+2 )+B( x+2 )+C ( x+1 ) 2 =A( x 2 +3x+2 )+B( x+2 )+C( x 2 +2x+1 ) =( A+C ) x 2 +( 3A+B+2C )x+( 2A+2B+C )
Equating the coefficients of x, x 2 and constant terms,
A+C=1(1)
3A+B+2C=1(2)
2A+2B+C=1(3)
On solving equations (1), (2) and (3), we get
A=−2 B=1 C=3
Now, the function becomes,
x 2 +x+1 ( x+1 ) 2 ( x+2 ) = −2 ( x+1 ) + 3 ( x+2 ) + 1 ( x+1 ) 2 (4)
Integrate equation (4),
∫ x 2 +x+1 ( x+1 ) 2 ( x+2 ) dx =−2 ∫ 1 x+1 dx +3 ∫ 2 x+2 dx + ∫ 1 ( x+1 ) 2 dx =−2 ∫ 1 x+1 dx +3 ∫ 2 x+2 dx + ∫ 1 ( x+1 ) 2 dx =−2log| x+1 |+3log| x+2 |− 1 x+1 +c
Thus, integration of given function is −2log| x+1 |+3log| x+2 |− 1 x+1 +c.