# How do you integrate int (x³ - 7x - 3)/(x² - x -2)  using partial fractions?

##### 1 Answer
Feb 4, 2017

The answer is $= {x}^{2} / 2 + x - 3 \ln \left(| x - 2 |\right) - \ln \left(| x + 1 |\right) + C$

#### Explanation:

As the degree of the numerator is $>$ degree of the denominator, we have to perform a long division

$\textcolor{w h i t e}{a a a a}$${x}^{3}$$\textcolor{w h i t e}{a a a a}$$- 7 x - 3$$\textcolor{w h i t e}{a a a a}$$|$${x}^{2} - x - 2$

$\textcolor{w h i t e}{a a a a}$${x}^{3}$$- {x}^{2}$$- 2 x$$\textcolor{w h i t e}{a a a a a a a a}$$|$$x + 1$

$\textcolor{w h i t e}{a a a a a}$$0$$+ {x}^{2}$$- 5 x - 3$

$\textcolor{w h i t e}{a a a a a a}$+x^2-x-2

$\textcolor{w h i t e}{a a a a a a a}$+0-4x-1

Also,

${x}^{2} - x - 2 = \left(x - 2\right) \left(x + 1\right)$

Therefore,

$\frac{{x}^{3} - 7 x - 3}{{x}^{2} - x - 2} = \left(x + 1\right) + \frac{- 4 x - 1}{\left(x - 2\right) \left(x + 1\right)}$

We can perform the decomposition into partial fractions

$\frac{- 4 x - 1}{\left(x - 2\right) \left(x + 1\right)} = \frac{A}{x - 2} + \frac{B}{x + 1}$

$= \frac{A \left(x + 1\right) + B \left(x - 2\right)}{\left(x - 2\right) \left(x + 1\right)}$

We compare the numerators

$- 4 x - 1 = A \left(x + 1\right) + B \left(x - 2\right)$

Let $x = 2$, $\implies$, $- 9 = 3 A$, $\implies$, $A = - 3$

Let $x = - 1$, $\implies$, $3 = - 3 B$, $\implies$, $B = - 1$

So,

$\frac{4 x + 1}{\left(x - 2\right) \left(x + 1\right)} = - \frac{3}{x - 2} - \frac{1}{x + 1}$

Therefore,

$\frac{{x}^{3} - 7 x - 3}{{x}^{2} - x - 2} = \left(x + 1\right) - \frac{3}{x - 2} - \frac{1}{x + 1}$

$\int \frac{\left({x}^{3} - 7 x - 3\right) \mathrm{dx}}{{x}^{2} - x - 2} = \int x \mathrm{dx} + \int 1 \mathrm{dx} - 3 \int \frac{\mathrm{dx}}{x - 2} - \int \frac{\mathrm{dx}}{x + 1}$

$= {x}^{2} / 2 + x - 3 \ln \left(| x - 2 |\right) - \ln \left(| x + 1 |\right) + C$