\(\int (-4+4 x+x^2) (5-12 x+6 x^2+x^3) \, dx\) [219]

   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 = 22, antiderivative size = 19 \[ \int \left (-4+4 x+x^2\right ) \left (5-12 x+6 x^2+x^3\right ) \, dx=\frac {1}{6} \left (5-12 x+6 x^2+x^3\right )^2 \]

[Out]

1/6*(x^3+6*x^2-12*x+5)^2

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.045, Rules used = {1602} \[ \int \left (-4+4 x+x^2\right ) \left (5-12 x+6 x^2+x^3\right ) \, dx=\frac {1}{6} \left (x^3+6 x^2-12 x+5\right )^2 \]

[In]

Int[(-4 + 4*x + x^2)*(5 - 12*x + 6*x^2 + x^3),x]

[Out]

(5 - 12*x + 6*x^2 + x^3)^2/6

Rule 1602

Int[(Pp_)*(Qq_)^(m_.), x_Symbol] :> With[{p = Expon[Pp, x], q = Expon[Qq, x]}, Simp[Coeff[Pp, x, p]*x^(p - q +
 1)*(Qq^(m + 1)/((p + m*q + 1)*Coeff[Qq, x, q])), x] /; NeQ[p + m*q + 1, 0] && EqQ[(p + m*q + 1)*Coeff[Qq, x,
q]*Pp, Coeff[Pp, x, p]*x^(p - q)*((p - q + 1)*Qq + (m + 1)*x*D[Qq, x])]] /; FreeQ[m, x] && PolyQ[Pp, x] && Pol
yQ[Qq, x] && NeQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{6} \left (5-12 x+6 x^2+x^3\right )^2 \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.74 \[ \int \left (-4+4 x+x^2\right ) \left (5-12 x+6 x^2+x^3\right ) \, dx=-20 x+34 x^2-\frac {67 x^3}{3}+2 x^4+2 x^5+\frac {x^6}{6} \]

[In]

Integrate[(-4 + 4*x + x^2)*(5 - 12*x + 6*x^2 + x^3),x]

[Out]

-20*x + 34*x^2 - (67*x^3)/3 + 2*x^4 + 2*x^5 + x^6/6

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.95

method result size
default \(\frac {\left (x^{3}+6 x^{2}-12 x +5\right )^{2}}{6}\) \(18\)
gosper \(\frac {x \left (x^{5}+12 x^{4}+12 x^{3}-134 x^{2}+204 x -120\right )}{6}\) \(27\)
norman \(\frac {1}{6} x^{6}+2 x^{5}+2 x^{4}-\frac {67}{3} x^{3}+34 x^{2}-20 x\) \(30\)
parallelrisch \(\frac {1}{6} x^{6}+2 x^{5}+2 x^{4}-\frac {67}{3} x^{3}+34 x^{2}-20 x\) \(30\)
risch \(\frac {1}{6} x^{6}+2 x^{5}+2 x^{4}-\frac {67}{3} x^{3}+34 x^{2}-20 x +\frac {25}{6}\) \(31\)

[In]

int((x^2+4*x-4)*(x^3+6*x^2-12*x+5),x,method=_RETURNVERBOSE)

[Out]

1/6*(x^3+6*x^2-12*x+5)^2

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.53 \[ \int \left (-4+4 x+x^2\right ) \left (5-12 x+6 x^2+x^3\right ) \, dx=\frac {1}{6} \, x^{6} + 2 \, x^{5} + 2 \, x^{4} - \frac {67}{3} \, x^{3} + 34 \, x^{2} - 20 \, x \]

[In]

integrate((x^2+4*x-4)*(x^3+6*x^2-12*x+5),x, algorithm="fricas")

[Out]

1/6*x^6 + 2*x^5 + 2*x^4 - 67/3*x^3 + 34*x^2 - 20*x

Sympy [A] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.53 \[ \int \left (-4+4 x+x^2\right ) \left (5-12 x+6 x^2+x^3\right ) \, dx=\frac {x^{6}}{6} + 2 x^{5} + 2 x^{4} - \frac {67 x^{3}}{3} + 34 x^{2} - 20 x \]

[In]

integrate((x**2+4*x-4)*(x**3+6*x**2-12*x+5),x)

[Out]

x**6/6 + 2*x**5 + 2*x**4 - 67*x**3/3 + 34*x**2 - 20*x

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.89 \[ \int \left (-4+4 x+x^2\right ) \left (5-12 x+6 x^2+x^3\right ) \, dx=\frac {1}{6} \, {\left (x^{3} + 6 \, x^{2} - 12 \, x + 5\right )}^{2} \]

[In]

integrate((x^2+4*x-4)*(x^3+6*x^2-12*x+5),x, algorithm="maxima")

[Out]

1/6*(x^3 + 6*x^2 - 12*x + 5)^2

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.58 \[ \int \left (-4+4 x+x^2\right ) \left (5-12 x+6 x^2+x^3\right ) \, dx=\frac {5}{3} \, x^{3} + \frac {1}{6} \, {\left (x^{3} + 6 \, x^{2} - 12 \, x\right )}^{2} + 10 \, x^{2} - 20 \, x \]

[In]

integrate((x^2+4*x-4)*(x^3+6*x^2-12*x+5),x, algorithm="giac")

[Out]

5/3*x^3 + 1/6*(x^3 + 6*x^2 - 12*x)^2 + 10*x^2 - 20*x

Mupad [B] (verification not implemented)

Time = 0.01 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.53 \[ \int \left (-4+4 x+x^2\right ) \left (5-12 x+6 x^2+x^3\right ) \, dx=\frac {x^6}{6}+2\,x^5+2\,x^4-\frac {67\,x^3}{3}+34\,x^2-20\,x \]

[In]

int((4*x + x^2 - 4)*(6*x^2 - 12*x + x^3 + 5),x)

[Out]

34*x^2 - 20*x - (67*x^3)/3 + 2*x^4 + 2*x^5 + x^6/6