# Question #898f1

May 4, 2017

Factoring the denominator using the pattern:

$\left({a}^{3} - {b}^{3}\right) = \left(a - b\right) \left({a}^{2} {b}^{0} + {a}^{1} {b}^{1} + {a}^{0} {b}^{2}\right)$

$\therefore$

$\left({x}^{3} - 27\right) = \left(x - 3\right) \left({x}^{2} + 3 x + 9\right)$

Decompose the fraction:

$\frac{5 {x}^{2} - 2 x + 42}{{x}^{3} - 27} = \frac{A}{x - 3} + \frac{B x}{{x}^{2} + 3 x + 9} + \frac{C}{{x}^{2} + 3 x + 9}$

Multiply both sides by the denominator:

$5 {x}^{2} - 2 x + 42 = A \left({x}^{2} + 3 x + 9\right) + \left(B x\right) \left(x - 3\right) + C \left(x - 3\right)$

Let x = 3

$81 = 27 A + 0 B + 0 B$

$A = 3$

$5 {x}^{2} - 2 x + 42 = 3 \left({x}^{2} + 3 x + 9\right) + \left(B x\right) \left(x - 3\right) + C \left(x - 3\right)$

Let x = 0

$42 = 3 \left(9\right) + C \left(- 3\right)$

$- 3 C = 15$

$C = - 5$

$5 {x}^{2} - 2 x + 42 = 3 \left({x}^{2} + 3 x + 9\right) + \left(B x\right) \left(x - 3\right) - 5 \left(x - 3\right)$

Let x = 1

$5 - 2 + 42 = 3 \left(1 + 3 + 9\right) + \left(B\right) \left(- 2\right) - 5 \left(- 2\right)$

$- 4 = - 2 B$

$B = 2$

$\frac{5 {x}^{2} - 2 x + 42}{{x}^{3} - 27} = \frac{3}{x - 3} + \frac{2 x}{{x}^{2} + 3 x + 9} - \frac{5}{{x}^{2} + 3 x + 9}$

I checked this on a scratchpad.

$\int \frac{5 {x}^{2} - 2 x + 42}{{x}^{3} - 27} \mathrm{dx} = 3 \int \frac{1}{x - 3} \mathrm{dx} + \int \frac{2 x}{{x}^{2} + 3 x + 9} \mathrm{dx} - 5 \int \frac{1}{{x}^{2} + 3 x + 9} \mathrm{dx}$

Add 3 to the second integral and subtract 3 from the third:

$\int \frac{5 {x}^{2} - 2 x + 42}{{x}^{3} - 27} \mathrm{dx} = 3 \int \frac{1}{x - 3} \mathrm{dx} + \int \frac{2 x + 3}{{x}^{2} + 3 x + 9} \mathrm{dx} - 8 \int \frac{1}{{x}^{2} + 3 x + 9} \mathrm{dx}$

The first two integrals become natural logarithms:

$\int \frac{5 {x}^{2} - 2 x + 42}{{x}^{3} - 27} \mathrm{dx} = 3 \ln | x - 3 | + \ln \left({x}^{2} + 3 x + 9\right) - 8 \int \frac{1}{{x}^{2} + 3 x + 9} \mathrm{dx}$

The third integral is done by completing the square and a trigonometric substitution:

$\int \frac{5 {x}^{2} - 2 x + 42}{{x}^{3} - 27} \mathrm{dx} = 3 \ln | x - 3 | + \ln \left({x}^{2} + 3 x + 9\right) - \frac{16 \sqrt{3}}{9} {\tan}^{-} 1 \left(\frac{\sqrt{3}}{9} \left(2 x + 2\right)\right) + C$