Let's do the partial fraction decomposition
x+2(x2+x+7)(x+1)=Ax+Bx2+x+7+Cx+1
=(Ax+B)(x+1)+C(x2+x+7)(x2+x+7)(x+1)
So x+2=(Ax+B)(x+1)+C(x2+x+7)
Let x=−1 then 1=0+7C ⇒C=17
let x=0 then 2=B+7C 2=B+1 ⇒ B=1
Coefficients of x2
0=A+C ⇒ A=−C=−17
so the integral becomes
∫(x+2)dx(x2+x+7)(x+1)=∫((−17)x+1)dxx2+x+7+∫(17)dxx+1
=∫dx7(x+1)−∫(x−7)dx7(x2+x+7)
∫dx7(x+1)=ln(x+1)7
∫(x−7)dx7(x2+x+7)=∫xdx7(x2+x+7)−∫dx(x2+x+7)
=∫(2x+1)dx14(x2+x+7)−∫15dx14(x2+x+7)
∫(2x+1)dx14(x2+x+7)=(114)ln(x2+x+7))
Now remains ∫15dx14(x2+x+7)=1514∫dxx2+x+14+274
=1514∫dx((x+12)2)+274
=1514∫dx(x+12)2(3√32)2+1
=1514⋅23√3arctan⎛⎜⎝x+123√32⎞⎟⎠
=(57√3)arctan⎛⎜⎝x+123√32⎞⎟⎠