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

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

[Out]

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

_______________________________________________________________________________________

Rubi [A]  time = 0.0395534, antiderivative size = 50, normalized size of antiderivative = 1.14, 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}{27 (2-x)}+\frac{1}{27 (x+1)}-\frac{1}{18 (2-x)^2}+\frac{1}{27} \log (2-x)-\frac{1}{27} \log (x+1) \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 2.62354, size = 34, normalized size = 0.77 \[ \frac{\log{\left (- x + 2 \right )}}{27} - \frac{\log{\left (x + 1 \right )}}{27} + \frac{1}{27 \left (x + 1\right )} - \frac{2}{27 \left (- x + 2\right )} - \frac{1}{18 \left (- x + 2\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Mathematica [A]  time = 0.0338507, size = 39, normalized size = 0.89 \[ \frac{1}{54} \left (\frac{3 \left (2 x^2-5 x-1\right )}{(x-2)^2 (x+1)}+2 \log (x-2)-2 \log (x+1)\right ) \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Maple [A]  time = 0.014, size = 35, normalized size = 0.8 \[ -{\frac{1}{18\, \left ( -2+x \right ) ^{2}}}+{\frac{2}{-54+27\,x}}+{\frac{1}{27+27\,x}}+{\frac{\ln \left ( -2+x \right ) }{27}}-{\frac{\ln \left ( 1+x \right ) }{27}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-1/18/(-2+x)^2+2/27/(-2+x)+1/27/(1+x)+1/27*ln(-2+x)-1/27*ln(1+x)

_______________________________________________________________________________________

Maxima [A]  time = 1.40987, size = 50, normalized size = 1.14 \[ \frac{2 \, x^{2} - 5 \, x - 1}{18 \,{\left (x^{3} - 3 \, x^{2} + 4\right )}} - \frac{1}{27} \, \log \left (x + 1\right ) + \frac{1}{27} \, \log \left (x - 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/18*(2*x^2 - 5*x - 1)/(x^3 - 3*x^2 + 4) - 1/27*log(x + 1) + 1/27*log(x - 2)

_______________________________________________________________________________________

Fricas [A]  time = 0.200311, size = 76, normalized size = 1.73 \[ \frac{6 \, x^{2} - 2 \,{\left (x^{3} - 3 \, x^{2} + 4\right )} \log \left (x + 1\right ) + 2 \,{\left (x^{3} - 3 \, x^{2} + 4\right )} \log \left (x - 2\right ) - 15 \, x - 3}{54 \,{\left (x^{3} - 3 \, x^{2} + 4\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/54*(6*x^2 - 2*(x^3 - 3*x^2 + 4)*log(x + 1) + 2*(x^3 - 3*x^2 + 4)*log(x - 2) -
15*x - 3)/(x^3 - 3*x^2 + 4)

_______________________________________________________________________________________

Sympy [A]  time = 0.15745, size = 34, normalized size = 0.77 \[ \frac{2 x^{2} - 5 x - 1}{18 x^{3} - 54 x^{2} + 72} + \frac{\log{\left (x - 2 \right )}}{27} - \frac{\log{\left (x + 1 \right )}}{27} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

(2*x**2 - 5*x - 1)/(18*x**3 - 54*x**2 + 72) + log(x - 2)/27 - log(x + 1)/27

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.198398, size = 58, normalized size = 1.32 \[ \frac{1}{27 \,{\left (x + 1\right )}} - \frac{\frac{18}{x + 1} - 5}{162 \,{\left (\frac{3}{x + 1} - 1\right )}^{2}} + \frac{1}{27} \,{\rm ln}\left ({\left | -\frac{3}{x + 1} + 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/27/(x + 1) - 1/162*(18/(x + 1) - 5)/(3/(x + 1) - 1)^2 + 1/27*ln(abs(-3/(x + 1)
 + 1))