3.28.88 \(\int (-6+e^{7-x} (1-x)+4 x+2 e^3 x) \, dx\)

Optimal. Leaf size=28 \[ 5+e^5-2 x+x \left (-4+2 x+e^3 \left (e^{4-x}+x\right )\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 34, normalized size of antiderivative = 1.21, number of steps used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {6, 2176, 2194} \begin {gather*} \left (2+e^3\right ) x^2-6 x+e^{7-x}-e^{7-x} (1-x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[-6 + E^(7 - x)*(1 - x) + 4*x + 2*E^3*x,x]

[Out]

E^(7 - x) - E^(7 - x)*(1 - x) - 6*x + (2 + E^3)*x^2

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, 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} &=\int \left (-6+e^{7-x} (1-x)+\left (4+2 e^3\right ) x\right ) \, dx\\ &=-6 x+\left (2+e^3\right ) x^2+\int e^{7-x} (1-x) \, dx\\ &=-e^{7-x} (1-x)-6 x+\left (2+e^3\right ) x^2-\int e^{7-x} \, dx\\ &=e^{7-x}-e^{7-x} (1-x)-6 x+\left (2+e^3\right ) x^2\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 25, normalized size = 0.89 \begin {gather*} -6 x+e^{7-x} x+2 x^2+e^3 x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[-6 + E^(7 - x)*(1 - x) + 4*x + 2*E^3*x,x]

[Out]

-6*x + E^(7 - x)*x + 2*x^2 + E^3*x^2

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 23, normalized size = 0.82 \begin {gather*} x^{2} e^{3} + 2 \, x^{2} + x e^{\left (-x + 7\right )} - 6 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x+1)*exp(3)*exp(-x+4)+2*x*exp(3)+4*x-6,x, algorithm="fricas")

[Out]

x^2*e^3 + 2*x^2 + x*e^(-x + 7) - 6*x

________________________________________________________________________________________

giac [A]  time = 0.45, size = 23, normalized size = 0.82 \begin {gather*} x^{2} e^{3} + 2 \, x^{2} + x e^{\left (-x + 7\right )} - 6 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x+1)*exp(3)*exp(-x+4)+2*x*exp(3)+4*x-6,x, algorithm="giac")

[Out]

x^2*e^3 + 2*x^2 + x*e^(-x + 7) - 6*x

________________________________________________________________________________________

maple [A]  time = 0.05, size = 23, normalized size = 0.82




method result size



norman \(\left (2+{\mathrm e}^{3}\right ) x^{2}+{\mathrm e}^{3} {\mathrm e}^{-x +4} x -6 x\) \(23\)
risch \(x \,{\mathrm e}^{-x +7}+x^{2} {\mathrm e}^{3}+2 x^{2}-6 x\) \(24\)
default \(-6 x +{\mathrm e}^{3} \left (-{\mathrm e}^{-x +4} \left (-x +4\right )+4 \,{\mathrm e}^{-x +4}\right )+2 x^{2}+x^{2} {\mathrm e}^{3}\) \(41\)
derivativedivides \(2 \left (-x +4\right )^{2}+10 x -40-2 \,{\mathrm e}^{3} \left (-\frac {\left (-x +4\right )^{2}}{2}-4 x +16\right )-{\mathrm e}^{3} \left ({\mathrm e}^{-x +4} \left (-x +4\right )-4 \,{\mathrm e}^{-x +4}\right )\) \(58\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1-x)*exp(3)*exp(-x+4)+2*x*exp(3)+4*x-6,x,method=_RETURNVERBOSE)

[Out]

(2+exp(3))*x^2+exp(3)*exp(-x+4)*x-6*x

________________________________________________________________________________________

maxima [A]  time = 0.70, size = 23, normalized size = 0.82 \begin {gather*} x^{2} e^{3} + 2 \, x^{2} + x e^{\left (-x + 7\right )} - 6 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x+1)*exp(3)*exp(-x+4)+2*x*exp(3)+4*x-6,x, algorithm="maxima")

[Out]

x^2*e^3 + 2*x^2 + x*e^(-x + 7) - 6*x

________________________________________________________________________________________

mupad [B]  time = 1.87, size = 20, normalized size = 0.71 \begin {gather*} x\,{\mathrm {e}}^{7-x}-6\,x+x^2\,\left ({\mathrm {e}}^3+2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(4*x + 2*x*exp(3) - exp(3)*exp(4 - x)*(x - 1) - 6,x)

[Out]

x*exp(7 - x) - 6*x + x^2*(exp(3) + 2)

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 20, normalized size = 0.71 \begin {gather*} x^{2} \left (2 + e^{3}\right ) + x e^{3} e^{4 - x} - 6 x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x+1)*exp(3)*exp(-x+4)+2*x*exp(3)+4*x-6,x)

[Out]

x**2*(2 + exp(3)) + x*exp(3)*exp(4 - x) - 6*x

________________________________________________________________________________________