\(\int \frac {e^{-2 e^x} (-25+x^2+e^{2 e^x} x^2+e^x (-50 x-20 x^2-2 x^3)+(-20-4 x) \log (x)+(10+e^x (20 x+4 x^2)) \log ^2(x)+4 \log ^3(x)+(-1-2 e^x x) \log ^4(x))}{x^2} \, dx\) [3301]

   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 = 92, antiderivative size = 24 \[ \int \frac {e^{-2 e^x} \left (-25+x^2+e^{2 e^x} x^2+e^x \left (-50 x-20 x^2-2 x^3\right )+(-20-4 x) \log (x)+\left (10+e^x \left (20 x+4 x^2\right )\right ) \log ^2(x)+4 \log ^3(x)+\left (-1-2 e^x x\right ) \log ^4(x)\right )}{x^2} \, dx=x+\frac {e^{-2 e^x} \left (-5-x+\log ^2(x)\right )^2}{x} \]

[Out]

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

Rubi [F]

\[ \int \frac {e^{-2 e^x} \left (-25+x^2+e^{2 e^x} x^2+e^x \left (-50 x-20 x^2-2 x^3\right )+(-20-4 x) \log (x)+\left (10+e^x \left (20 x+4 x^2\right )\right ) \log ^2(x)+4 \log ^3(x)+\left (-1-2 e^x x\right ) \log ^4(x)\right )}{x^2} \, dx=\int \frac {e^{-2 e^x} \left (-25+x^2+e^{2 e^x} x^2+e^x \left (-50 x-20 x^2-2 x^3\right )+(-20-4 x) \log (x)+\left (10+e^x \left (20 x+4 x^2\right )\right ) \log ^2(x)+4 \log ^3(x)+\left (-1-2 e^x x\right ) \log ^4(x)\right )}{x^2} \, dx \]

[In]

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

[Out]

10/E^(2*E^x) + x + ExpIntegralEi[-2*E^x] - 25*Defer[Int][1/(E^(2*E^x)*x^2), x] - 20*Log[x]*Defer[Int][1/(E^(2*
E^x)*x^2), x] - 4*Log[x]*Defer[Int][1/(E^(2*E^x)*x), x] - 50*Defer[Int][E^(-2*E^x + x)/x, x] - 2*Defer[Int][E^
(-2*E^x + x)*x, x] + 4*Defer[Int][E^(-2*E^x + x)*Log[x]^2, x] + 10*Defer[Int][Log[x]^2/(E^(2*E^x)*x^2), x] + 2
0*Defer[Int][(E^(-2*E^x + x)*Log[x]^2)/x, x] + 4*Defer[Int][Log[x]^3/(E^(2*E^x)*x^2), x] - Defer[Int][Log[x]^4
/(E^(2*E^x)*x^2), x] - 2*Defer[Int][(E^(-2*E^x + x)*Log[x]^4)/x, x] + 20*Defer[Int][Defer[Int][1/(E^(2*E^x)*x^
2), x]/x, x] + 4*Defer[Int][Defer[Int][1/(E^(2*E^x)*x), x]/x, x]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.99 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.54

