3.103.51 \(\int e^{-x} (e^x+e^4 (2-8 x+3 x^2)) \, dx\)

Optimal. Leaf size=18 \[ 6+x-e^{4-x} x (-2+3 x) \]

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 24, normalized size of antiderivative = 1.33, number of steps used = 10, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {6742, 2196, 2194, 2176} \begin {gather*} -3 e^{4-x} x^2+2 e^{4-x} x+x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(E^x + E^4*(2 - 8*x + 3*x^2))/E^x,x]

[Out]

x + 2*E^(4 - x)*x - 3*E^(4 - x)*x^2

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

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 23, normalized size = 1.28 \begin {gather*} x+e^{-x} \left (2 e^4 x-3 e^4 x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(E^x + E^4*(2 - 8*x + 3*x^2))/E^x,x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.61, size = 24, normalized size = 1.33 \begin {gather*} -{\left ({\left (3 \, x^{2} - 2 \, x\right )} e^{4} - x e^{x}\right )} e^{\left (-x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-((3*x^2 - 2*x)*e^4 - x*e^x)*e^(-x)

________________________________________________________________________________________

giac [A]  time = 0.13, size = 19, normalized size = 1.06 \begin {gather*} -{\left (3 \, x^{2} - 2 \, x\right )} e^{\left (-x + 4\right )} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 21, normalized size = 1.17




method result size



risch \(x +\left (-3 x^{2} {\mathrm e}^{4}+2 x \,{\mathrm e}^{4}\right ) {\mathrm e}^{-x}\) \(21\)
norman \(\left ({\mathrm e}^{x} x +2 x \,{\mathrm e}^{4}-3 x^{2} {\mathrm e}^{4}\right ) {\mathrm e}^{-x}\) \(27\)
default \(x -2 \,{\mathrm e}^{-x} {\mathrm e}^{4}-8 \,{\mathrm e}^{4} \left (-x \,{\mathrm e}^{-x}-{\mathrm e}^{-x}\right )+3 \,{\mathrm e}^{4} \left (-x^{2} {\mathrm e}^{-x}-2 x \,{\mathrm e}^{-x}-2 \,{\mathrm e}^{-x}\right )\) \(62\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.36, size = 45, normalized size = 2.50 \begin {gather*} -3 \, {\left (x^{2} e^{4} + 2 \, x e^{4} + 2 \, e^{4}\right )} e^{\left (-x\right )} + 8 \, {\left (x e^{4} + e^{4}\right )} e^{\left (-x\right )} + x - 2 \, e^{\left (-x + 4\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-3*(x^2*e^4 + 2*x*e^4 + 2*e^4)*e^(-x) + 8*(x*e^4 + e^4)*e^(-x) + x - 2*e^(-x + 4)

________________________________________________________________________________________

mupad [B]  time = 0.07, size = 22, normalized size = 1.22 \begin {gather*} x+2\,x\,{\mathrm {e}}^{4-x}-3\,x^2\,{\mathrm {e}}^{4-x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 19, normalized size = 1.06 \begin {gather*} x + \left (- 3 x^{2} e^{4} + 2 x e^{4}\right ) e^{- x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((exp(x)+(3*x**2-8*x+2)*exp(2)**2)/exp(x),x)

[Out]

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

________________________________________________________________________________________