Solve this indefinite integral: $\int \frac{x+2}{x^2-1}dx$ I need to solve this indefinite integral: $$\int \frac{x+2}{x^2-1}dx$$
but the result is wrong.
Here my steps:
$D° > N° $ so I need to reduce the Denominator, which is a difference of two square: $(x^2-1) = (x-1)(x+1)$ so my new integral is:
$$ \int \frac{x+2}{x^2-1}dx = \frac{A}{x-1} + \frac{B}{x+1} = \frac{A(x+1)+B(x-1)}{(x-1)(x+1)}$$
$$
\begin{cases}
x = Ax+Bx \\
2 = A-B
\end{cases}
$$
and I get:
\begin{cases}
A= \frac{1}{2}\\
B = -\frac{1}{2}
\end{cases}
So:
$$\int \frac{x+2}{x^2-1}dx = \int \frac{1}{2(x-1)}dx -\int \frac{1}{2(x+1)}dx$$
I need to get the derivate of the denominator
$$\int \frac{x+2}{x^2-1}dx = \frac{1}{2}\int \frac{2}{2(x-1)}dx - \frac{1}{2}\int \frac{2}{2(x+1)}dx$$
So I get:
$$\frac{1}{2}ln|2x-2| - \frac{1}{2}ln|2x+2| + C$$
but the result is wrong: http://www.wolframalpha.com/input/?i=%5Cint+%5Cfrac%7Bx%2B2%7D%7Bx%5E2-1%7Ddx

Why not
\begin{equation}
\int \frac{x+2}{x^2-1}\ dx=\int \frac{(x+1)+1}{(x-1)(x+1)}\ dx=\int \frac{1}{x-1}\ dx+\int \frac{1}{(x-1)(x+1)}\ dx\ ?
\end{equation}
