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

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

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 45, normalized size of antiderivative = 1.73, number of steps used = 5, number of rules used = 4, integrand size = 49, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.082, Rules used = {12, 2244, 2236, 2288} \begin {gather*} \left (4-e^{\frac {1}{e^3}}\right ) e^{x^2+x-1}-\frac {e^{2 x^2+x-1} \left (4 x^2+x\right )}{4 x+1} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2236

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[(e*F^(a + b*x + c*x^2))/(
2*c*Log[F]), x] /; FreeQ[{F, a, b, c, d, e}, x] && EqQ[b*e - 2*c*d, 0]

Rule 2244

Int[(F_)^(v_)*(u_)^(m_.), x_Symbol] :> Int[ExpandToSum[u, x]^m*F^ExpandToSum[v, x], x] /; FreeQ[{F, m}, x] &&
LinearQ[u, x] && QuadraticQ[v, x] &&  !(LinearMatchQ[u, x] && QuadraticMatchQ[v, x])

Rule 2288

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = (v*y)/(Log[F]*D[u, x])}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.19, size = 24, normalized size = 0.92 \begin {gather*} -e^{-1+x+x^2} \left (-4+e^{\frac {1}{e^3}}+e^{x^2} x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.09, size = 36, normalized size = 1.38




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-4*x^2-x-1)*exp(x)*exp(x^2)^2+((-2*x-1)*exp(1/exp(3))+8*x+4)*exp(x)*exp(x^2))/exp(1),x,method=_RETURNVER
BOSE)

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.42, size = 153, normalized size = 5.88 \begin {gather*} \frac {1}{2} \, {\left (-4 i \, \sqrt {\pi } \operatorname {erf}\left (i \, x + \frac {1}{2} i\right ) e^{\left (-\frac {1}{4}\right )} + i \, \sqrt {\pi } \operatorname {erf}\left (i \, x + \frac {1}{2} i\right ) e^{\left (e^{\left (-3\right )} - \frac {1}{4}\right )} - 4 \, {\left (\frac {\sqrt {\pi } {\left (2 \, x + 1\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x + 1\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x + 1\right )}^{2}}} - 2 \, e^{\left (\frac {1}{4} \, {\left (2 \, x + 1\right )}^{2}\right )}\right )} e^{\left (-\frac {1}{4}\right )} - 2 \, x e^{\left (2 \, x^{2} + x\right )} + {\left (\frac {\sqrt {\pi } {\left (2 \, x + 1\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x + 1\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x + 1\right )}^{2}}} - 2 \, e^{\left (\frac {1}{4} \, {\left (2 \, x + 1\right )}^{2}\right )}\right )} e^{\left (e^{\left (-3\right )} - \frac {1}{4}\right )}\right )} e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(-4*I*sqrt(pi)*erf(I*x + 1/2*I)*e^(-1/4) + I*sqrt(pi)*erf(I*x + 1/2*I)*e^(e^(-3) - 1/4) - 4*(sqrt(pi)*(2*x
 + 1)*(erf(1/2*sqrt(-(2*x + 1)^2)) - 1)/sqrt(-(2*x + 1)^2) - 2*e^(1/4*(2*x + 1)^2))*e^(-1/4) - 2*x*e^(2*x^2 +
x) + (sqrt(pi)*(2*x + 1)*(erf(1/2*sqrt(-(2*x + 1)^2)) - 1)/sqrt(-(2*x + 1)^2) - 2*e^(1/4*(2*x + 1)^2))*e^(e^(-
3) - 1/4))*e^(-1)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________