3.83.23 \(\int e^{2+x} (2 x+x^2) \, dx\) [8223]

Optimal. Leaf size=11 \[ 4+e^{2+x} x^2 \]

[Out]

x^2*exp(2)*exp(x)+4

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 9, normalized size of antiderivative = 0.82, number of steps used = 8, number of rules used = 4, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {1607, 2227, 2207, 2225} \begin {gather*} e^{x+2} x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^(2 + x)*x^2

Rule 1607

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 2207

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] &&  !TrueQ[$UseGamma]

Rule 2225

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 2227

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] &&  !TrueQ[$UseGamma]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 9, normalized size = 0.82 \begin {gather*} e^{2+x} x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^(2 + x)*x^2

________________________________________________________________________________________

Maple [A]
time = 0.25, size = 9, normalized size = 0.82

method result size
gosper \(x^{2} {\mathrm e}^{2+x}\) \(9\)
default \(x^{2} {\mathrm e}^{2} {\mathrm e}^{x}\) \(9\)
norman \(x^{2} {\mathrm e}^{2} {\mathrm e}^{x}\) \(9\)
risch \(x^{2} {\mathrm e}^{2+x}\) \(9\)
meijerg \(-{\mathrm e}^{2} \left (2-\frac {\left (3 x^{2}-6 x +6\right ) {\mathrm e}^{x}}{3}\right )+2 \,{\mathrm e}^{2} \left (1-\frac {\left (-2 x +2\right ) {\mathrm e}^{x}}{2}\right )\) \(37\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2*exp(2)*exp(x)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 33 vs. \(2 (10) = 20\).
time = 0.28, size = 33, normalized size = 3.00 \begin {gather*} {\left (x^{2} e^{2} - 2 \, x e^{2} + 2 \, e^{2}\right )} e^{x} + 2 \, {\left (x e^{2} - e^{2}\right )} e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^2*e^2 - 2*x*e^2 + 2*e^2)*e^x + 2*(x*e^2 - e^2)*e^x

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 8, normalized size = 0.73 \begin {gather*} x^{2} e^{\left (x + 2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2*e^(x + 2)

________________________________________________________________________________________

Sympy [A]
time = 0.03, size = 8, normalized size = 0.73 \begin {gather*} x^{2} e^{2} e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**2*exp(2)*exp(x)

________________________________________________________________________________________

Giac [A]
time = 0.40, size = 8, normalized size = 0.73 \begin {gather*} x^{2} e^{\left (x + 2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2*e^(x + 2)

________________________________________________________________________________________

Mupad [B]
time = 5.65, size = 8, normalized size = 0.73 \begin {gather*} x^2\,{\mathrm {e}}^2\,{\mathrm {e}}^x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2*exp(2)*exp(x)

________________________________________________________________________________________