Factoring the denominator using the pattern:
#(a^3-b^3) = (a-b)(a^2b^0+a^1b^1+a^0b^2)#
#:.#
#(x^3-27)=(x-3)(x^2+3x+9)#
Decompose the fraction:
#(5x^2 -2x +42)/(x^3 -27) = A/(x-3)+ (Bx)/(x^2+3x+9)+ C/(x^2+3x+9)#
Multiply both sides by the denominator:
#5x^2 -2x +42 = A(x^2+3x+9)+ (Bx)(x-3)+ C(x-3)#
Let x = 3
#81= 27A+ 0B + 0B#
#A = 3#
#5x^2 -2x +42 = 3(x^2+3x+9)+ (Bx)(x-3)+ C(x-3)#
Let x = 0
#42 = 3(9)+ C(-3)#
#-3C=15#
#C = -5#
#5x^2 -2x +42 = 3(x^2+3x+9)+ (Bx)(x-3)-5(x-3)#
Let x = 1
#5 -2 +42 = 3(1+3+9)+ (B)(-2)-5(-2)#
#-4 = -2B#
#B = 2#
#(5x^2 -2x +42)/(x^3 -27) = 3/(x-3)+ (2x)/(x^2+3x+9)- 5/(x^2+3x+9)#
I checked this on a scratchpad.
Add Integral symbols:
#int(5x^2 -2x +42)/(x^3 -27)dx = 3int1/(x-3)dx+ int(2x)/(x^2+3x+9)dx- 5int1/(x^2+3x+9)dx#
Add 3 to the second integral and subtract 3 from the third:
#int(5x^2 -2x +42)/(x^3 -27)dx = 3int1/(x-3)dx+ int(2x+3)/(x^2+3x+9)dx- 8int1/(x^2+3x+9)dx#
The first two integrals become natural logarithms:
#int(5x^2 -2x +42)/(x^3 -27)dx = 3ln|x-3|+ ln(x^2+3x+9)- 8int1/(x^2+3x+9)dx#
The third integral is done by completing the square and a trigonometric substitution:
#int(5x^2 -2x +42)/(x^3 -27)dx = 3ln|x-3|+ ln(x^2+3x+9)- (16sqrt(3))/9tan^-1(sqrt3/9(2x+2))+ C#