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

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

________________________________________________________________________________________

Rubi [B]  time = 0.14, antiderivative size = 50, normalized size of antiderivative = 2.63, number of steps used = 4, number of rules used = 4, integrand size = 47, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.085, Rules used = {6, 12, 1594, 2288} \begin {gather*} \frac {e^{\frac {1}{2} \left (2 x^2-2 e^e x-x\right )} x \left (\left (1+2 e^e\right ) x-4 x^2\right )}{-4 x+2 e^e+1} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 12

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

Rule 1594

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

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} &=\int \frac {1}{2} e^{\frac {1}{2} \left (-x-2 e^e x+2 x^2\right )} \left (4 x+\left (-1-2 e^e\right ) x^2+4 x^3\right ) \, dx\\ &=\frac {1}{2} \int e^{\frac {1}{2} \left (-x-2 e^e x+2 x^2\right )} \left (4 x+\left (-1-2 e^e\right ) x^2+4 x^3\right ) \, dx\\ &=\frac {1}{2} \int e^{\frac {1}{2} \left (-x-2 e^e x+2 x^2\right )} x \left (4+\left (-1-2 e^e\right ) x+4 x^2\right ) \, dx\\ &=\frac {e^{\frac {1}{2} \left (-x-2 e^e x+2 x^2\right )} x \left (\left (1+2 e^e\right ) x-4 x^2\right )}{1+2 e^e-4 x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 21, normalized size = 1.11 \begin {gather*} e^{-\frac {x}{2}-e^e x+x^2} x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 1.86, size = 18, normalized size = 0.95 \begin {gather*} x^{2} e^{\left (x^{2} - x e^{e} - \frac {1}{2} \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [C]  time = 0.18, size = 187, normalized size = 9.84 \begin {gather*} -\frac {1}{32} i \, \sqrt {\pi } {\left (4 \, e^{\left (2 \, e\right )} + 4 \, e^{e} - 7\right )} \operatorname {erf}\left (-i \, x + \frac {1}{2} i \, e^{e} + \frac {1}{4} i\right ) e^{\left (e - \frac {1}{4} \, e^{\left (2 \, e\right )} - \frac {1}{4} \, e^{e} - \frac {1}{16}\right )} + \frac {1}{32} i \, \sqrt {\pi } {\left (4 \, e^{\left (3 \, e\right )} + 4 \, e^{\left (2 \, e\right )} - 7 \, e^{e}\right )} \operatorname {erf}\left (-i \, x + \frac {1}{2} i \, e^{e} + \frac {1}{4} i\right ) e^{\left (-\frac {1}{4} \, e^{\left (2 \, e\right )} - \frac {1}{4} \, e^{e} - \frac {1}{16}\right )} - \frac {1}{8} \, {\left (4 \, x + 2 \, e^{e} + 1\right )} e^{\left (x^{2} - x e^{e} - \frac {1}{2} \, x + e\right )} + \frac {1}{16} \, {\left ({\left (4 \, x - 2 \, e^{e} - 1\right )}^{2} + 6 \, {\left (4 \, x - 2 \, e^{e} - 1\right )} e^{e} + 8 \, x + 12 \, e^{\left (2 \, e\right )} + 4 \, e^{e} - 1\right )} e^{\left (x^{2} - x e^{e} - \frac {1}{2} \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/32*I*sqrt(pi)*(4*e^(2*e) + 4*e^e - 7)*erf(-I*x + 1/2*I*e^e + 1/4*I)*e^(e - 1/4*e^(2*e) - 1/4*e^e - 1/16) +
1/32*I*sqrt(pi)*(4*e^(3*e) + 4*e^(2*e) - 7*e^e)*erf(-I*x + 1/2*I*e^e + 1/4*I)*e^(-1/4*e^(2*e) - 1/4*e^e - 1/16
) - 1/8*(4*x + 2*e^e + 1)*e^(x^2 - x*e^e - 1/2*x + e) + 1/16*((4*x - 2*e^e - 1)^2 + 6*(4*x - 2*e^e - 1)*e^e +
8*x + 12*e^(2*e) + 4*e^e - 1)*e^(x^2 - x*e^e - 1/2*x)

________________________________________________________________________________________

maple [A]  time = 0.06, size = 19, normalized size = 1.00




method result size



risch \(x^{2} {\mathrm e}^{\frac {x \left (-2 \,{\mathrm e}^{{\mathrm e}}+2 x -1\right )}{2}}\) \(19\)
gosper \(x^{2} {\mathrm e}^{-x \,{\mathrm e}^{{\mathrm e}}+x^{2}-\frac {x}{2}}\) \(22\)
norman \(x^{2} {\mathrm e}^{-x \,{\mathrm e}^{{\mathrm e}}+x^{2}-\frac {x}{2}}\) \(22\)
default \(-\frac {x \,{\mathrm e}^{x^{2}+\left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right ) x}}{4}+\frac {\left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right ) \left (\frac {{\mathrm e}^{x^{2}+\left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right ) x}}{2}+\frac {i \left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right ) \sqrt {\pi }\, {\mathrm e}^{-\frac {\left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right )^{2}}{4}} \erf \left (i x +\frac {i \left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right )}{2}\right )}{4}\right )}{4}-\frac {i \sqrt {\pi }\, {\mathrm e}^{-\frac {\left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right )^{2}}{4}} \erf \left (i x +\frac {i \left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right )}{2}\right )}{8}+x^{2} {\mathrm e}^{x^{2}+\left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right ) x}-\left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right ) \left (\frac {x \,{\mathrm e}^{x^{2}+\left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right ) x}}{2}-\frac {\left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right ) \left (\frac {{\mathrm e}^{x^{2}+\left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right ) x}}{2}+\frac {i \left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right ) \sqrt {\pi }\, {\mathrm e}^{-\frac {\left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right )^{2}}{4}} \erf \left (i x +\frac {i \left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right )}{2}\right )}{4}\right )}{2}+\frac {i \sqrt {\pi }\, {\mathrm e}^{-\frac {\left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right )^{2}}{4}} \erf \left (i x +\frac {i \left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right )}{2}\right )}{4}\right )-\frac {x \,{\mathrm e}^{x^{2}+\left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right ) x +{\mathrm e}}}{2}+\frac {\left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right ) \left (\frac {{\mathrm e}^{x^{2}+\left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right ) x +{\mathrm e}}}{2}+\frac {i \left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right ) \sqrt {\pi }\, {\mathrm e}^{{\mathrm e}-\frac {\left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right )^{2}}{4}} \erf \left (i x +\frac {i \left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right )}{2}\right )}{4}\right )}{2}-\frac {i \sqrt {\pi }\, {\mathrm e}^{{\mathrm e}-\frac {\left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right )^{2}}{4}} \erf \left (i x +\frac {i \left (-{\mathrm e}^{{\mathrm e}}-\frac {1}{2}\right )}{2}\right )}{4}\) \(394\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.48, size = 556, normalized size = 29.26 \begin {gather*} \frac {1}{64} \, {\left (\frac {\sqrt {\pi } {\left (4 \, x - 2 \, e^{e} - 1\right )} {\left (\operatorname {erf}\left (\frac {1}{4} \, \sqrt {-{\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}}\right ) - 1\right )} {\left (2 \, e^{e} + 1\right )}^{3}}{\sqrt {-{\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}}} - \frac {48 \, {\left (4 \, x - 2 \, e^{e} - 1\right )}^{3} {\left (2 \, e^{e} + 1\right )} \Gamma \left (\frac {3}{2}, -\frac {1}{16} \, {\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}\right )}{\left (-{\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}\right )^{\frac {3}{2}}} + 12 \, {\left (2 \, e^{e} + 1\right )}^{2} e^{\left (\frac {1}{16} \, {\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}\right )} - 64 \, \Gamma \left (2, -\frac {1}{16} \, {\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}\right )\right )} e^{\left (-\frac {1}{16} \, {\left (2 \, e^{e} + 1\right )}^{2}\right )} - \frac {1}{64} \, {\left (\frac {\sqrt {\pi } {\left (4 \, x - 2 \, e^{e} - 1\right )} {\left (\operatorname {erf}\left (\frac {1}{4} \, \sqrt {-{\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}}\right ) - 1\right )} {\left (2 \, e^{e} + 1\right )}^{2}}{\sqrt {-{\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}}} - \frac {16 \, {\left (4 \, x - 2 \, e^{e} - 1\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {1}{16} \, {\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}\right )}{\left (-{\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}\right )^{\frac {3}{2}}} + 8 \, {\left (2 \, e^{e} + 1\right )} e^{\left (\frac {1}{16} \, {\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}\right )}\right )} e^{\left (-\frac {1}{16} \, {\left (2 \, e^{e} + 1\right )}^{2}\right )} + \frac {1}{4} \, {\left (\frac {\sqrt {\pi } {\left (4 \, x - 2 \, e^{e} - 1\right )} {\left (\operatorname {erf}\left (\frac {1}{4} \, \sqrt {-{\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}}\right ) - 1\right )} {\left (2 \, e^{e} + 1\right )}}{\sqrt {-{\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}}} + 4 \, e^{\left (\frac {1}{16} \, {\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}\right )}\right )} e^{\left (-\frac {1}{16} \, {\left (2 \, e^{e} + 1\right )}^{2}\right )} - \frac {1}{32} \, {\left (\frac {\sqrt {\pi } {\left (4 \, x - 2 \, e^{e} - 1\right )} {\left (\operatorname {erf}\left (\frac {1}{4} \, \sqrt {-{\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}}\right ) - 1\right )} {\left (2 \, e^{e} + 1\right )}^{2}}{\sqrt {-{\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}}} - \frac {16 \, {\left (4 \, x - 2 \, e^{e} - 1\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {1}{16} \, {\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}\right )}{\left (-{\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}\right )^{\frac {3}{2}}} + 8 \, {\left (2 \, e^{e} + 1\right )} e^{\left (\frac {1}{16} \, {\left (4 \, x - 2 \, e^{e} - 1\right )}^{2}\right )}\right )} e^{\left (-\frac {1}{16} \, {\left (2 \, e^{e} + 1\right )}^{2} + e\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/64*(sqrt(pi)*(4*x - 2*e^e - 1)*(erf(1/4*sqrt(-(4*x - 2*e^e - 1)^2)) - 1)*(2*e^e + 1)^3/sqrt(-(4*x - 2*e^e -
1)^2) - 48*(4*x - 2*e^e - 1)^3*(2*e^e + 1)*gamma(3/2, -1/16*(4*x - 2*e^e - 1)^2)/(-(4*x - 2*e^e - 1)^2)^(3/2)
+ 12*(2*e^e + 1)^2*e^(1/16*(4*x - 2*e^e - 1)^2) - 64*gamma(2, -1/16*(4*x - 2*e^e - 1)^2))*e^(-1/16*(2*e^e + 1)
^2) - 1/64*(sqrt(pi)*(4*x - 2*e^e - 1)*(erf(1/4*sqrt(-(4*x - 2*e^e - 1)^2)) - 1)*(2*e^e + 1)^2/sqrt(-(4*x - 2*
e^e - 1)^2) - 16*(4*x - 2*e^e - 1)^3*gamma(3/2, -1/16*(4*x - 2*e^e - 1)^2)/(-(4*x - 2*e^e - 1)^2)^(3/2) + 8*(2
*e^e + 1)*e^(1/16*(4*x - 2*e^e - 1)^2))*e^(-1/16*(2*e^e + 1)^2) + 1/4*(sqrt(pi)*(4*x - 2*e^e - 1)*(erf(1/4*sqr
t(-(4*x - 2*e^e - 1)^2)) - 1)*(2*e^e + 1)/sqrt(-(4*x - 2*e^e - 1)^2) + 4*e^(1/16*(4*x - 2*e^e - 1)^2))*e^(-1/1
6*(2*e^e + 1)^2) - 1/32*(sqrt(pi)*(4*x - 2*e^e - 1)*(erf(1/4*sqrt(-(4*x - 2*e^e - 1)^2)) - 1)*(2*e^e + 1)^2/sq
rt(-(4*x - 2*e^e - 1)^2) - 16*(4*x - 2*e^e - 1)^3*gamma(3/2, -1/16*(4*x - 2*e^e - 1)^2)/(-(4*x - 2*e^e - 1)^2)
^(3/2) + 8*(2*e^e + 1)*e^(1/16*(4*x - 2*e^e - 1)^2))*e^(-1/16*(2*e^e + 1)^2 + e)

________________________________________________________________________________________

mupad [B]  time = 5.58, size = 19, normalized size = 1.00 \begin {gather*} x^2\,{\mathrm {e}}^{-x\,{\mathrm {e}}^{\mathrm {e}}}\,{\mathrm {e}}^{-\frac {x}{2}}\,{\mathrm {e}}^{x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2*exp(-x*exp(exp(1)))*exp(-x/2)*exp(x^2)

________________________________________________________________________________________

sympy [A]  time = 0.16, size = 17, normalized size = 0.89 \begin {gather*} x^{2} e^{x^{2} - x e^{e} - \frac {x}{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**2*exp(x**2 - x*exp(E) - x/2)

________________________________________________________________________________________