3.1 \(\int (1+x+x^2) \, dx\)

Optimal. Leaf size=16 \[ \frac{x^3}{3}+\frac{x^2}{2}+x \]

[Out]

x + x^2/2 + x^3/3

________________________________________________________________________________________

Rubi [A]  time = 0.0018128, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 0, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0., Rules used = {} \[ \frac{x^3}{3}+\frac{x^2}{2}+x \]

Antiderivative was successfully verified.

[In]

Int[1 + x + x^2,x]

[Out]

x + x^2/2 + x^3/3

Rubi steps

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

Mathematica [A]  time = 0.0000346, size = 16, normalized size = 1. \[ \frac{x^3}{3}+\frac{x^2}{2}+x \]

Antiderivative was successfully verified.

[In]

Integrate[1 + x + x^2,x]

[Out]

x + x^2/2 + x^3/3

________________________________________________________________________________________

Maple [A]  time = 0.001, size = 13, normalized size = 0.8 \begin{align*} x+{\frac{{x}^{2}}{2}}+{\frac{{x}^{3}}{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2+x+1,x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.940587, size = 16, normalized size = 1. \begin{align*} \frac{1}{3} \, x^{3} + \frac{1}{2} \, x^{2} + x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2+x+1,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.57297, size = 31, normalized size = 1.94 \begin{align*} \frac{1}{3} x^{3} + \frac{1}{2} x^{2} + x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2+x+1,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.050605, size = 10, normalized size = 0.62 \begin{align*} \frac{x^{3}}{3} + \frac{x^{2}}{2} + x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2+x+1,x)

[Out]

x**3/3 + x**2/2 + x

________________________________________________________________________________________

Giac [A]  time = 1.09147, size = 16, normalized size = 1. \begin{align*} \frac{1}{3} \, x^{3} + \frac{1}{2} \, x^{2} + x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2+x+1,x, algorithm="giac")

[Out]

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