\(\int \frac {x^2}{(-3+x) (2+x)^2} \, dx\) [189]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 28 \[ \int \frac {x^2}{(-3+x) (2+x)^2} \, dx=\frac {4}{5 (2+x)}+\frac {9}{25} \log (3-x)+\frac {16}{25} \log (2+x) \]

[Out]

4/5/(2+x)+9/25*ln(3-x)+16/25*ln(2+x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {90} \[ \int \frac {x^2}{(-3+x) (2+x)^2} \, dx=\frac {4}{5 (x+2)}+\frac {9}{25} \log (3-x)+\frac {16}{25} \log (x+2) \]

[In]

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

[Out]

4/(5*(2 + x)) + (9*Log[3 - x])/25 + (16*Log[2 + x])/25

Rule 90

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {9}{25 (-3+x)}-\frac {4}{5 (2+x)^2}+\frac {16}{25 (2+x)}\right ) \, dx \\ & = \frac {4}{5 (2+x)}+\frac {9}{25} \log (3-x)+\frac {16}{25} \log (2+x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.93 \[ \int \frac {x^2}{(-3+x) (2+x)^2} \, dx=\frac {4}{5 (2+x)}+\frac {9}{25} \log (-3+x)+\frac {16}{25} \log (2+x) \]

[In]

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

[Out]

4/(5*(2 + x)) + (9*Log[-3 + x])/25 + (16*Log[2 + x])/25

Maple [A] (verified)

Time = 0.16 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.75

method result size
default \(\frac {4}{5 \left (2+x \right )}+\frac {16 \ln \left (2+x \right )}{25}+\frac {9 \ln \left (-3+x \right )}{25}\) \(21\)
norman \(\frac {4}{5 \left (2+x \right )}+\frac {16 \ln \left (2+x \right )}{25}+\frac {9 \ln \left (-3+x \right )}{25}\) \(21\)
risch \(\frac {4}{5 \left (2+x \right )}+\frac {16 \ln \left (2+x \right )}{25}+\frac {9 \ln \left (-3+x \right )}{25}\) \(21\)
parallelrisch \(\frac {9 \ln \left (-3+x \right ) x +16 \ln \left (2+x \right ) x +20+18 \ln \left (-3+x \right )+32 \ln \left (2+x \right )}{50+25 x}\) \(36\)

[In]

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

[Out]

4/5/(2+x)+16/25*ln(2+x)+9/25*ln(-3+x)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.96 \[ \int \frac {x^2}{(-3+x) (2+x)^2} \, dx=\frac {16 \, {\left (x + 2\right )} \log \left (x + 2\right ) + 9 \, {\left (x + 2\right )} \log \left (x - 3\right ) + 20}{25 \, {\left (x + 2\right )}} \]

[In]

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

[Out]

1/25*(16*(x + 2)*log(x + 2) + 9*(x + 2)*log(x - 3) + 20)/(x + 2)

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.79 \[ \int \frac {x^2}{(-3+x) (2+x)^2} \, dx=\frac {9 \log {\left (x - 3 \right )}}{25} + \frac {16 \log {\left (x + 2 \right )}}{25} + \frac {4}{5 x + 10} \]

[In]

integrate(x**2/(-3+x)/(2+x)**2,x)

[Out]

9*log(x - 3)/25 + 16*log(x + 2)/25 + 4/(5*x + 10)

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.71 \[ \int \frac {x^2}{(-3+x) (2+x)^2} \, dx=\frac {4}{5 \, {\left (x + 2\right )}} + \frac {16}{25} \, \log \left (x + 2\right ) + \frac {9}{25} \, \log \left (x - 3\right ) \]

[In]

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

[Out]

4/5/(x + 2) + 16/25*log(x + 2) + 9/25*log(x - 3)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.93 \[ \int \frac {x^2}{(-3+x) (2+x)^2} \, dx=\frac {4}{5 \, {\left (x + 2\right )}} + \log \left ({\left | x + 2 \right |}\right ) + \frac {9}{25} \, \log \left ({\left | -\frac {5}{x + 2} + 1 \right |}\right ) \]

[In]

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

[Out]

4/5/(x + 2) + log(abs(x + 2)) + 9/25*log(abs(-5/(x + 2) + 1))

Mupad [B] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.79 \[ \int \frac {x^2}{(-3+x) (2+x)^2} \, dx=\frac {16\,\ln \left (x+2\right )}{25}+\frac {9\,\ln \left (x-3\right )}{25}+\frac {4}{5\,\left (x+2\right )} \]

[In]

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

[Out]

(16*log(x + 2))/25 + (9*log(x - 3))/25 + 4/(5*(x + 2))