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

Dec 5, 2016

The answer is =ln(∣x∣)-1/2ln(∣x+1∣)+1/2ln(∣x-1∣)+C

#### Explanation:

We use

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

So, the denominator is

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

The decomposition in partial fractions is

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

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

So,

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

Let, $x = 0$,$\implies$, $- 1 = - A$, $\implies$, $A = 1$

Let $x = 1$, $\implies$, $1 = 2 C$, $\implies$, $C = \frac{1}{2}$

Let $x = - 1$,$\implies$, $- 1 = 2 B$, $\implies$, $B = - \frac{1}{2}$

So,

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

So,

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

=ln(∣x∣)-1/2ln(∣x+1∣)+1/2ln(∣x-1∣)+C

Dec 5, 2016

Narad is correct. Alternatively use the cover-up rule to get $A$, $B$ and $C$ directly.

#### Explanation:

To get $A$ "cover up" the $x$ in the denominator and replace all other $x$'s with value of $x$ which makes the covered-up term zero, which in this case $x = 0$, so $A = \frac{{0}^{2} + 0 - 1}{\left(0 + 1\right) \left(0 - 1\right)} = 1$
and similarly $B$ and $C$ by putting $x = 1$ and $x = - 1$.