3.1.39 \(\int e^{-x} x^2 \, dx\) [39]

Optimal. Leaf size=26 \[ -2 e^{-x}-2 e^{-x} x-e^{-x} x^2 \]

[Out]

-2/exp(x)-2*x/exp(x)-x^2/exp(x)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2207, 2225} \begin {gather*} -e^{-x} x^2-2 e^{-x} x-2 e^{-x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2/E^x,x]

[Out]

-2/E^x - (2*x)/E^x - x^2/E^x

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]

Rubi steps

\begin {align*} \int e^{-x} x^2 \, dx &=-e^{-x} x^2+2 \int e^{-x} x \, dx\\ &=-2 e^{-x} x-e^{-x} x^2+2 \int e^{-x} \, dx\\ &=-2 e^{-x}-2 e^{-x} x-e^{-x} x^2\\ \end {align*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Integrate[x^2/E^x,x]

[Out]

(-2 - 2*x - x^2)/E^x

________________________________________________________________________________________

Mathics [A]
time = 1.74, size = 16, normalized size = 0.62 \begin {gather*} \left (-2-2 x-x^2\right ) E^{-x} \end {gather*}

Antiderivative was successfully verified.

[In]

mathics('Integrate[x^2/E^x,x]')

[Out]

(-2 - 2 x - x ^ 2) E ^ (-x)

________________________________________________________________________________________

Maple [A]
time = 0.01, size = 24, normalized size = 0.92

method result size
gosper \(-\left (x^{2}+2 x +2\right ) {\mathrm e}^{-x}\) \(15\)
norman \(\left (-x^{2}-2 x -2\right ) {\mathrm e}^{-x}\) \(16\)
risch \(\left (-x^{2}-2 x -2\right ) {\mathrm e}^{-x}\) \(16\)
meijerg \(2-\frac {\left (3 x^{2}+6 x +6\right ) {\mathrm e}^{-x}}{3}\) \(19\)
default \(-2 \,{\mathrm e}^{-x}-2 x \,{\mathrm e}^{-x}-x^{2} {\mathrm e}^{-x}\) \(24\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/exp(x),x,method=_RETURNVERBOSE)

[Out]

-2/exp(x)-2*x/exp(x)-x^2/exp(x)

________________________________________________________________________________________

Maxima [A]
time = 0.25, size = 14, normalized size = 0.54 \begin {gather*} -{\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.31, size = 14, normalized size = 0.54 \begin {gather*} -{\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.04, size = 12, normalized size = 0.46 \begin {gather*} \left (- x^{2} - 2 x - 2\right ) e^{- x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.00, size = 14, normalized size = 0.54 \begin {gather*} \left (-x^{2}-2 x-2\right ) \mathrm {e}^{-x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/exp(x),x)

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.03, size = 14, normalized size = 0.54 \begin {gather*} -{\mathrm {e}}^{-x}\,\left (x^2+2\,x+2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________