\(\int e^{-e^{2 x}-x^2} (1+2 x+e^{e^{2 x}+x^2} x-2 x^3+e^5 (1-2 x^2)+e^{2 x} (-2 e^5 x-2 x^2)+(1-2 e^{2 x} x-2 x^2) \log (4 x)) \, dx\) [822]

   Optimal result
   Rubi [F]
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 88, antiderivative size = 33 \[ \int e^{-e^{2 x}-x^2} \left (1+2 x+e^{e^{2 x}+x^2} x-2 x^3+e^5 \left (1-2 x^2\right )+e^{2 x} \left (-2 e^5 x-2 x^2\right )+\left (1-2 e^{2 x} x-2 x^2\right ) \log (4 x)\right ) \, dx=x \left (\frac {x}{2}+e^{-e^{2 x}-x^2} \left (e^5+x+\log (4 x)\right )\right ) \]

[Out]

(1/2*x+(x+ln(4*x)+exp(5))/exp(exp(x)^2+x^2))*x

Rubi [F]

\[ \int e^{-e^{2 x}-x^2} \left (1+2 x+e^{e^{2 x}+x^2} x-2 x^3+e^5 \left (1-2 x^2\right )+e^{2 x} \left (-2 e^5 x-2 x^2\right )+\left (1-2 e^{2 x} x-2 x^2\right ) \log (4 x)\right ) \, dx=\int e^{-e^{2 x}-x^2} \left (1+2 x+e^{e^{2 x}+x^2} x-2 x^3+e^5 \left (1-2 x^2\right )+e^{2 x} \left (-2 e^5 x-2 x^2\right )+\left (1-2 e^{2 x} x-2 x^2\right ) \log (4 x)\right ) \, dx \]

[In]

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

[Out]

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

Rubi steps \begin{align*} \text {integral}& = \int \left (e^{-e^{2 x}-x^2}+x+2 e^{-e^{2 x}-x^2} x-2 e^{-e^{2 x}-x^2} x^3-2 e^{-e^{2 x}+2 x-x^2} x \left (e^5+x\right )-e^{5-e^{2 x}-x^2} \left (-1+2 x^2\right )-e^{-e^{2 x}-x^2} \left (-1+2 e^{2 x} x+2 x^2\right ) \log (4 x)\right ) \, dx \\ & = \frac {x^2}{2}+2 \int e^{-e^{2 x}-x^2} x \, dx-2 \int e^{-e^{2 x}-x^2} x^3 \, dx-2 \int e^{-e^{2 x}+2 x-x^2} x \left (e^5+x\right ) \, dx+\int e^{-e^{2 x}-x^2} \, dx-\int e^{5-e^{2 x}-x^2} \left (-1+2 x^2\right ) \, dx-\int e^{-e^{2 x}-x^2} \left (-1+2 e^{2 x} x+2 x^2\right ) \log (4 x) \, dx \\ & = \frac {x^2}{2}+\frac {e^{-e^{2 x}-x^2} \left (e^{2 x} x+x^2\right ) \log (4 x)}{e^{2 x}+x}+2 \int e^{-e^{2 x}-x^2} x \, dx-2 \int e^{-e^{2 x}-x^2} x^3 \, dx-2 \int \left (e^{5-e^{2 x}+2 x-x^2} x+e^{-e^{2 x}+2 x-x^2} x^2\right ) \, dx-\int \left (-e^{5-e^{2 x}-x^2}+2 e^{5-e^{2 x}-x^2} x^2\right ) \, dx \\ & = \frac {x^2}{2}+\frac {e^{-e^{2 x}-x^2} \left (e^{2 x} x+x^2\right ) \log (4 x)}{e^{2 x}+x}+2 \int e^{-e^{2 x}-x^2} x \, dx-2 \int e^{5-e^{2 x}+2 x-x^2} x \, dx-2 \int e^{5-e^{2 x}-x^2} x^2 \, dx-2 \int e^{-e^{2 x}+2 x-x^2} x^2 \, dx-2 \int e^{-e^{2 x}-x^2} x^3 \, dx+\int e^{5-e^{2 x}-x^2} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.48 \[ \int e^{-e^{2 x}-x^2} \left (1+2 x+e^{e^{2 x}+x^2} x-2 x^3+e^5 \left (1-2 x^2\right )+e^{2 x} \left (-2 e^5 x-2 x^2\right )+\left (1-2 e^{2 x} x-2 x^2\right ) \log (4 x)\right ) \, dx=\frac {x^2}{2}+e^{-e^{2 x}} \left (e^{-x^2} \left (e^5 x+x^2\right )+e^{-x^2} x \log (4 x)\right ) \]

[In]

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

[Out]

x^2/2 + ((E^5*x + x^2)/E^x^2 + (x*Log[4*x])/E^x^2)/E^E^(2*x)

Maple [A] (verified)

Time = 0.46 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.06

