Integrate: $\frac{x^2+x-1}{x^2-1}$ with respect to $x$
Solution 1:
Yeah!
My first mathSE integration problem answer, in I don't remember how long.
$\displaystyle \frac{1}{x^2-1} = \frac{1}{2} \times \left[\frac{1}{x-1} - \frac{1}{x+1}\right].$
$\displaystyle \frac{x}{x^2-1} = \frac{1}{2} \times \left[\frac{x}{x-1} - \frac{x}{x+1}\right].$
This equals $\displaystyle \frac{1}{2} \left\{ \left[1 + \frac{1}{x-1}\right] - \left[1 - \frac{1}{x+1}\right] \right\}.$
This equals $\displaystyle \frac{1}{2} \left[\frac{1}{x-1} + \frac{1}{x+1}\right].$
Therefore $$\int \frac{x}{x^2 - 1}~dx = \frac{1}{2} \left[ \log(x-1) + \log(x+1) \right].$$
Edit
Sad to say...
The shortcut is that $\displaystyle \frac{d}{dx}\log(x^2 - 1) = \frac{2x}{x^2 - 1}.$
Solution 2:
Once you have
$$\int1+\frac{x}{x^2−1}dx$$ $$\int dx+\int\frac{x}{x^2−1}dx$$ $$x+C_1+\int\frac{x}{x^2−1}dx$$
Now replace $$t = x^2-1$$ $$dt = 2x\cdot dx$$ $${dt\over2} = x\cdot dx$$ And do:
$$x+C_1+\int\frac{dt}{2t}$$ $$x+C_1+{1\over2}\int\frac{dt}{t}$$ $$x+C_1+{1\over2}\ln(t) + C_2$$ And add the $C_n$ constants $C_1+C_2=C$ $$x+{1\over2}\ln(x^2-1) + C$$