\(\int e^{-2 x-4 e^{e^x} x} (1+e^{2 x+4 e^{e^x} x}-2 x+e^{e^x} (-4 x-4 e^x x^2)) \, dx\) [3271]

   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 [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 52, antiderivative size = 18 \[ \int e^{-2 x-4 e^{e^x} x} \left (1+e^{2 x+4 e^{e^x} x}-2 x+e^{e^x} \left (-4 x-4 e^x x^2\right )\right ) \, dx=x+e^{-2 x-4 e^{e^x} x} x \]

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

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

Mathematica [A] (verified)

Time = 1.87 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00 \[ \int e^{-2 x-4 e^{e^x} x} \left (1+e^{2 x+4 e^{e^x} x}-2 x+e^{e^x} \left (-4 x-4 e^x x^2\right )\right ) \, dx=x+e^{-2 x-4 e^{e^x} x} x \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.77 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.89

method result size
risch \(x +x \,{\mathrm e}^{-2 x \left (2 \,{\mathrm e}^{{\mathrm e}^{x}}+1\right )}\) \(16\)
parallelrisch \(-\frac {\left (-2 \,{\mathrm e}^{2 x \left (2 \,{\mathrm e}^{{\mathrm e}^{x}}+1\right )} x -2 x \right ) {\mathrm e}^{-2 x \left (2 \,{\mathrm e}^{{\mathrm e}^{x}}+1\right )}}{2}\) \(34\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.50 \[ \int e^{-2 x-4 e^{e^x} x} \left (1+e^{2 x+4 e^{e^x} x}-2 x+e^{e^x} \left (-4 x-4 e^x x^2\right )\right ) \, dx={\left (x e^{\left (4 \, x e^{\left (e^{x}\right )} + 2 \, x\right )} + x\right )} e^{\left (-4 \, x e^{\left (e^{x}\right )} - 2 \, x\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.62 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.94 \[ \int e^{-2 x-4 e^{e^x} x} \left (1+e^{2 x+4 e^{e^x} x}-2 x+e^{e^x} \left (-4 x-4 e^x x^2\right )\right ) \, dx=x e^{- 4 x e^{e^{x}} - 2 x} + x \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.83 \[ \int e^{-2 x-4 e^{e^x} x} \left (1+e^{2 x+4 e^{e^x} x}-2 x+e^{e^x} \left (-4 x-4 e^x x^2\right )\right ) \, dx=x e^{\left (-4 \, x e^{\left (e^{x}\right )} - 2 \, x\right )} + x \]

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

integrate(-(4*(x^2*e^x + x)*e^(e^x) + 2*x - e^(4*x*e^(e^x) + 2*x) - 1)*e^(-4*x*e^(e^x) - 2*x), x)

Mupad [B] (verification not implemented)

Time = 9.50 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.83 \[ \int e^{-2 x-4 e^{e^x} x} \left (1+e^{2 x+4 e^{e^x} x}-2 x+e^{e^x} \left (-4 x-4 e^x x^2\right )\right ) \, dx=x+x\,{\mathrm {e}}^{-2\,x}\,{\mathrm {e}}^{-4\,x\,{\mathrm {e}}^{{\mathrm {e}}^x}} \]

[In]

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

[Out]

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