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

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

[Out]

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 22, normalized size = 1.00 \begin {gather*} \frac {x^2}{2}+\frac {2 x^3}{3}+\frac {x^4}{4} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 17, normalized size = 0.77

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 3.25, size = 16, normalized size = 0.73 \begin {gather*} \frac {1}{4} \, x^{4} + \frac {2}{3} \, x^{3} + \frac {1}{2} \, x^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.65, size = 16, normalized size = 0.73 \begin {gather*} \frac {1}{4} \, x^{4} + \frac {2}{3} \, x^{3} + \frac {1}{2} \, x^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.01, size = 15, normalized size = 0.68 \begin {gather*} \frac {x^{4}}{4} + \frac {2 x^{3}}{3} + \frac {x^{2}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.53, size = 16, normalized size = 0.73 \begin {gather*} \frac {1}{4} \, x^{4} + \frac {2}{3} \, x^{3} + \frac {1}{2} \, x^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.03, size = 15, normalized size = 0.68 \begin {gather*} \frac {x^2\,\left (3\,x^2+8\,x+6\right )}{12} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________