# How do you integrate 3/((x-2)(x+1)) using partial fractions?

Mar 5, 2018

$\int \frac{3}{\left(x - 2\right) \left(x + 1\right)} \mathrm{dx} = \ln \left\mid \frac{x - 2}{x + 1} \right\mid + \text{c}$

#### Explanation:

In order to integrate the function, we first use partial fractions to split the integrand

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

Now integrating, we get

$\frac{3}{\left(x - 2\right) \left(x + 1\right)} \mathrm{dx} = \int \frac{1}{x - 2} - \frac{1}{x + 1} \mathrm{dx} = \ln \left\mid x - 2 \right\mid - \ln \left\mid x + 1 \right\mid + \text{c"=lnabs((x-2)/(x+1))+"c}$

Mar 6, 2018

$\int \frac{3}{\left(x - 2\right) \left(x + 1\right)} = \ln | \setminus x - 2 | + \ln | \setminus \frac{1}{x + 1} | + C$

#### Explanation:

Partial Fractions

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

Multiply the whole equation by $\left(x - 2\right) \left(x + 1\right)$

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

expand the brackets

$3 = A x + A + B x - 2 B$

factorise

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

$A + B$ has to equal 0 because there is no x term for the other side
and $A - 2 B$ has to equal 3 because those terms have no x same as 3

So

$A + B = 0$ $\left(1\right)$
and
$A - 2 B = 3$ $\left(2\right)$

subtract equation $\left(2\right)$ from equation $\left(1\right)$ to get

$0 - 3 B = 3$
$\frac{\cancel{- 3} B}{\cancel{- 3}} = - \cancel{\frac{3}{3}}$

$\therefore B = - 1$

Substitute $B$ for 3 in either equation $\left(1\right)$ or $\left(2\right)$ to get $A$

$A + \left(- 1\right) = 0$
$\therefore A = 1$

or

$A - 2 \left(- 1\right) = 3$
$\therefore A = 1$

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

Integration

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

$\int \frac{1}{x - 2} + \frac{- 1}{x + 1} \mathrm{dx} = \int \frac{1}{x - 2} \mathrm{dx} + \int \frac{- 1}{x + 1} \mathrm{dx}$

$\int \frac{1}{x - 2} \mathrm{dx} + \int \frac{- 1}{x + 1} \mathrm{dx} = \int \frac{1}{x - 2} \mathrm{dx} - \int \frac{1}{x + 1} \mathrm{dx}$

because of the constant multiple of -1

$\int \frac{1}{x - 2} \mathrm{dx} - \int \frac{1}{x + 1} \mathrm{dx}$

Evaluate the two integrals separately

$\int \frac{1}{x - 2} \mathrm{dx}$

use u-substitution

$u = x - 2$
$\frac{\mathrm{du}}{\mathrm{dx}} = 1$

$\frac{\cancel{\mathrm{dx}} \mathrm{du}}{\cancel{\mathrm{dx}}} = 1 \cdot \mathrm{dx}$

Bring the integral into the u world

$\int \frac{1}{u} \mathrm{du}$

$\ln | \setminus u | + {C}_{1}$

Bring back into the x world

$\ln | \setminus x - 2 | + {C}_{1}$

second integral

$- \int \frac{1}{x + 1} \mathrm{dx}$

use another letter substitution so you or the marker doesn't get confused

$v = x + 1$

$\frac{\mathrm{dv}}{\mathrm{dx}} = 1$

$\frac{\cancel{\mathrm{dx}} \mathrm{dv}}{\cancel{\mathrm{dx}}} = 1 \cdot \mathrm{dx}$

bring the integral into the v world

$- \int \frac{1}{v} \mathrm{dv}$

$- \left(\ln | \setminus v | + {C}_{2}\right)$

bring back into the x world

$- \left(\ln | \setminus x + 1 | + {C}_{2}\right)$

A negative constant, adding or subtracting a constant from another constant is still a constant so we will just make another constant

$- \ln | \setminus x + 1 | + {C}_{3}$

Use the log law $a {\log}_{b} \left(c\right) = {\log}_{b} \left({c}^{a}\right)$

$\ln | \setminus {\left(x + 1\right)}^{-} 1 | + {C}_{3}$

$\ln | \setminus \frac{1}{x + 1} | + {C}_{3}$

put the parts of the integral that we answered back together

$\ln | \setminus x - 2 | + \ln | \setminus \frac{1}{x + 1} | + {C}_{1} + {C}_{3}$

$\therefore$

$\ln | \setminus x - 2 | + \ln | \setminus \frac{1}{x + 1} | + C$