3.87.94 \(\int (2+e^x+e^{5+x} (-1-x)-2 x) \, dx\) [8694]

Optimal. Leaf size=20 \[ e^x+2 x-e^{5+x} x-x^2 \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 27, normalized size of antiderivative = 1.35, number of steps used = 4, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2225, 2207} \begin {gather*} -x^2+2 x+e^x+e^{x+5}-e^{x+5} (x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 20, normalized size = 1.00 \begin {gather*} e^x+2 x-e^{5+x} x-x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^x + 2*x - E^(5 + x)*x - x^2

________________________________________________________________________________________

Maple [A]
time = 0.26, size = 27, normalized size = 1.35

method result size
norman \(2 x -x^{2}-x \,{\mathrm e}^{5} {\mathrm e}^{x}+{\mathrm e}^{x}\) \(19\)
risch \(2 x -x^{2}+{\mathrm e}^{x}-x \,{\mathrm e}^{5+x}\) \(19\)
default \(2 x -{\mathrm e}^{5+x} \left (5+x \right )+5 \,{\mathrm e}^{5+x}-x^{2}+{\mathrm e}^{x}\) \(27\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 18, normalized size = 0.90 \begin {gather*} -x^{2} - x e^{\left (x + 5\right )} + 2 \, x + e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 26, normalized size = 1.30 \begin {gather*} -{\left ({\left (x^{2} - 2 \, x\right )} e^{5} + {\left (x e^{5} - 1\right )} e^{\left (x + 5\right )}\right )} e^{\left (-5\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.05, size = 15, normalized size = 0.75 \begin {gather*} - x^{2} + 2 x + \left (- x e^{5} + 1\right ) e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.39, size = 18, normalized size = 0.90 \begin {gather*} -x^{2} - x e^{\left (x + 5\right )} + 2 \, x + e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 5.41, size = 18, normalized size = 0.90 \begin {gather*} 2\,x+{\mathrm {e}}^x-x\,{\mathrm {e}}^{x+5}-x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________