3.1.1 \(\int (1+x+x^2) \, dx\) [1]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 0, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \frac {x^3}{3}+\frac {x^2}{2}+x \end {gather*}

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.00, size = 16, normalized size = 1.00 \begin {gather*} x+\frac {x^2}{2}+\frac {x^3}{3} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Mathics [A]
time = 1.62, size = 12, normalized size = 0.75 \begin {gather*} x \left (1+\frac {x}{2}+\frac {x^2}{3}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

mathics('Integrate[1 + x + x^2,x]')

[Out]

x (1 + x / 2 + x ^ 2 / 3)

________________________________________________________________________________________

Maple [A]
time = 0.00, size = 13, normalized size = 0.81

method result size
gosper \(x +\frac {1}{2} x^{2}+\frac {1}{3} x^{3}\) \(13\)
default \(x +\frac {1}{2} x^{2}+\frac {1}{3} x^{3}\) \(13\)
norman \(x +\frac {1}{2} x^{2}+\frac {1}{3} x^{3}\) \(13\)
risch \(x +\frac {1}{2} x^{2}+\frac {1}{3} x^{3}\) \(13\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2+x+1,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 12, normalized size = 0.75 \begin {gather*} \frac {1}{3} \, x^{3} + \frac {1}{2} \, x^{2} + x \end {gather*}

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 = 0.31, size = 12, normalized size = 0.75 \begin {gather*} \frac {1}{3} \, x^{3} + \frac {1}{2} \, x^{2} + x \end {gather*}

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.02, size = 10, normalized size = 0.62 \begin {gather*} \frac {x^{3}}{3} + \frac {x^{2}}{2} + x \end {gather*}

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 = 0.00, size = 14, normalized size = 0.88 \begin {gather*} \frac {x^{3}}{3}+\frac {x^{2}}{2}+x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.02, size = 13, normalized size = 0.81 \begin {gather*} \frac {x\,\left (2\,x^2+3\,x+6\right )}{6} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x*(3*x + 2*x^2 + 6))/6

________________________________________________________________________________________