# How do you integrate [(x^2 + 1)/(x^2 - 1)]dx?

Jun 20, 2016

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

#### Explanation:

$\int \left[\frac{{x}^{2} + 1}{{x}^{2} - 1}\right] \mathrm{dx}$

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

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

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

As $\left({x}^{2} - 1\right) = \left(x + 1\right) \left(x - 1\right)$, let $\frac{2}{\left(x + 1\right) \left(x - 1\right)} \Leftrightarrow \frac{A}{x + 1} + \frac{B}{x - 1}$ i.e.

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

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

i.e. $A + B = 0$ and $- A + B = 2$ and adding them we get $2 B = 2$

or $B = 1$ and $A = - 1$. Hence

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

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