3.49.77 \(\int e^{-x} (-18+x-x^2+e^5 (20-18 x-x^2)) \, dx\)

Optimal. Leaf size=22 \[ e^{-x} \left (-1+x^2+(20+x) \left (1+e^5 x\right )\right ) \]

________________________________________________________________________________________

Rubi [B]  time = 0.11, antiderivative size = 45, normalized size of antiderivative = 2.05, number of steps used = 16, number of rules used = 3, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {2196, 2194, 2176} \begin {gather*} e^{5-x} x^2+e^{-x} x^2+20 e^{5-x} x+e^{-x} x+19 e^{-x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-18 + x - x^2 + E^5*(20 - 18*x - x^2))/E^x,x]

[Out]

19/E^x + 20*E^(5 - x)*x + x/E^x + E^(5 - x)*x^2 + x^2/E^x

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} &=\int \left (-18 e^{-x}+e^{-x} x-e^{-x} x^2-e^{5-x} \left (-20+18 x+x^2\right )\right ) \, dx\\ &=-\left (18 \int e^{-x} \, dx\right )+\int e^{-x} x \, dx-\int e^{-x} x^2 \, dx-\int e^{5-x} \left (-20+18 x+x^2\right ) \, dx\\ &=18 e^{-x}-e^{-x} x+e^{-x} x^2-2 \int e^{-x} x \, dx+\int e^{-x} \, dx-\int \left (-20 e^{5-x}+18 e^{5-x} x+e^{5-x} x^2\right ) \, dx\\ &=17 e^{-x}+e^{-x} x+e^{-x} x^2-2 \int e^{-x} \, dx-18 \int e^{5-x} x \, dx+20 \int e^{5-x} \, dx-\int e^{5-x} x^2 \, dx\\ &=-20 e^{5-x}+19 e^{-x}+18 e^{5-x} x+e^{-x} x+e^{5-x} x^2+e^{-x} x^2-2 \int e^{5-x} x \, dx-18 \int e^{5-x} \, dx\\ &=-2 e^{5-x}+19 e^{-x}+20 e^{5-x} x+e^{-x} x+e^{5-x} x^2+e^{-x} x^2-2 \int e^{5-x} \, dx\\ &=19 e^{-x}+20 e^{5-x} x+e^{-x} x+e^{5-x} x^2+e^{-x} x^2\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 26, normalized size = 1.18 \begin {gather*} e^{-x} \left (19+\left (1+20 e^5\right ) x+\left (1+e^5\right ) x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-18 + x - x^2 + E^5*(20 - 18*x - x^2))/E^x,x]

[Out]

(19 + (1 + 20*E^5)*x + (1 + E^5)*x^2)/E^x

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 21, normalized size = 0.95 \begin {gather*} {\left (x^{2} + {\left (x^{2} + 20 \, x\right )} e^{5} + x + 19\right )} e^{\left (-x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x^2-18*x+20)*exp(5)-x^2+x-18)/exp(x),x, algorithm="fricas")

[Out]

(x^2 + (x^2 + 20*x)*e^5 + x + 19)*e^(-x)

________________________________________________________________________________________

giac [A]  time = 0.20, size = 26, normalized size = 1.18 \begin {gather*} {\left (x^{2} + x + 19\right )} e^{\left (-x\right )} + {\left (x^{2} + 20 \, x\right )} e^{\left (-x + 5\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x^2-18*x+20)*exp(5)-x^2+x-18)/exp(x),x, algorithm="giac")

[Out]

(x^2 + x + 19)*e^(-x) + (x^2 + 20*x)*e^(-x + 5)

________________________________________________________________________________________

maple [A]  time = 0.04, size = 23, normalized size = 1.05




method result size



gosper \(\left (x^{2} {\mathrm e}^{5}+20 x \,{\mathrm e}^{5}+x^{2}+x +19\right ) {\mathrm e}^{-x}\) \(23\)
risch \(\left (x^{2} {\mathrm e}^{5}+20 x \,{\mathrm e}^{5}+x^{2}+x +19\right ) {\mathrm e}^{-x}\) \(23\)
norman \(\left (19+\left ({\mathrm e}^{5}+1\right ) x^{2}+\left (20 \,{\mathrm e}^{5}+1\right ) x \right ) {\mathrm e}^{-x}\) \(24\)
meijerg \(\left (-{\mathrm e}^{5}-1\right ) \left (2-\frac {\left (3 x^{2}+6 x +6\right ) {\mathrm e}^{-x}}{3}\right )+\left (-18 \,{\mathrm e}^{5}+1\right ) \left (1-\frac {\left (2 x +2\right ) {\mathrm e}^{-x}}{2}\right )+20 \,{\mathrm e}^{5} \left (1-{\mathrm e}^{-x}\right )-18+18 \,{\mathrm e}^{-x}\) \(66\)
default \(x \,{\mathrm e}^{-x}+19 \,{\mathrm e}^{-x}+x^{2} {\mathrm e}^{-x}-20 \,{\mathrm e}^{5} {\mathrm e}^{-x}-18 \,{\mathrm e}^{5} \left (-x \,{\mathrm e}^{-x}-{\mathrm e}^{-x}\right )-{\mathrm e}^{5} \left (-x^{2} {\mathrm e}^{-x}-2 x \,{\mathrm e}^{-x}-2 \,{\mathrm e}^{-x}\right )\) \(75\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-x^2-18*x+20)*exp(5)-x^2+x-18)/exp(x),x,method=_RETURNVERBOSE)

[Out]

(x^2*exp(5)+20*x*exp(5)+x^2+x+19)/exp(x)

________________________________________________________________________________________

maxima [B]  time = 0.35, size = 71, normalized size = 3.23 \begin {gather*} {\left (x^{2} e^{5} + 2 \, x e^{5} + 2 \, e^{5}\right )} e^{\left (-x\right )} + {\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} + 18 \, {\left (x e^{5} + e^{5}\right )} e^{\left (-x\right )} - {\left (x + 1\right )} e^{\left (-x\right )} + 18 \, e^{\left (-x\right )} - 20 \, e^{\left (-x + 5\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x^2-18*x+20)*exp(5)-x^2+x-18)/exp(x),x, algorithm="maxima")

[Out]

(x^2*e^5 + 2*x*e^5 + 2*e^5)*e^(-x) + (x^2 + 2*x + 2)*e^(-x) + 18*(x*e^5 + e^5)*e^(-x) - (x + 1)*e^(-x) + 18*e^
(-x) - 20*e^(-x + 5)

________________________________________________________________________________________

mupad [B]  time = 3.47, size = 22, normalized size = 1.00 \begin {gather*} {\mathrm {e}}^{-x}\,\left (x+20\,x\,{\mathrm {e}}^5+x^2\,{\mathrm {e}}^5+x^2+19\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-exp(-x)*(exp(5)*(18*x + x^2 - 20) - x + x^2 + 18),x)

[Out]

exp(-x)*(x + 20*x*exp(5) + x^2*exp(5) + x^2 + 19)

________________________________________________________________________________________

sympy [A]  time = 0.16, size = 22, normalized size = 1.00 \begin {gather*} \left (x^{2} + x^{2} e^{5} + x + 20 x e^{5} + 19\right ) e^{- x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x**2-18*x+20)*exp(5)-x**2+x-18)/exp(x),x)

[Out]

(x**2 + x**2*exp(5) + x + 20*x*exp(5) + 19)*exp(-x)

________________________________________________________________________________________