3.59 \(\int e^{-x} (e^x+x) \, dx\)

Optimal. Leaf size=17 \[ -e^{-x} x+x-e^{-x} \]

[Out]

-1/exp(x)+x-x/exp(x)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {6742, 2176, 2194} \[ -e^{-x} x+x-e^{-x} \]

Antiderivative was successfully verified.

[In]

Int[(E^x + x)/E^x,x]

[Out]

-E^(-x) + x - x/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 6742

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

Rubi steps

\begin {align*} \int e^{-x} \left (e^x+x\right ) \, dx &=\int \left (1+e^{-x} x\right ) \, dx\\ &=x+\int e^{-x} x \, dx\\ &=x-e^{-x} x+\int e^{-x} \, dx\\ &=-e^{-x}+x-e^{-x} x\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 13, normalized size = 0.76 \[ e^{-x} (-x-1)+x \]

Antiderivative was successfully verified.

[In]

Integrate[(E^x + x)/E^x,x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 14, normalized size = 0.82 \[ {\left (x e^{x} - x - 1\right )} e^{\left (-x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x+exp(x))/exp(x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.99, size = 11, normalized size = 0.65 \[ -{\left (x + 1\right )} e^{\left (-x\right )} + x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x+exp(x))/exp(x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.00, size = 16, normalized size = 0.94 \[ -x \,{\mathrm e}^{-x}+x -{\mathrm e}^{-x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x+exp(x))/exp(x),x)

[Out]

-1/exp(x)+x-x/exp(x)

________________________________________________________________________________________

maxima [A]  time = 0.56, size = 11, normalized size = 0.65 \[ -{\left (x + 1\right )} e^{\left (-x\right )} + x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x+exp(x))/exp(x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.06, size = 15, normalized size = 0.88 \[ x-{\mathrm {e}}^{-x}-x\,{\mathrm {e}}^{-x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.08, size = 8, normalized size = 0.47 \[ x + \left (- x - 1\right ) e^{- x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x+exp(x))/exp(x),x)

[Out]

x + (-x - 1)*exp(-x)

________________________________________________________________________________________