I decomposed integrand into basic fractions,
(x^2+1)/[x*(x+1)*(x^2+2)]x2+1x⋅(x+1)⋅(x2+2)
=A/x+B/(x+1)+(Cx+D)/(x^2+2)Ax+Bx+1+Cx+Dx2+2
After expanding denominator,
A(x+1)(x^2+2)+Bx(x^2+2)+(Cx+D)x(x+1)=x^2+1A(x+1)(x2+2)+Bx(x2+2)+(Cx+D)x(x+1)=x2+1
A*(x^3+x^2+2x+2)+B*(x^3+2x)+(Cx+D)*(x^2+x)=x^2+1A⋅(x3+x2+2x+2)+B⋅(x3+2x)+(Cx+D)⋅(x2+x)=x2+1
(A+B+C)*x^3+(A+C+D)*x^2+(2A+2B+D)*x+2A=x^2+1(A+B+C)⋅x3+(A+C+D)⋅x2+(2A+2B+D)⋅x+2A=x2+1
After equating coefficients,
A+B+C=0A+B+C=0, A+C+D=1A+C+D=1, 2A+2B+D=02A+2B+D=0 and 2A=12A=1
From these equations, A=1/2, B=-2/3, C=1/6 and D=1/3A=12,B=−23,C=16andD=13
Thus,
int (x^2+1)/[x*(x+1)*(x^2+2)]*dx∫x2+1x⋅(x+1)⋅(x2+2)⋅dx
=1/2*int (dx)/x-2/3*int (dx)/(x+1)+1/6*int ((x+2)*dx)/(x^2+2)12⋅∫dxx−23⋅∫dxx+1+16⋅∫(x+2)⋅dxx2+2
=1/2*Lnx-2/3*Ln(x+1)+1/12*int ((2x+4)*dx)/(x^2+2)12⋅lnx−23⋅ln(x+1)+112⋅∫(2x+4)⋅dxx2+2
=1/2*Lnx-2/3*Ln(x+1)+1/12*int (2x*dx)/(x^2+2)+1/3*int (dx)/(x^2+2)12⋅lnx−23⋅ln(x+1)+112⋅∫2x⋅dxx2+2+13⋅∫dxx2+2
=1/2*Lnx-2/3*Ln(x+1)+1/12*Ln(x^2+2)+sqrt2/6*int (sqrt2*dx)/(x^2+2)12⋅lnx−23⋅ln(x+1)+112⋅ln(x2+2)+√26⋅∫√2⋅dxx2+2
=1/2*Lnx-2/3*Ln(x+1)+1/12*Ln(x^2+2)+sqrt2/6*arctan(x/sqrt2)+C12⋅lnx−23⋅ln(x+1)+112⋅ln(x2+2)+√26⋅arctan(x√2)+C