Let #(x^2+x)/((3x^2+2)(x+7))=(Ax+B)/(3x^2+2)+C/(x+7)#
Hence #x^2+x=(Ax+B)(x+7)+C(3x^2+2)#
or #x^2+x=Ax^2+7Ax+Bx+7B+3Cx^2+2C#
and comparing coefficients on both sides
#A+3C=1#, #7A+B=1# and #7B+2C=0#
the solution for these simiultaneous equations is
#A=23/149#, #B=-12/149# and #C=42/149#
Hence #int(x^2+x)/((3x^2+2)(x+7))dx#
= #int[1/149{(23x-12)/(3x^2+2)+42/(x+7)}]dx#
= #1/149int(23x-12)/(3x^2+2)dx+42/149int1/(x+7)dx#
We know #int1/(x+7)dx=ln|x+7|# and also #int1/(x^2+a^2)dx=1/atan^(-1)(x/a)+c#.
For #int(23x-12)/(3x^2+2)dx# let us assume #u=3x^2+2# and then #du=6xdx#
hence #int(23x-12)/(3x^2+2)dx=23/6int(6x)/(3x^2+2)dx-4int1/(x^2+2/3)dx#
= #23/6int(du)/u-4sqrt(3/2)tan^(-1)(x/(sqrt(2/3)))#
= #23/6ln|3x^2+2|-2sqrt6tan^(-1)((sqrt3x)/(sqrt2))#
Hence #int(x^2+x)/((3x^2+2)(x+7))dx#
= #23/6ln|3x^2+2|-2sqrt6tan^(-1)((sqrt3x)/(sqrt2))+ln|x+7|+c#