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) \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, 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, Rules used = {44} \[ -\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

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rubi steps

\begin {align*} \int \frac {1}{(-2+x)^3 (1+x)^2} \, dx &=\int \left (\frac {1}{9 (-2+x)^3}-\frac {2}{27 (-2+x)^2}+\frac {1}{27 (-2+x)}-\frac {1}{27 (1+x)^2}-\frac {1}{27 (1+x)}\right ) \, dx\\ &=-\frac {1}{18 (2-x)^2}-\frac {2}{27 (2-x)}+\frac {1}{27 (1+x)}+\frac {1}{27} \log (2-x)-\frac {1}{27} \log (1+x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, 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

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.03, size = 41, normalized size = 0.93 \[ \frac {2 x^2-5 x-1}{18 (x-2)^2 (x+1)}+\frac {1}{27} \log (x-2)-\frac {1}{27} \log (x+1) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 1.32, size = 56, normalized size = 1.27 \[ \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/(-2+x)^3/(1+x)^2,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)

________________________________________________________________________________________

giac [A]  time = 0.79, size = 43, normalized size = 0.98 \[ \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} \, \log \left ({\left | -\frac {3}{x + 1} + 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.28, size = 35, normalized size = 0.80




method result size



default \(-\frac {1}{18 \left (-2+x \right )^{2}}+\frac {2}{27 \left (-2+x \right )}+\frac {1}{27+27 x}+\frac {\ln \left (-2+x \right )}{27}-\frac {\ln \left (1+x \right )}{27}\) \(35\)
norman \(\frac {\frac {1}{9} x^{2}-\frac {5}{18} x -\frac {1}{18}}{\left (-2+x \right )^{2} \left (1+x \right )}+\frac {\ln \left (-2+x \right )}{27}-\frac {\ln \left (1+x \right )}{27}\) \(35\)
risch \(\frac {\frac {1}{9} x^{2}-\frac {5}{18} x -\frac {1}{18}}{\left (-2+x \right )^{2} \left (1+x \right )}+\frac {\ln \left (-2+x \right )}{27}-\frac {\ln \left (1+x \right )}{27}\) \(35\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(-2+x)^3/(1+x)^2,x,method=_RETURNVERBOSE)

[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 = 0.46, size = 37, normalized size = 0.84 \[ \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/(-2+x)^3/(1+x)^2,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)

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 33, normalized size = 0.75 \[ -\frac {2\,\mathrm {atanh}\left (\frac {2\,x}{3}-\frac {1}{3}\right )}{27}-\frac {-\frac {x^2}{9}+\frac {5\,x}{18}+\frac {1}{18}}{x^3-3\,x^2+4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/((x + 1)^2*(x - 2)^3),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.15, 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

________________________________________________________________________________________