Integrate: $\frac{x^2+x-1}{x^2-1}$ with respect to $x$ Ok so here is where I am up to:
I can find some similarity with the numerator and denominator and managed to reduce to the following:
$\int\frac{x^2+x-1}{x^2-1}dx = \int\frac{x^2-1}{x^2-1}+\frac{x}{x^2-1}dx$
$=\int1+\frac{x}{x^2-1}dx.$
I tried to reduce it further by factoring out an $(x-1)$ but did not get anywhere after that.
Is there any other way to transpose this into a simpler format so I can integrate it?
 A: 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}.$
A: 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$$
A: $\int x^2 + x - 1\over x^2 - 1$ dx = $\int ({x^2 - 1\over x^2 - 1} + {x\over x^2 - 1})$dx
= $\int 1 dx + \int {x\over x^2 - 1}$ dx
Let $x^2 - 1$ = t  $\implies$ 2x dx = dt
= x + $\int {dt\over 2t}$
= x + ${1\over 2} \int {1\over t}$ dt       
since, integration of ${1\over x}$ = log x
= x + ${1\over 2}$ log t + C
Substituting the value of t here, we get
= x + $log(x^2 - 1)\over 2$ + C
