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

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

Optimal result

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

[Out]

x*exp(ln(4*x)-3-x+x/exp(x)-ln(x)+exp(x))

Rubi [F]

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

[In]

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

[Out]

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

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.59 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.50

method result size
risch \(x \,{\mathrm e}^{\left (2 \,{\mathrm e}^{x} \ln \left (2\right )-{\mathrm e}^{x} x -3 \,{\mathrm e}^{x}+{\mathrm e}^{2 x}+x \right ) {\mathrm e}^{-x}}\) \(30\)
parallelrisch \(x \,{\mathrm e}^{\left ({\mathrm e}^{x} \ln \left (4 x \right )-{\mathrm e}^{x} \ln \left (x \right )+{\mathrm e}^{2 x}+\left (-3-x \right ) {\mathrm e}^{x}+x \right ) {\mathrm e}^{-x}}\) \(36\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 37 vs. \(2 (15) = 30\).

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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