The solution is
int (x^2+x)/((3x^2-1)(x+7)) dx=int ((Ax+B)/(3x^2-1)+C/(x+7)) dx
Start with the needed partial fraction
(x^2+x)/((3x^2-1)(x+7))=(Ax+B)/(3x^2-1)+C/(x+7)
Least Common Denominator = (3x^2-1)(x+7)
(x^2+x)/((3x^2-1)(x+7))=((Ax+B)(x+7)+C(3x^2-1))/((3x^2-1)(x+7))
Expanding the right side of the equation
(x^2+x)/((3x^2-1)(x+7))=(Ax^2+Bx+7Ax+7B+3Cx^2-C)/((3x^2-1)(x+7))
Match the numerical coefficients of the left and right sides of the equation
(1*x^2+1*x+0*x^0)/((3x^2-1)(x+7))=((A+3C)x^2+(B+7A)x+(7B-C)x^0)/((3x^2-1)(x+7))
The equations can now be established
A+3C=1" "first equation
B+7A=1" "second equation
7B-C=0" "third equation
from the third
C=7B
substitute this in the first
A+3(7B)=1
A+21B=1
A=1-21B" "fourth equation
from the second B=1-7A
and substitute in the fourth equation
A=1-21B" "fourth equation
A=1-21(1-7A)
A=1-21+147A
A=20/146=10/73
then B=1-7A=1-7(10/73)=3/73
B=3/73
C=7B=7(3/73)=21/73
Do the integration now
int (x^2+x)/((3x^2-1)(x+7)) dx=int ((Ax+B)/(3x^2-1)+C/(x+7)) dx
int (x^2+x)/((3x^2-1)(x+7)) dx=int (((10/73)x+(3/73))/(3x^2-1)+(21/73)/(x+7)) dx
int (x^2+x)/((3x^2-1)(x+7)) dx
=int (10/73x)/(3x^2-1)dx+int (3/73)/(3x^2-1)dx+int (21/73)/(x+7) dx
int (x^2+x)/((3x^2-1)(x+7)) dx
=10/(6(73))int (6x)/(3x^2-1)dx+3/73int 1/(3x^2-1)dx+21/73int 1/(x+7) dx
int (x^2+x)/((3x^2-1)(x+7)) dx
=5/(219)int (6x)/(3x^2-1)dx+(sqrt(3))/73int (sqrt(3))/((sqrt(3)x)^2-1^2)dx+21/73int 1/(x+7) dx
Use the integration formulas
int (du)/u=ln u and int (du)/(u^2-a^2)=1/(2a)ln ((u-a)/(u+a))
int (x^2+x)/((3x^2-1)(x+7)) dx
=5/219*ln(3x^2-1)+sqrt(3)/146ln((xsqrt3-1)/(xsqrt3+1))+21/73*ln(x+7)+C_0
God bless....I hope the explanation is useful.