\(\therefore \int {\frac{{{x^2} + 2x - 1}}{{{x^3} - x}}} dx = \int {\frac{1}{{2(x + 1)}} + \frac{1}{{2(x + 1)}}dx + 2\int {\frac{1}{{(x + 1)(x - 1)}}} } dx - \int {\frac{1}{{x(x + 1)(x - 1)}}dx} \)
We can write it as a Partial fraction
Here,
\(\begin{array}{l}\frac{1}{{x(x + 1)(x - 1)}} = \frac{A}{x} + \frac{B}{{x + 1}} + \frac{C}{{x - 1}}\\\therefore 1 = (A + B + C){x^2} - A + ( - B + C)x\\\therefore - A = 1\\\therefore - B + C = 0\\A + B + C = 0\end{array}\)
Solve the system of equations, we get\(A = - 1,C = \frac{1}{2},B = \frac{1}{2}\)
So,
\(\begin{array}{l}\frac{1}{{x(x + 1)(x - 1)}} = \frac{{ - 1}}{x} + \frac{{{1 \mathord{\left/
{\vphantom {1 2}} \right.
\kern-\nulldelimiterspace} 2}}}{{x + 1}} + \frac{{{1 \mathord{\left/
{\vphantom {1 2}} \right.
\kern-\nulldelimiterspace} 2}}}{{x - 1}}\\\therefore \int {\frac{{{x^2} + 2x - 1}}{{({x^3} - x)}}} dx = \int {\frac{1}{{2(x + 1)}} + \frac{1}{{2(x + 1)}}dx + 2\int {\frac{1}{{(x + 1)(x - 1)}}} } dx - \int {\frac{1}{x}dx + \frac{1}{2}\int {\frac{1}{{x + 1}} + \frac{1}{2}\int {\frac{1}{{x - 1}}dx} } } \\ = \frac{{\ln \left( {\left| {x + 1} \right|} \right)}}{2} + \frac{{\ln \left( {\left| {x - 1} \right|} \right)}}{2} + 2\left( { - \frac{{\ln \left( {\left| {x + 1} \right|} \right)}}{2} + \frac{{\ln \left( {\left| {x - 1} \right|} \right)}}{2}} \right) + \ln \left( {\left| x \right|} \right) - \frac{{\ln \left( {\left| {x + 1} \right|} \right)}}{2} - \frac{{\ln \left( {\left| {x - 1} \right|} \right)}}{2}\end{array}\)