method result size
risch \(x +\frac {\left (\ln \left (x \right )^{4}-2 x \ln \left (x \right )^{2}+x^{2}-10 \ln \left (x \right )^{2}+10 x +25\right ) {\mathrm e}^{-2 \,{\mathrm e}^{x}}}{x}\) \(37\)
parallelrisch \(-\frac {\left (-25-x^{2} {\mathrm e}^{2 \,{\mathrm e}^{x}}-\ln \left (x \right )^{4}+2 x \ln \left (x \right )^{2}-x^{2}+10 \ln \left (x \right )^{2}-10 x \right ) {\mathrm e}^{-2 \,{\mathrm e}^{x}}}{x}\) \(50\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.62 \[ \int \frac {e^{-2 e^x} \left (-25+x^2+e^{2 e^x} x^2+e^x \left (-50 x-20 x^2-2 x^3\right )+(-20-4 x) \log (x)+\left (10+e^x \left (20 x+4 x^2\right )\right ) \log ^2(x)+4 \log ^3(x)+\left (-1-2 e^x x\right ) \log ^4(x)\right )}{x^2} \, dx=\frac {{\left (\log \left (x\right )^{4} + x^{2} e^{\left (2 \, e^{x}\right )} - 2 \, {\left (x + 5\right )} \log \left (x\right )^{2} + x^{2} + 10 \, x + 25\right )} e^{\left (-2 \, e^{x}\right )}}{x} \]

[In]

integrate((x^2*exp(exp(x))^2+(-2*exp(x)*x-1)*log(x)^4+4*log(x)^3+((4*x^2+20*x)*exp(x)+10)*log(x)^2+(-4*x-20)*l
og(x)+(-2*x^3-20*x^2-50*x)*exp(x)+x^2-25)/x^2/exp(exp(x))^2,x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.54 \[ \int \frac {e^{-2 e^x} \left (-25+x^2+e^{2 e^x} x^2+e^x \left (-50 x-20 x^2-2 x^3\right )+(-20-4 x) \log (x)+\left (10+e^x \left (20 x+4 x^2\right )\right ) \log ^2(x)+4 \log ^3(x)+\left (-1-2 e^x x\right ) \log ^4(x)\right )}{x^2} \, dx=x + \frac {\left (x^{2} - 2 x \log {\left (x \right )}^{2} + 10 x + \log {\left (x \right )}^{4} - 10 \log {\left (x \right )}^{2} + 25\right ) e^{- 2 e^{x}}}{x} \]

[In]

integrate((x**2*exp(exp(x))**2+(-2*exp(x)*x-1)*ln(x)**4+4*ln(x)**3+((4*x**2+20*x)*exp(x)+10)*ln(x)**2+(-4*x-20
)*ln(x)+(-2*x**3-20*x**2-50*x)*exp(x)+x**2-25)/x**2/exp(exp(x))**2,x)

[Out]

x + (x**2 - 2*x*log(x)**2 + 10*x + log(x)**4 - 10*log(x)**2 + 25)*exp(-2*exp(x))/x

Maxima [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.50 \[ \int \frac {e^{-2 e^x} \left (-25+x^2+e^{2 e^x} x^2+e^x \left (-50 x-20 x^2-2 x^3\right )+(-20-4 x) \log (x)+\left (10+e^x \left (20 x+4 x^2\right )\right ) \log ^2(x)+4 \log ^3(x)+\left (-1-2 e^x x\right ) \log ^4(x)\right )}{x^2} \, dx=x + \frac {{\left (\log \left (x\right )^{4} - 2 \, {\left (x + 5\right )} \log \left (x\right )^{2} + x^{2} + 25\right )} e^{\left (-2 \, e^{x}\right )}}{x} + 10 \, e^{\left (-2 \, e^{x}\right )} \]

[In]

integrate((x^2*exp(exp(x))^2+(-2*exp(x)*x-1)*log(x)^4+4*log(x)^3+((4*x^2+20*x)*exp(x)+10)*log(x)^2+(-4*x-20)*l
og(x)+(-2*x^3-20*x^2-50*x)*exp(x)+x^2-25)/x^2/exp(exp(x))^2,x, algorithm="maxima")

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 84 vs. \(2 (22) = 44\).

Time = 0.27 (sec) , antiderivative size = 84, normalized size of antiderivative = 3.50 \[ \int \frac {e^{-2 e^x} \left (-25+x^2+e^{2 e^x} x^2+e^x \left (-50 x-20 x^2-2 x^3\right )+(-20-4 x) \log (x)+\left (10+e^x \left (20 x+4 x^2\right )\right ) \log ^2(x)+4 \log ^3(x)+\left (-1-2 e^x x\right ) \log ^4(x)\right )}{x^2} \, dx=\frac {{\left (e^{\left (x - 2 \, e^{x}\right )} \log \left (x\right )^{4} - 2 \, x e^{\left (x - 2 \, e^{x}\right )} \log \left (x\right )^{2} + x^{2} e^{\left (x - 2 \, e^{x}\right )} + x^{2} e^{x} - 10 \, e^{\left (x - 2 \, e^{x}\right )} \log \left (x\right )^{2} + 10 \, x e^{\left (x - 2 \, e^{x}\right )} + 25 \, e^{\left (x - 2 \, e^{x}\right )}\right )} e^{\left (-x\right )}}{x} \]

[In]

integrate((x^2*exp(exp(x))^2+(-2*exp(x)*x-1)*log(x)^4+4*log(x)^3+((4*x^2+20*x)*exp(x)+10)*log(x)^2+(-4*x-20)*l
og(x)+(-2*x^3-20*x^2-50*x)*exp(x)+x^2-25)/x^2/exp(exp(x))^2,x, algorithm="giac")

[Out]

(e^(x - 2*e^x)*log(x)^4 - 2*x*e^(x - 2*e^x)*log(x)^2 + x^2*e^(x - 2*e^x) + x^2*e^x - 10*e^(x - 2*e^x)*log(x)^2
 + 10*x*e^(x - 2*e^x) + 25*e^(x - 2*e^x))*e^(-x)/x

Mupad [F(-1)]

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

[In]

int((exp(-2*exp(x))*(4*log(x)^3 - log(x)*(4*x + 20) + log(x)^2*(exp(x)*(20*x + 4*x^2) + 10) - log(x)^4*(2*x*ex
p(x) + 1) + x^2 + x^2*exp(2*exp(x)) - exp(x)*(50*x + 20*x^2 + 2*x^3) - 25))/x^2,x)

[Out]

int((exp(-2*exp(x))*(4*log(x)^3 - log(x)*(4*x + 20) + log(x)^2*(exp(x)*(20*x + 4*x^2) + 10) - log(x)^4*(2*x*ex
p(x) + 1) + x^2 + x^2*exp(2*exp(x)) - exp(x)*(50*x + 20*x^2 + 2*x^3) - 25))/x^2, x)