### 3.302 $$\int (-2 x+x^2+x^3) \, dx$$

Optimal. Leaf size=20 $\frac{x^4}{4}+\frac{x^3}{3}-x^2$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0024438, antiderivative size = 20, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 0, integrand size = 10, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0., Rules used = {} $\frac{x^4}{4}+\frac{x^3}{3}-x^2$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rubi steps

\begin{align*} \int \left (-2 x+x^2+x^3\right ) \, dx &=-x^2+\frac{x^3}{3}+\frac{x^4}{4}\\ \end{align*}

Mathematica [A]  time = 0.0000315, size = 20, normalized size = 1. $\frac{x^4}{4}+\frac{x^3}{3}-x^2$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0., size = 17, normalized size = 0.9 \begin{align*} -{x}^{2}+{\frac{{x}^{3}}{3}}+{\frac{{x}^{4}}{4}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.936531, size = 22, normalized size = 1.1 \begin{align*} \frac{1}{4} \, x^{4} + \frac{1}{3} \, x^{3} - x^{2} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.59752, size = 34, normalized size = 1.7 \begin{align*} \frac{1}{4} x^{4} + \frac{1}{3} x^{3} - x^{2} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.048737, size = 12, normalized size = 0.6 \begin{align*} \frac{x^{4}}{4} + \frac{x^{3}}{3} - x^{2} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.04368, size = 22, normalized size = 1.1 \begin{align*} \frac{1}{4} \, x^{4} + \frac{1}{3} \, x^{3} - x^{2} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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