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

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

________________________________________________________________________________________

Rubi [B]  time = 0.07, antiderivative size = 50, normalized size of antiderivative = 2.17, number of steps used = 11, number of rules used = 4, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.108, Rules used = {2176, 2194, 1593, 2196} \begin {gather*} -x^3+2 e^x x^2+x^2-\left (4-e^3\right ) x+\frac {e^{2 x}}{2}-\frac {1}{2} e^{2 x} (2 x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^(2*x)/2 - (4 - E^3)*x + x^2 + 2*E^x*x^2 - x^3 - (E^(2*x)*(1 + 2*x))/2

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

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 2196

Int[(F_)^((c_.)*(v_))*(u_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), u, x], x] /; FreeQ[{F, c
}, x] && PolynomialQ[u, x] && LinearQ[v, x] &&  !$UseGamma === True

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=-\left (\left (4-e^3\right ) x\right )+x^2-x^3+\int e^{2 x} (-1-2 x) \, dx+\int e^x \left (4 x+2 x^2\right ) \, dx\\ &=-\left (\left (4-e^3\right ) x\right )+x^2-x^3-\frac {1}{2} e^{2 x} (1+2 x)+\int e^{2 x} \, dx+\int e^x x (4+2 x) \, dx\\ &=\frac {e^{2 x}}{2}-\left (4-e^3\right ) x+x^2-x^3-\frac {1}{2} e^{2 x} (1+2 x)+\int \left (4 e^x x+2 e^x x^2\right ) \, dx\\ &=\frac {e^{2 x}}{2}-\left (4-e^3\right ) x+x^2-x^3-\frac {1}{2} e^{2 x} (1+2 x)+2 \int e^x x^2 \, dx+4 \int e^x x \, dx\\ &=\frac {e^{2 x}}{2}+4 e^x x-\left (4-e^3\right ) x+x^2+2 e^x x^2-x^3-\frac {1}{2} e^{2 x} (1+2 x)-4 \int e^x \, dx-4 \int e^x x \, dx\\ &=-4 e^x+\frac {e^{2 x}}{2}-\left (4-e^3\right ) x+x^2+2 e^x x^2-x^3-\frac {1}{2} e^{2 x} (1+2 x)+4 \int e^x \, dx\\ &=\frac {e^{2 x}}{2}-\left (4-e^3\right ) x+x^2+2 e^x x^2-x^3-\frac {1}{2} e^{2 x} (1+2 x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 33, normalized size = 1.43 \begin {gather*} -4 x+e^3 x-e^{2 x} x+x^2+2 e^x x^2-x^3 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.80, size = 30, normalized size = 1.30 \begin {gather*} -x^{3} + 2 \, x^{2} e^{x} + x^{2} + x e^{3} - x e^{\left (2 \, x\right )} - 4 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x^3 + 2*x^2*e^x + x^2 + x*e^3 - x*e^(2*x) - 4*x

________________________________________________________________________________________

giac [A]  time = 0.22, size = 30, normalized size = 1.30 \begin {gather*} -x^{3} + 2 \, x^{2} e^{x} + x^{2} + x e^{3} - x e^{\left (2 \, x\right )} - 4 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x^3 + 2*x^2*e^x + x^2 + x*e^3 - x*e^(2*x) - 4*x

________________________________________________________________________________________

maple [A]  time = 0.04, size = 30, normalized size = 1.30




method result size



norman \(x^{2}+\left ({\mathrm e}^{3}-4\right ) x -x^{3}-x \,{\mathrm e}^{2 x}+2 \,{\mathrm e}^{x} x^{2}\) \(30\)
default \(-4 x -x \,{\mathrm e}^{2 x}+2 \,{\mathrm e}^{x} x^{2}+x^{2}-x^{3}+x \,{\mathrm e}^{3}\) \(31\)
risch \(-4 x -x \,{\mathrm e}^{2 x}+2 \,{\mathrm e}^{x} x^{2}+x^{2}-x^{3}+x \,{\mathrm e}^{3}\) \(31\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.38, size = 30, normalized size = 1.30 \begin {gather*} -x^{3} + 2 \, x^{2} e^{x} + x^{2} + x e^{3} - x e^{\left (2 \, x\right )} - 4 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x^3 + 2*x^2*e^x + x^2 + x*e^3 - x*e^(2*x) - 4*x

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 23, normalized size = 1.00 \begin {gather*} x\,\left (x-{\mathrm {e}}^{2\,x}+{\mathrm {e}}^3+2\,x\,{\mathrm {e}}^x-x^2-4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________