3.48.91 \(\int (-1+e^x (-2+x)) \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 19, normalized size of antiderivative = 1.06, 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 = {2176, 2194} \begin {gather*} -e^x (2-x)-e^x-x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-E^x - E^x*(2 - x) - 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]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=-x+\int e^x (-2+x) \, dx\\ &=-e^x (2-x)-x-\int e^x \, dx\\ &=-e^x-e^x (2-x)-x\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 11, normalized size = 0.61 \begin {gather*} e^x (-3+x)-x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.86, size = 10, normalized size = 0.56 \begin {gather*} {\left (x - 3\right )} e^{x} - x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x - 3)*e^x - x

________________________________________________________________________________________

giac [A]  time = 0.16, size = 10, normalized size = 0.56 \begin {gather*} {\left (x - 3\right )} e^{x} - x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x - 3)*e^x - x

________________________________________________________________________________________

maple [A]  time = 0.01, size = 11, normalized size = 0.61




method result size



risch \(\left (x -3\right ) {\mathrm e}^{x}-x\) \(11\)
default \(-x +{\mathrm e}^{x} x -3 \,{\mathrm e}^{x}\) \(13\)
norman \(-x +{\mathrm e}^{x} x -3 \,{\mathrm e}^{x}\) \(13\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.37, size = 14, normalized size = 0.78 \begin {gather*} {\left (x - 1\right )} e^{x} - x - 2 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.46, size = 12, normalized size = 0.67 \begin {gather*} x\,{\mathrm {e}}^x-3\,{\mathrm {e}}^x-x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.08, size = 7, normalized size = 0.39 \begin {gather*} - x + \left (x - 3\right ) e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________