Factorize the denominator:
#x^3-1= (x-1)(x^2+x+1)#
then decompose in partial fractions:
#(6x^2+2x+7)/((x-1)(x^2+x+1)) = A/(x-1) +(Bx+C)/(x^2+x+1)#
#(6x^2+2x+7)/((x-1)(x^2+x+1)) = (A(x^2+x+1)+ (Bx+C)(x-1)) /((x-1)(x^2+x+1))#
#(6x^2+2x+7)/((x-1)(x^2+x+1)) = (Ax^2+Ax+A+ Bx^2-Bx+Cx-C) /((x-1)(x^2+x+1))#
#6x^2+2x+7 = (A+B)x^2+(A-B+C)x+(A-C) #
#{(A+B=6),(A-B+C=2),(A-C=7):}#
summing the first two equations:
#{(2A+C=8),(A-C=7):}#
so:
#{(A=5),(B=1),(C=-2):}#
and finally:
#(6x^2+2x+7)/(x^3-1) = 5/(x-1) +(x-2)/(x^2+x+1)#
Solve the integral separately:
#(1) int dx/(x-1) = ln abs (x-1)+ c_1#
#(2)# to solve the second split it in two parts, based on the fact that:
#d/dx (x^2+x+1) = 2x+1#
so:
#int (x-2)/(x^2+x+1)dx = int (1/2(2x+1)-5/2)/(x^2+x+1)dx#
#int (x-2)/(x^2+x+1)dx =1/2 int (2x+1)/(x^2+x+1)dx -5/2 int dx/(x^2+x+1)#
#int (x-2)/(x^2+x+1)dx =1/2 ln (x^2+x+1) -5/2 int dx/(x^2+x+1)#
Now:
#int dx/(x^2+x+1) = int dx/((x+1/2)^2+3/4)#
#int dx/(x^2+x+1) = 4/3 int dx/(((2x+1)/sqrt3)^2+1)#
#int dx/(x^2+x+1) = 2/sqrt3 int (d((2x+1)/sqrt3))/(((2x+1)/sqrt3)^2+1)#
#int dx/(x^2+x+1) = 2/sqrt3 arctan((2x+1)/sqrt3)+ c_2#
Putting the partial results together:
#int (6x^2+2x+7)/(x^3-1) dx = 5ln abs (x-1)+ 1/2 ln (x^2+x+1) -5/sqrt3arctan((2x+1)/sqrt3) +C#