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

Nov 10, 2015

Your goal is to "break" the fraction $\frac{{x}^{2} + 1}{x \cdot \left({x}^{2} - 1\right)}$ into several fractions.

First, do a complete factorization of the denominator: $x \left({x}^{2} - 1\right) = x \left(x + 1\right) \left(x - 1\right)$.

This means that you would like to find $A$, $B$ and $C$ so that the following holds:

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

First, multiply the whole equation with $x \cdot \left(x + 1\right) \left(x - 1\right)$ in order to get rid of the denominator. You will get:

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

Now, the easiest way to go is to "gather" all $\textcolor{red}{{x}^{2}}$ terms, all $\textcolor{b l u e}{x}$ terms and all $\textcolor{g r e e n}{\text{terms without } x}$.
Just so it's clear, your equation currently looks like this:

$\textcolor{red}{{x}^{2}} + \textcolor{b l u e}{0 \cdot x} + \textcolor{g r e e n}{1} = A \left(\textcolor{red}{{x}^{2}} + \textcolor{b l u e}{0 \cdot x} \textcolor{g r e e n}{- 1}\right) + B \left(\textcolor{red}{{x}^{2}} \textcolor{b l u e}{- x} + \textcolor{g r e e n}{0}\right) + C \left(\textcolor{red}{{x}^{2}} + \textcolor{b l u e}{x} + \textcolor{g r e e n}{0}\right)$

This leads us to the following linear equation system:
the equation for ${x}^{2}$: $1 = A + B + C$
the equation for $x$: $0 = 0 - B + C$
the equation for $1$: $1 = - A$

$\left\{\begin{matrix}1 = A + B + C \\ 0 = - B + C \\ 1 = - A\end{matrix}\right.$

Here, we can see immediately that $A = - 1$. Pluging the value in the first equation leads us to the following system:

$\left\{\begin{matrix}2 = B + C \\ 0 = - B + C \\ - 1 = A\end{matrix}\right.$

Now, you can add the first and the second equation which would lead you to $2 = 2 C \implies C = 1$. Last but not least, it's easy to plug this value in a fitting equation to find out that $B = 1$.

This means that we have managed to compute the partial fractions:

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

This makes it easy to integrate:

$\int \frac{{x}^{2} + 1}{x \cdot \left(x + 1\right) \left(x - 1\right)} \text{d"x = - int 1/x "d"x + int 1/(x+1) "d" x + int 1/(x-1) "d} x$

$= - \ln | x | + \ln | x + 1 | + \ln | x - 1 | + c$.

Hope that this helped!