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

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

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.22 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.19, number of steps used = 11, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {6, 6820, 14, 2228, 2334, 2335} \[ \int \frac {-20 x^2+4 e x^2+\left (10 x^2-2 e x^2\right ) \log (x)+\left (-2+e^x (-1+x)\right ) \log ^3(x)}{x^2 \log ^3(x)} \, dx=\frac {e^x}{x}+\frac {2}{x}+\frac {2 (5-e) x}{\log ^2(x)} \]

[In]

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

[Out]

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

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, x]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2228

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[g*u^(m + 1)*(F^(c*v)/(b*c*
e*Log[F])), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, x
]

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Simp[x*((a + b*Log[c*x^n])^(p + 1)/(b*n*(p + 1)))
, x] - Dist[1/(b*n*(p + 1)), Int[(a + b*Log[c*x^n])^(p + 1), x], x] /; FreeQ[{a, b, c, n}, x] && LtQ[p, -1] &&
 IntegerQ[2*p]

Rule 2335

Int[Log[(c_.)*(x_)]^(-1), x_Symbol] :> Simp[LogIntegral[c*x]/c, x] /; FreeQ[c, x]

Rule 6820

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

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.25 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00

method result size
risch \(\frac {{\mathrm e}^{x}+2}{x}-\frac {2 \left ({\mathrm e}-5\right ) x}{\ln \left (x \right )^{2}}\) \(21\)
parallelrisch \(\frac {{\mathrm e}^{x} \ln \left (x \right )^{2}-2 x^{2} {\mathrm e}+2 \ln \left (x \right )^{2}+10 x^{2}}{\ln \left (x \right )^{2} x}\) \(35\)
default \(\left (-2 \,{\mathrm e}+10\right ) \left (-\frac {x}{\ln \left (x \right )}-\operatorname {Ei}_{1}\left (-\ln \left (x \right )\right )\right )+\left (4 \,{\mathrm e}-20\right ) \left (-\frac {x}{2 \ln \left (x \right )^{2}}-\frac {x}{2 \ln \left (x \right )}-\frac {\operatorname {Ei}_{1}\left (-\ln \left (x \right )\right )}{2}\right )+\frac {{\mathrm e}^{x}}{x}+\frac {2}{x}\) \(66\)
parts \(\left (-2 \,{\mathrm e}+10\right ) \left (-\frac {x}{\ln \left (x \right )}-\operatorname {Ei}_{1}\left (-\ln \left (x \right )\right )\right )+\left (4 \,{\mathrm e}-20\right ) \left (-\frac {x}{2 \ln \left (x \right )^{2}}-\frac {x}{2 \ln \left (x \right )}-\frac {\operatorname {Ei}_{1}\left (-\ln \left (x \right )\right )}{2}\right )+\frac {{\mathrm e}^{x}}{x}+\frac {2}{x}\) \(66\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

integrate((((-1+x)*exp(x)-2)*log(x)^3+(-2*x^2*exp(1)+10*x^2)*log(x)+4*x^2*exp(1)-20*x^2)/x^2/log(x)^3,x, algor
ithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

(-2*E*x + 10*x)/log(x)**2 + exp(x)/x + 2/x

Maxima [C] (verification not implemented)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 0.26 (sec) , antiderivative size = 51, normalized size of antiderivative = 2.43 \[ \int \frac {-20 x^2+4 e x^2+\left (10 x^2-2 e x^2\right ) \log (x)+\left (-2+e^x (-1+x)\right ) \log ^3(x)}{x^2 \log ^3(x)} \, dx=-2 \, e \Gamma \left (-1, -\log \left (x\right )\right ) - 4 \, e \Gamma \left (-2, -\log \left (x\right )\right ) + \frac {2}{x} + {\rm Ei}\left (x\right ) - \Gamma \left (-1, -x\right ) + 10 \, \Gamma \left (-1, -\log \left (x\right )\right ) + 20 \, \Gamma \left (-2, -\log \left (x\right )\right ) \]

[In]

integrate((((-1+x)*exp(x)-2)*log(x)^3+(-2*x^2*exp(1)+10*x^2)*log(x)+4*x^2*exp(1)-20*x^2)/x^2/log(x)^3,x, algor
ithm="maxima")

[Out]

-2*e*gamma(-1, -log(x)) - 4*e*gamma(-2, -log(x)) + 2/x + Ei(x) - gamma(-1, -x) + 10*gamma(-1, -log(x)) + 20*ga
mma(-2, -log(x))

Giac [A] (verification not implemented)

none

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

[In]

integrate((((-1+x)*exp(x)-2)*log(x)^3+(-2*x^2*exp(1)+10*x^2)*log(x)+4*x^2*exp(1)-20*x^2)/x^2/log(x)^3,x, algor
ithm="giac")

[Out]

-(2*x^2*e - e^x*log(x)^2 - 10*x^2 - 2*log(x)^2)/(x*log(x)^2)

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

exp(x)/x + (10*x)/log(x)^2 + 2/x - (2*x*exp(1))/log(x)^2