3.101 \(\int \frac{1+x^2}{(-1+x)^3} \, dx\)

Optimal. Leaf size=25 \[ \frac{2}{1-x}-\frac{1}{(1-x)^2}+\log (1-x) \]

[Out]

-(1 - x)^(-2) + 2/(1 - x) + Log[1 - x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0257369, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091 \[ \frac{2}{1-x}-\frac{1}{(1-x)^2}+\log (1-x) \]

Antiderivative was successfully verified.

[In]  Int[(1 + x^2)/(-1 + x)^3,x]

[Out]

-(1 - x)^(-2) + 2/(1 - x) + Log[1 - x]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 1.88216, size = 15, normalized size = 0.6 \[ \log{\left (- x + 1 \right )} + \frac{2}{- x + 1} - \frac{1}{\left (- x + 1\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((x**2+1)/(-1+x)**3,x)

[Out]

log(-x + 1) + 2/(-x + 1) - 1/(-x + 1)**2

_______________________________________________________________________________________

Mathematica [A]  time = 0.014837, size = 16, normalized size = 0.64 \[ \frac{1-2 x}{(x-1)^2}+\log (x-1) \]

Antiderivative was successfully verified.

[In]  Integrate[(1 + x^2)/(-1 + x)^3,x]

[Out]

(1 - 2*x)/(-1 + x)^2 + Log[-1 + x]

_______________________________________________________________________________________

Maple [A]  time = 0.009, size = 20, normalized size = 0.8 \[ - \left ( -1+x \right ) ^{-2}+\ln \left ( -1+x \right ) -2\, \left ( -1+x \right ) ^{-1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((x^2+1)/(-1+x)^3,x)

[Out]

-1/(-1+x)^2+ln(-1+x)-2/(-1+x)

_______________________________________________________________________________________

Maxima [A]  time = 1.35041, size = 30, normalized size = 1.2 \[ -\frac{2 \, x - 1}{x^{2} - 2 \, x + 1} + \log \left (x - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 + 1)/(x - 1)^3,x, algorithm="maxima")

[Out]

-(2*x - 1)/(x^2 - 2*x + 1) + log(x - 1)

_______________________________________________________________________________________

Fricas [A]  time = 0.201252, size = 39, normalized size = 1.56 \[ \frac{{\left (x^{2} - 2 \, x + 1\right )} \log \left (x - 1\right ) - 2 \, x + 1}{x^{2} - 2 \, x + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 + 1)/(x - 1)^3,x, algorithm="fricas")

[Out]

((x^2 - 2*x + 1)*log(x - 1) - 2*x + 1)/(x^2 - 2*x + 1)

_______________________________________________________________________________________

Sympy [A]  time = 0.09555, size = 17, normalized size = 0.68 \[ - \frac{2 x - 1}{x^{2} - 2 x + 1} + \log{\left (x - 1 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x**2+1)/(-1+x)**3,x)

[Out]

-(2*x - 1)/(x**2 - 2*x + 1) + log(x - 1)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.200817, size = 24, normalized size = 0.96 \[ -\frac{2 \, x - 1}{{\left (x - 1\right )}^{2}} +{\rm ln}\left ({\left | x - 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 + 1)/(x - 1)^3,x, algorithm="giac")

[Out]

-(2*x - 1)/(x - 1)^2 + ln(abs(x - 1))