3.63.79 \(\int (-58 x+3 x^2+e^x (2 x+x^2)) \, dx\)

Optimal. Leaf size=10 \[ x^2 \left (-29+e^x+x\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 16, normalized size of antiderivative = 1.60, number of steps used = 9, number of rules used = 4, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {1593, 2196, 2176, 2194} \begin {gather*} x^3+e^x x^2-29 x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[-58*x + 3*x^2 + E^x*(2*x + x^2),x]

[Out]

-29*x^2 + E^x*x^2 + x^3

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !$UseGamma === True

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2196

Int[(F_)^((c_.)*(v_))*(u_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), u, x], x] /; FreeQ[{F, c
}, x] && PolynomialQ[u, x] && LinearQ[v, x] &&  !$UseGamma === True

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=-29 x^2+x^3+\int e^x \left (2 x+x^2\right ) \, dx\\ &=-29 x^2+x^3+\int e^x x (2+x) \, dx\\ &=-29 x^2+x^3+\int \left (2 e^x x+e^x x^2\right ) \, dx\\ &=-29 x^2+x^3+2 \int e^x x \, dx+\int e^x x^2 \, dx\\ &=2 e^x x-29 x^2+e^x x^2+x^3-2 \int e^x \, dx-2 \int e^x x \, dx\\ &=-2 e^x-29 x^2+e^x x^2+x^3+2 \int e^x \, dx\\ &=-29 x^2+e^x x^2+x^3\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 10, normalized size = 1.00 \begin {gather*} x^2 \left (-29+e^x+x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[-58*x + 3*x^2 + E^x*(2*x + x^2),x]

[Out]

x^2*(-29 + E^x + x)

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 15, normalized size = 1.50 \begin {gather*} x^{3} + x^{2} e^{x} - 29 \, x^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^3 + x^2*e^x - 29*x^2

________________________________________________________________________________________

giac [A]  time = 0.16, size = 15, normalized size = 1.50 \begin {gather*} x^{3} + x^{2} e^{x} - 29 \, x^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^3 + x^2*e^x - 29*x^2

________________________________________________________________________________________

maple [A]  time = 0.03, size = 16, normalized size = 1.60




method result size



default \({\mathrm e}^{x} x^{2}-29 x^{2}+x^{3}\) \(16\)
norman \({\mathrm e}^{x} x^{2}-29 x^{2}+x^{3}\) \(16\)
risch \({\mathrm e}^{x} x^{2}-29 x^{2}+x^{3}\) \(16\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2+2*x)*exp(x)+3*x^2-58*x,x,method=_RETURNVERBOSE)

[Out]

exp(x)*x^2-29*x^2+x^3

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 15, normalized size = 1.50 \begin {gather*} x^{3} + x^{2} e^{x} - 29 \, x^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^3 + x^2*e^x - 29*x^2

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 9, normalized size = 0.90 \begin {gather*} x^2\,\left (x+{\mathrm {e}}^x-29\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2*(x + exp(x) - 29)

________________________________________________________________________________________

sympy [A]  time = 0.08, size = 14, normalized size = 1.40 \begin {gather*} x^{3} + x^{2} e^{x} - 29 x^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**3 + x**2*exp(x) - 29*x**2

________________________________________________________________________________________