\(\int (-2 x+x^2+x^3) \, dx\) [302]

   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 = 10, antiderivative size = 20 \[ \int \left (-2 x+x^2+x^3\right ) \, dx=-x^2+\frac {x^3}{3}+\frac {x^4}{4} \]

[Out]

-x^2+1/3*x^3+1/4*x^4

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \[ \int \left (-2 x+x^2+x^3\right ) \, dx=\frac {x^4}{4}+\frac {x^3}{3}-x^2 \]

[In]

Int[-2*x + x^2 + x^3,x]

[Out]

-x^2 + x^3/3 + x^4/4

Rubi steps \begin{align*} \text {integral}& = -x^2+\frac {x^3}{3}+\frac {x^4}{4} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \left (-2 x+x^2+x^3\right ) \, dx=-x^2+\frac {x^3}{3}+\frac {x^4}{4} \]

[In]

Integrate[-2*x + x^2 + x^3,x]

[Out]

-x^2 + x^3/3 + x^4/4

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.80

method result size
gosper \(\frac {x^{2} \left (3 x^{2}+4 x -12\right )}{12}\) \(16\)
default \(-x^{2}+\frac {1}{3} x^{3}+\frac {1}{4} x^{4}\) \(17\)
norman \(-x^{2}+\frac {1}{3} x^{3}+\frac {1}{4} x^{4}\) \(17\)
risch \(-x^{2}+\frac {1}{3} x^{3}+\frac {1}{4} x^{4}\) \(17\)
parallelrisch \(-x^{2}+\frac {1}{3} x^{3}+\frac {1}{4} x^{4}\) \(17\)
parts \(-x^{2}+\frac {1}{3} x^{3}+\frac {1}{4} x^{4}\) \(17\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.80 \[ \int \left (-2 x+x^2+x^3\right ) \, dx=\frac {1}{4} \, x^{4} + \frac {1}{3} \, x^{3} - x^{2} \]

[In]

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

[Out]

1/4*x^4 + 1/3*x^3 - x^2

Sympy [A] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.60 \[ \int \left (-2 x+x^2+x^3\right ) \, dx=\frac {x^{4}}{4} + \frac {x^{3}}{3} - x^{2} \]

[In]

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

[Out]

x**4/4 + x**3/3 - x**2

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.80 \[ \int \left (-2 x+x^2+x^3\right ) \, dx=\frac {1}{4} \, x^{4} + \frac {1}{3} \, x^{3} - x^{2} \]

[In]

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

[Out]

1/4*x^4 + 1/3*x^3 - x^2

Giac [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.80 \[ \int \left (-2 x+x^2+x^3\right ) \, dx=\frac {1}{4} \, x^{4} + \frac {1}{3} \, x^{3} - x^{2} \]

[In]

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

[Out]

1/4*x^4 + 1/3*x^3 - x^2

Mupad [B] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.75 \[ \int \left (-2 x+x^2+x^3\right ) \, dx=\frac {x^2\,\left (3\,x^2+4\,x-12\right )}{12} \]

[In]

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

[Out]

(x^2*(4*x + 3*x^2 - 12))/12