\(\int e^x (-2-x) \, dx\) [7408]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 9, antiderivative size = 20 \[ \int e^x (-2-x) \, dx=-10-\frac {e^2}{5}+x-\left (1+e^x\right ) (1+x) \]

[Out]

x-10-(exp(x)+1)*(1+x)-1/5*exp(2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.60, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2207, 2225} \[ \int e^x (-2-x) \, dx=e^x-e^x (x+2) \]

[In]

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

[Out]

E^x - E^x*(2 + 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*} \text {integral}& = -e^x (2+x)+\int e^x \, dx \\ & = e^x-e^x (2+x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.40 \[ \int e^x (-2-x) \, dx=-e^x (1+x) \]

[In]

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

[Out]

-(E^x*(1 + x))

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.40

method result size
gosper \(-\left (1+x \right ) {\mathrm e}^{x}\) \(8\)
risch \(\left (-1-x \right ) {\mathrm e}^{x}\) \(9\)
default \(-{\mathrm e}^{x} x -{\mathrm e}^{x}\) \(11\)
norman \(-{\mathrm e}^{x} x -{\mathrm e}^{x}\) \(11\)
parallelrisch \(-{\mathrm e}^{x} x -{\mathrm e}^{x}\) \(11\)
parts \(-{\mathrm e}^{x} x -{\mathrm e}^{x}\) \(11\)
meijerg \(1-2 \,{\mathrm e}^{x}+\frac {\left (2-2 x \right ) {\mathrm e}^{x}}{2}\) \(16\)

[In]

int((-2-x)*exp(x),x,method=_RETURNVERBOSE)

[Out]

-(1+x)*exp(x)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.35 \[ \int e^x (-2-x) \, dx=-{\left (x + 1\right )} e^{x} \]

[In]

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

[Out]

-(x + 1)*e^x

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.35 \[ \int e^x (-2-x) \, dx=\left (- x - 1\right ) e^{x} \]

[In]

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

[Out]

(-x - 1)*exp(x)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.60 \[ \int e^x (-2-x) \, dx=-{\left (x - 1\right )} e^{x} - 2 \, e^{x} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.52 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.35 \[ \int e^x (-2-x) \, dx=-{\left (x + 1\right )} e^{x} \]

[In]

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

[Out]

-(x + 1)*e^x

Mupad [B] (verification not implemented)

Time = 11.34 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.35 \[ \int e^x (-2-x) \, dx=-{\mathrm {e}}^x\,\left (x+1\right ) \]

[In]

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

[Out]

-exp(x)*(x + 1)