As (x^2+2x-1)/(x^3-x)=(x^2+2x-1)/(x(x+1)(x-1))x2+2x−1x3−x=x2+2x−1x(x+1)(x−1), let us convert them into partial fractions
(x^2+2x-1)/(x^3-x)hArrA/x+B/(x+1)+C/(x-1)x2+2x−1x3−x⇔Ax+Bx+1+Cx−1 or
(x^2+2x-1)/(x^3-x)=(A(x^2-1)+B(x^2-x)+C(x^2+x))/(x(x+1)(x-1))x2+2x−1x3−x=A(x2−1)+B(x2−x)+C(x2+x)x(x+1)(x−1) or
(x^2+2x-1)/(x^3-x)=((A+B+C)x^2+(-B+C)x-A)/(x(x+1)(x-1))x2+2x−1x3−x=(A+B+C)x2+(−B+C)x−Ax(x+1)(x−1) i.e.
A+B+C=1A+B+C=1, -B+C=2−B+C=2 and A=1A=1,
which gives C=1C=1 and B=-1B=−1 and hence
(x^2+2x-1)/(x^3-x)=1/x-1/(x+1)+1/(x-1)x2+2x−1x3−x=1x−1x+1+1x−1 and
int(x^2+2x-1)/(x^3-x)dx=int[1/x-1/(x+1)+1/(x-1)]dx∫x2+2x−1x3−xdx=∫[1x−1x+1+1x−1]dx
= lnx-ln(x+1)+ln(x-1)+clnx−ln(x+1)+ln(x−1)+c