3.88 \(\int (-1+x) \left (-1+2 x+3 x^2\right )^2 \, dx\)

Optimal. Leaf size=39 \[ \frac{3 x^6}{2}+\frac{3 x^5}{5}-\frac{7 x^4}{2}-\frac{2 x^3}{3}+\frac{5 x^2}{2}-x \]

[Out]

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

_______________________________________________________________________________________

Rubi [A]  time = 0.0356807, antiderivative size = 39, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.062 \[ \frac{3 x^6}{2}+\frac{3 x^5}{5}-\frac{7 x^4}{2}-\frac{2 x^3}{3}+\frac{5 x^2}{2}-x \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \frac{3 x^{6}}{2} + \frac{3 x^{5}}{5} - \frac{7 x^{4}}{2} - \frac{2 x^{3}}{3} - x + 5 \int x\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

3*x**6/2 + 3*x**5/5 - 7*x**4/2 - 2*x**3/3 - x + 5*Integral(x, x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.00198229, size = 39, normalized size = 1. \[ \frac{3 x^6}{2}+\frac{3 x^5}{5}-\frac{7 x^4}{2}-\frac{2 x^3}{3}+\frac{5 x^2}{2}-x \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Maple [A]  time = 0.002, size = 30, normalized size = 0.8 \[ -x+{\frac{5\,{x}^{2}}{2}}-{\frac{2\,{x}^{3}}{3}}-{\frac{7\,{x}^{4}}{2}}+{\frac{3\,{x}^{5}}{5}}+{\frac{3\,{x}^{6}}{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-x+5/2*x^2-2/3*x^3-7/2*x^4+3/5*x^5+3/2*x^6

_______________________________________________________________________________________

Maxima [A]  time = 1.35283, size = 39, normalized size = 1. \[ \frac{3}{2} \, x^{6} + \frac{3}{5} \, x^{5} - \frac{7}{2} \, x^{4} - \frac{2}{3} \, x^{3} + \frac{5}{2} \, x^{2} - x \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

3/2*x^6 + 3/5*x^5 - 7/2*x^4 - 2/3*x^3 + 5/2*x^2 - x

_______________________________________________________________________________________

Fricas [A]  time = 0.177777, size = 1, normalized size = 0.03 \[ \frac{3}{2} x^{6} + \frac{3}{5} x^{5} - \frac{7}{2} x^{4} - \frac{2}{3} x^{3} + \frac{5}{2} x^{2} - x \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

3/2*x^6 + 3/5*x^5 - 7/2*x^4 - 2/3*x^3 + 5/2*x^2 - x

_______________________________________________________________________________________

Sympy [A]  time = 0.045511, size = 34, normalized size = 0.87 \[ \frac{3 x^{6}}{2} + \frac{3 x^{5}}{5} - \frac{7 x^{4}}{2} - \frac{2 x^{3}}{3} + \frac{5 x^{2}}{2} - x \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

3*x**6/2 + 3*x**5/5 - 7*x**4/2 - 2*x**3/3 + 5*x**2/2 - x

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.202635, size = 39, normalized size = 1. \[ \frac{3}{2} \, x^{6} + \frac{3}{5} \, x^{5} - \frac{7}{2} \, x^{4} - \frac{2}{3} \, x^{3} + \frac{5}{2} \, x^{2} - x \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

3/2*x^6 + 3/5*x^5 - 7/2*x^4 - 2/3*x^3 + 5/2*x^2 - x