# How do you integrate int (x-3)/(x^2-2x-5) dx using partial fractions?

Sep 29, 2017

$\int \setminus \frac{x - 3}{{x}^{2} - 2 x - 5} \setminus \mathrm{dx} = \frac{1}{2} \ln | {x}^{2} - 2 x - 5 | - \frac{1}{\sqrt{6}} \ln | \frac{x - 1 - \sqrt{6}}{x - 1 + \sqrt{6}} | + C$

#### Explanation:

We seek:

$I = \int \setminus \frac{x - 3}{{x}^{2} - 2 x - 5} \setminus \mathrm{dx}$

If we look at the quadratic on the numerator, we finds that if

${x}^{2} - 2 x - 5 = 0 \implies x = 1 \pm \sqrt{6}$

Therefore we find that we do not get "perfect" factors but rather:

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

So, although we could decompose into partial fractions it actually complicates the problem with the risk of an algebraic error.

A another approach, is to complete the square of the denominator:

$I = \int \setminus \frac{x - 3}{{\left(x - 1\right)}^{2} - 1 - 5} \setminus \mathrm{dx}$
$\setminus \setminus = \int \setminus \frac{x - 3}{{\left(x - 1\right)}^{2} - 6} \setminus \mathrm{dx}$

Substitute $u = x - 1 \implies \frac{\mathrm{du}}{\mathrm{dx}} = 1$; then

$I = \int \setminus \frac{u - 2}{{u}^{2} - 6} \setminus \mathrm{du}$
$\setminus \setminus = \int \setminus \frac{u}{{u}^{2} - 6} - \frac{2}{{u}^{2} - 6} \setminus \mathrm{du}$
$\setminus \setminus = \int \setminus \frac{1}{2} \frac{2 u}{{u}^{2} - 6} - \frac{2}{{u}^{2} - {\sqrt{6}}^{2}} \setminus \mathrm{du}$

Both of these integrals are standard, so we can now integrate, giving:

$I = \frac{1}{2} \ln | {u}^{2} - 6 | - 2 \frac{1}{2 \sqrt{6}} \ln | \frac{u - \sqrt{6}}{u + \sqrt{6}} | + C$
$\setminus \setminus = \frac{1}{2} \ln | {u}^{2} - 6 | - \frac{1}{\sqrt{6}} \ln | \frac{u - \sqrt{6}}{u + \sqrt{6}} | + C$

And, restoring the earlier substitution:

$I = \frac{1}{2} \ln | {\left(x - 1\right)}^{2} - 6 | - \frac{1}{\sqrt{6}} \ln | \frac{\left(x - 1\right) - \sqrt{6}}{\left(x - 1\right) + \sqrt{6}} | + C$
$\setminus \setminus = \frac{1}{2} \ln | {x}^{2} - 2 x - 5 | - \frac{1}{\sqrt{6}} \ln | \frac{x - 1 - \sqrt{6}}{x - 1 + \sqrt{6}} | + C$