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

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

Optimal result

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

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

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

Mathematica [A] (verified)

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

[In]

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

[Out]

-((E^3 - E^E^x*x + x^2 + Log[4])*(x + Log[x]))

Maple [A] (verified)

Time = 1.28 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.71

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

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [F]

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

[In]

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

[Out]

-x^3 - x^2*log(x) - x*e^3 + (x^2 + x*log(x))*e^(e^x) - 2*x*log(2) - e^3*log(x) - 2*log(2)*log(x) + Ei(e^x) - i
ntegrate(e^(e^x), x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 69 vs. \(2 (24) = 48\).

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 11.80 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.50 \[ \int \frac {e^3 (-1-x)-x^2-3 x^3+(-1-x) \log (4)-2 x^2 \log (x)+e^{e^x} \left (x+2 x^2+e^x x^3+\left (x+e^x x^2\right ) \log (x)\right )}{x} \, dx={\mathrm {e}}^{{\mathrm {e}}^x}\,\left (x\,\ln \left (x\right )+x^2\right )-x^2\,\ln \left (x\right )-\ln \left (x\right )\,\left ({\mathrm {e}}^3+\ln \left (4\right )\right )-x\,\left ({\mathrm {e}}^3+\ln \left (4\right )\right )-x^3 \]

[In]

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

[Out]

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