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

Jan 25, 2017

The answer is $= - \ln \left(| x |\right) + \ln \left(| x + 1 |\right) + \ln \left(| x - 1 |\right) + C$

#### Explanation:

Let's factorise the denominator

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

So, let's do the decomposition into partial fractions

$\frac{{x}^{2} + 1}{x \left({x}^{2} - 1\right)} = \frac{{x}^{2} + 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)}$

The denominators are the same, so, we can equalise the numerators

${x}^{2} + 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$, $2 = 2 B$, $\implies$, $B = 1$

Let $x = 1$, $\implies$, $2 = 2 C$, $\implies$, $C = 1$

Therefore,

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

So, we can do the integration

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

$= - \ln \left(| x |\right) + \ln \left(| x + 1 |\right) + \ln \left(| x - 1 |\right) + C$