# How do you use partial fraction decomposition to decompose the fraction to integrate (x^2+x-6)/((x^2+1)(x-1))?

Jun 22, 2015

You have a second-degree factor and a first-degree factor in the denominator. ${x}^{2} + 1$ can't be factored any further as all real numbers, so this will separate into:

$\frac{A}{x - 1} + \frac{B x + C}{{x}^{2} + 1}$

Cross-multiply:

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

Multiply it out (and arrange it to look descending if you want):
$= \frac{A {x}^{2} + A + B {x}^{2} - B x + C x - C}{\left(x - 1\right) \left({x}^{2} + 1\right)}$

However you do it, you should see now that there are ${x}^{2}$, $x$, and ${x}^{0}$ (constant) terms.
$= \frac{\textcolor{h i g h l i g h t}{\left(A + B\right)} {x}^{2} + \textcolor{h i g h l i g h t}{\left(- B + C\right)} x + \textcolor{h i g h l i g h t}{\left(A - C\right)}}{\left(x - 1\right) \left({x}^{2} + 1\right)}$

I purposefully changed $- \left(B - C\right)$ to $+ \left(- B + C\right)$ to match the original numerator's adding $x$. We can equate them back to the original equation's numerator terms' coefficients.

1) $A + B = 1$
2) $- B + C = 1$
3) $A - C = - 6$

Now, here's what I would do. The parentheses indicate which equation was used when. Single parentheses indicate newly-numbered equations.

$A = 1 - B$ (1)
$1 - B - C = - 6$ (1$\to$3)
4) $B = 7 - C$

$C - 7 + C = 1$ (4 $\to$ 2)
$2 C = 8$
$\textcolor{g r e e n}{C = 4}$

$A - 4 = - 6$ (3)
$\textcolor{g r e e n}{A = - 2}$

$- 2 + B = 1 \to \textcolor{g r e e n}{B = 3}$ (1)

Plug them back in and integrate:

$\implies \int - \frac{2}{x - 1} \mathrm{dx} + \int \frac{3 x + 4}{{x}^{2} + 1} \mathrm{dx}$

Notice how you can separate the second integral (some people may have trouble thinking of that):
$= - 2 \int \frac{1}{x - 1} \mathrm{dx} + \int \frac{3 x}{{x}^{2} + 1} \mathrm{dx} + 4 \int \frac{1}{{x}^{2} + 1} \mathrm{dx}$

And prepare the now-second integral for u-substitution by multiplying by $\frac{3}{2} \cdot \frac{2}{3}$ since $\frac{2}{3} \cdot 3 x = 2 x$ and $d \left({x}^{2}\right) = 2 x \mathrm{dx}$:

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

For the first integral, it is $- 2 \ln | x - 1 |$. With the second one, letting $u = {x}^{2} + 1$, $\mathrm{du} = 2 x \mathrm{dx}$ (that's what we were preparing for) and thus it becomes:

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

so it is therefore $\frac{3}{2} \ln | {x}^{2} + 1 |$. The third is $4 \arctan x$ since $4 \frac{d}{\mathrm{dx}} \left[\arctan x\right] = 4 \cdot \frac{1}{1 + {x}^{2}}$.

$\implies \textcolor{b l u e}{- 2 \ln | x - 1 | + \frac{3}{2} \ln | {x}^{2} + 1 | + 4 \arctan x + C}$