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

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

Optimal result

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

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(70\) vs. \(2(32)=64\).

Time = 0.95 (sec) , antiderivative size = 70, normalized size of antiderivative = 2.19, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.034, Rules used = {6874, 2332, 2326} \[ \int \frac {e^x x+\left (1-2 x+e^x \left (-4 x-x^2\right )\right ) \log (x)+\left (1+e^x (3+x)\right ) \log ^2(x)+\left (e^x \left (1-2 x-x^2\right ) \log (x)+e^x (1+x) \log ^2(x)\right ) \log \left (\frac {x^2}{5 \log (x)}\right )}{\log (x)} \, dx=-x^2-\frac {e^x \left (-x \log ^2(x) \log \left (\frac {x^2}{5 \log (x)}\right )+x^2 \log (x)+x^2 \log (x) \log \left (\frac {x^2}{5 \log (x)}\right )-x \log ^2(x)\right )}{\log (x)}+x \log (x) \]

[In]

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

[Out]

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

Rule 2326

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = v*(y/(Log[F]*D[u, x]))}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.38 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.78

method result size
parallelrisch \(-\ln \left (\frac {x^{2}}{5 \ln \left (x \right )}\right ) {\mathrm e}^{x} x^{2}+\ln \left (\frac {x^{2}}{5 \ln \left (x \right )}\right ) \ln \left (x \right ) {\mathrm e}^{x} x -{\mathrm e}^{x} x^{2}+x \,{\mathrm e}^{x} \ln \left (x \right )-x^{2}+x \ln \left (x \right )\) \(57\)
risch \(\frac {i \pi x \operatorname {csgn}\left (\frac {i x^{2}}{\ln \left (x \right )}\right )^{2} \operatorname {csgn}\left (\frac {i}{\ln \left (x \right )}\right ) {\mathrm e}^{x} \ln \left (x \right )}{2}+\frac {i \pi \,x^{2} \operatorname {csgn}\left (i x \right )^{2} \operatorname {csgn}\left (i x^{2}\right ) {\mathrm e}^{x}}{2}-\frac {i \pi \,x^{2} \operatorname {csgn}\left (i x^{2}\right ) \operatorname {csgn}\left (\frac {i x^{2}}{\ln \left (x \right )}\right )^{2} {\mathrm e}^{x}}{2}-\frac {i \pi x \operatorname {csgn}\left (\frac {i x^{2}}{\ln \left (x \right )}\right )^{3} {\mathrm e}^{x} \ln \left (x \right )}{2}-\frac {i \pi x \operatorname {csgn}\left (i x^{2}\right )^{3} {\mathrm e}^{x} \ln \left (x \right )}{2}-{\mathrm e}^{x} x^{2}+x \ln \left (x \right )-x \ln \left (5\right ) {\mathrm e}^{x} \ln \left (x \right )+x^{2} \ln \left (5\right ) {\mathrm e}^{x}+2 x \,{\mathrm e}^{x} \ln \left (x \right )^{2}-2 x^{2} {\mathrm e}^{x} \ln \left (x \right )+x \,{\mathrm e}^{x} \ln \left (x \right )-x^{2}+\frac {i \pi \,x^{2} \operatorname {csgn}\left (\frac {i x^{2}}{\ln \left (x \right )}\right )^{3} {\mathrm e}^{x}}{2}-\frac {i \pi x \,\operatorname {csgn}\left (i x^{2}\right ) \operatorname {csgn}\left (\frac {i x^{2}}{\ln \left (x \right )}\right ) \operatorname {csgn}\left (\frac {i}{\ln \left (x \right )}\right ) {\mathrm e}^{x} \ln \left (x \right )}{2}+\frac {i \pi \,x^{2} \operatorname {csgn}\left (i x^{2}\right ) \operatorname {csgn}\left (\frac {i x^{2}}{\ln \left (x \right )}\right ) \operatorname {csgn}\left (\frac {i}{\ln \left (x \right )}\right ) {\mathrm e}^{x}}{2}+\frac {i \pi \,x^{2} \operatorname {csgn}\left (i x^{2}\right )^{3} {\mathrm e}^{x}}{2}-\frac {i \pi x \operatorname {csgn}\left (i x \right )^{2} \operatorname {csgn}\left (i x^{2}\right ) {\mathrm e}^{x} \ln \left (x \right )}{2}-i \pi \,x^{2} \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x^{2}\right )^{2} {\mathrm e}^{x}-\frac {i \pi \,x^{2} \operatorname {csgn}\left (\frac {i x^{2}}{\ln \left (x \right )}\right )^{2} \operatorname {csgn}\left (\frac {i}{\ln \left (x \right )}\right ) {\mathrm e}^{x}}{2}+i \pi x \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x^{2}\right )^{2} {\mathrm e}^{x} \ln \left (x \right )+\frac {i \pi x \,\operatorname {csgn}\left (i x^{2}\right ) \operatorname {csgn}\left (\frac {i x^{2}}{\ln \left (x \right )}\right )^{2} {\mathrm e}^{x} \ln \left (x \right )}{2}+\left ({\mathrm e}^{x} x^{2}-x \,{\mathrm e}^{x} \ln \left (x \right )\right ) \ln \left (\ln \left (x \right )\right )\) \(437\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 81 vs. \(2 (26) = 52\).

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

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 64 vs. \(2 (26) = 52\).

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

[In]

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

[Out]

-2*x^2*e^x*log(x) + 2*x*e^x*log(x)^2 + x^2*e^x*log(5*log(x)) - x*e^x*log(x)*log(5*log(x)) - x^2*e^x + x*e^x*lo
g(x) - x^2 + x*log(x)

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

log(x^2/(5*log(x)))*((exp(x)*(x - x^3))/x - exp(x) + x*exp(x)*log(x)) - x^2*exp(x) + log(x)*(x + x*exp(x)) - x
^2