method result size
risch \(\frac {x^{2}}{2}+\left (x \,{\mathrm e}^{5}+x^{2}+x \ln \left (4 x \right )\right ) {\mathrm e}^{-{\mathrm e}^{2 x}-x^{2}}\) \(35\)
parallelrisch \(\frac {\left ({\mathrm e}^{{\mathrm e}^{2 x}+x^{2}} x^{2}+2 x \,{\mathrm e}^{5}+2 x^{2}+2 x \ln \left (4 x \right )\right ) {\mathrm e}^{-{\mathrm e}^{2 x}-x^{2}}}{2}\) \(45\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.39 \[ \int e^{-e^{2 x}-x^2} \left (1+2 x+e^{e^{2 x}+x^2} x-2 x^3+e^5 \left (1-2 x^2\right )+e^{2 x} \left (-2 e^5 x-2 x^2\right )+\left (1-2 e^{2 x} x-2 x^2\right ) \log (4 x)\right ) \, dx=\frac {1}{2} \, {\left (x^{2} e^{\left (x^{2} + e^{\left (2 \, x\right )}\right )} + 2 \, x^{2} + 2 \, x e^{5} + 2 \, x \log \left (4 \, x\right )\right )} e^{\left (-x^{2} - e^{\left (2 \, x\right )}\right )} \]

[In]

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

[Out]

1/2*(x^2*e^(x^2 + e^(2*x)) + 2*x^2 + 2*x*e^5 + 2*x*log(4*x))*e^(-x^2 - e^(2*x))

Sympy [A] (verification not implemented)

Time = 4.98 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.94 \[ \int e^{-e^{2 x}-x^2} \left (1+2 x+e^{e^{2 x}+x^2} x-2 x^3+e^5 \left (1-2 x^2\right )+e^{2 x} \left (-2 e^5 x-2 x^2\right )+\left (1-2 e^{2 x} x-2 x^2\right ) \log (4 x)\right ) \, dx=\frac {x^{2}}{2} + \left (x^{2} + x \log {\left (4 x \right )} + x e^{5}\right ) e^{- x^{2} - e^{2 x}} \]

[In]

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

[Out]

x**2/2 + (x**2 + x*log(4*x) + x*exp(5))*exp(-x**2 - exp(2*x))

Maxima [A] (verification not implemented)

none

Time = 0.34 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.12 \[ \int e^{-e^{2 x}-x^2} \left (1+2 x+e^{e^{2 x}+x^2} x-2 x^3+e^5 \left (1-2 x^2\right )+e^{2 x} \left (-2 e^5 x-2 x^2\right )+\left (1-2 e^{2 x} x-2 x^2\right ) \log (4 x)\right ) \, dx=\frac {1}{2} \, x^{2} + {\left (x^{2} + x {\left (e^{5} + 2 \, \log \left (2\right )\right )} + x \log \left (x\right )\right )} e^{\left (-x^{2} - e^{\left (2 \, x\right )}\right )} \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 58 vs. \(2 (28) = 56\).

Time = 0.31 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.76 \[ \int e^{-e^{2 x}-x^2} \left (1+2 x+e^{e^{2 x}+x^2} x-2 x^3+e^5 \left (1-2 x^2\right )+e^{2 x} \left (-2 e^5 x-2 x^2\right )+\left (1-2 e^{2 x} x-2 x^2\right ) \log (4 x)\right ) \, dx=x^{2} e^{\left (-x^{2} - e^{\left (2 \, x\right )}\right )} + x e^{\left (-x^{2} - e^{\left (2 \, x\right )}\right )} \log \left (4 \, x\right ) + \frac {1}{2} \, x^{2} + x e^{\left (-x^{2} - e^{\left (2 \, x\right )} + 5\right )} \]

[In]

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

[Out]

x^2*e^(-x^2 - e^(2*x)) + x*e^(-x^2 - e^(2*x))*log(4*x) + 1/2*x^2 + x*e^(-x^2 - e^(2*x) + 5)

Mupad [F(-1)]

Timed out. \[ \int e^{-e^{2 x}-x^2} \left (1+2 x+e^{e^{2 x}+x^2} x-2 x^3+e^5 \left (1-2 x^2\right )+e^{2 x} \left (-2 e^5 x-2 x^2\right )+\left (1-2 e^{2 x} x-2 x^2\right ) \log (4 x)\right ) \, dx=\int -{\mathrm {e}}^{-{\mathrm {e}}^{2\,x}-x^2}\,\left (\ln \left (4\,x\right )\,\left (2\,x\,{\mathrm {e}}^{2\,x}+2\,x^2-1\right )-2\,x+{\mathrm {e}}^5\,\left (2\,x^2-1\right )+{\mathrm {e}}^{2\,x}\,\left (2\,x^2+2\,{\mathrm {e}}^5\,x\right )-x\,{\mathrm {e}}^{{\mathrm {e}}^{2\,x}+x^2}+2\,x^3-1\right ) \,d x \]

[In]

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

[Out]

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