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

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

[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} \[ \frac {x^4}{4}+\frac {2 x^3}{3}+\frac {x^2}{2} \]

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 \[ \frac {x^4}{4}+\frac {2 x^3}{3}+\frac {x^2}{2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.38, size = 16, normalized size = 0.73 \[ \frac {1}{4} x^{4} + \frac {2}{3} x^{3} + \frac {1}{2} x^{2} \]

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

________________________________________________________________________________________

giac [A]  time = 1.07, size = 16, normalized size = 0.73 \[ \frac {1}{4} \, x^{4} + \frac {2}{3} \, x^{3} + \frac {1}{2} \, x^{2} \]

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

________________________________________________________________________________________

maple [A]  time = 0.00, size = 17, normalized size = 0.77 \[ \frac {1}{4} x^{4}+\frac {2}{3} x^{3}+\frac {1}{2} x^{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 16, normalized size = 0.73 \[ \frac {1}{4} \, x^{4} + \frac {2}{3} \, x^{3} + \frac {1}{2} \, x^{2} \]

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

________________________________________________________________________________________

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

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

________________________________________________________________________________________

sympy [A]  time = 0.06, size = 15, normalized size = 0.68 \[ \frac {x^{4}}{4} + \frac {2 x^{3}}{3} + \frac {x^{2}}{2} \]

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

________________________________________________________________________________________