\(\int \frac {9-6 e+e^2+(12 x-4 e x) \log (x)+(-12 x+4 e x) \log ^2(x)+(8 x-16 x^2) \log ^3(x)-32 x \log ^3(x) \log ^2(\log (4))}{8 x \log ^3(x)} \, dx\) [3575]

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

Optimal result

Integrand size = 69, antiderivative size = 29 \[ \int \frac {9-6 e+e^2+(12 x-4 e x) \log (x)+(-12 x+4 e x) \log ^2(x)+\left (8 x-16 x^2\right ) \log ^3(x)-32 x \log ^3(x) \log ^2(\log (4))}{8 x \log ^3(x)} \, dx=x-\left (x+\frac {3-e}{4 \log (x)}\right )^2-4 x \log ^2(\log (4)) \]

[Out]

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

Rubi [A] (verified)

Time = 0.12 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.66, number of steps used = 8, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {12, 6820, 2339, 30, 2334, 2335} \[ \int \frac {9-6 e+e^2+(12 x-4 e x) \log (x)+(-12 x+4 e x) \log ^2(x)+\left (8 x-16 x^2\right ) \log ^3(x)-32 x \log ^3(x) \log ^2(\log (4))}{8 x \log ^3(x)} \, dx=-\frac {1}{4} \left (-2 x+1-4 \log ^2(\log (4))\right )^2-\frac {(3-e)^2}{16 \log ^2(x)}-\frac {(3-e) x}{2 \log (x)} \]

[In]

Int[(9 - 6*E + E^2 + (12*x - 4*E*x)*Log[x] + (-12*x + 4*E*x)*Log[x]^2 + (8*x - 16*x^2)*Log[x]^3 - 32*x*Log[x]^
3*Log[Log[4]]^2)/(8*x*Log[x]^3),x]

[Out]

-1/16*(3 - E)^2/Log[x]^2 - ((3 - E)*x)/(2*Log[x]) - (1 - 2*x - 4*Log[Log[4]]^2)^2/4

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

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 2339

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, 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}& = \frac {1}{8} \int \frac {9-6 e+e^2+(12 x-4 e x) \log (x)+(-12 x+4 e x) \log ^2(x)+\left (8 x-16 x^2\right ) \log ^3(x)-32 x \log ^3(x) \log ^2(\log (4))}{x \log ^3(x)} \, dx \\ & = \frac {1}{8} \int \left (\frac {(-3+e)^2}{x \log ^3(x)}-\frac {4 (-3+e)}{\log ^2(x)}+\frac {4 (-3+e)}{\log (x)}-8 \left (-1+2 x+4 \log ^2(\log (4))\right )\right ) \, dx \\ & = -\frac {1}{4} \left (1-2 x-4 \log ^2(\log (4))\right )^2+\frac {1}{2} (3-e) \int \frac {1}{\log ^2(x)} \, dx+\frac {1}{8} (3-e)^2 \int \frac {1}{x \log ^3(x)} \, dx+\frac {1}{2} (-3+e) \int \frac {1}{\log (x)} \, dx \\ & = -\frac {(3-e) x}{2 \log (x)}-\frac {1}{4} \left (1-2 x-4 \log ^2(\log (4))\right )^2-\frac {1}{2} (3-e) \text {li}(x)+\frac {1}{2} (3-e) \int \frac {1}{\log (x)} \, dx+\frac {1}{8} (3-e)^2 \text {Subst}\left (\int \frac {1}{x^3} \, dx,x,\log (x)\right ) \\ & = -\frac {(3-e)^2}{16 \log ^2(x)}-\frac {(3-e) x}{2 \log (x)}-\frac {1}{4} \left (1-2 x-4 \log ^2(\log (4))\right )^2 \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(62\) vs. \(2(29)=58\).

Time = 0.08 (sec) , antiderivative size = 62, normalized size of antiderivative = 2.14 \[ \int \frac {9-6 e+e^2+(12 x-4 e x) \log (x)+(-12 x+4 e x) \log ^2(x)+\left (8 x-16 x^2\right ) \log ^3(x)-32 x \log ^3(x) \log ^2(\log (4))}{8 x \log ^3(x)} \, dx=x-x^2-\frac {9}{16 \log ^2(x)}+\frac {3 e}{8 \log ^2(x)}-\frac {e^2}{16 \log ^2(x)}-\frac {3 x}{2 \log (x)}+\frac {e x}{2 \log (x)}-4 x \log ^2(\log (4)) \]

[In]

Integrate[(9 - 6*E + E^2 + (12*x - 4*E*x)*Log[x] + (-12*x + 4*E*x)*Log[x]^2 + (8*x - 16*x^2)*Log[x]^3 - 32*x*L
og[x]^3*Log[Log[4]]^2)/(8*x*Log[x]^3),x]

[Out]

x - x^2 - 9/(16*Log[x]^2) + (3*E)/(8*Log[x]^2) - E^2/(16*Log[x]^2) - (3*x)/(2*Log[x]) + (E*x)/(2*Log[x]) - 4*x
*Log[Log[4]]^2

Maple [A] (verified)

Time = 0.70 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.97

method result size
risch \(-4 x \ln \left (2\right )^{2}-8 \ln \left (2\right ) \ln \left (\ln \left (2\right )\right ) x -4 x \ln \left (\ln \left (2\right )\right )^{2}-x^{2}+x -\frac {-8 x \,{\mathrm e} \ln \left (x \right )+{\mathrm e}^{2}+24 x \ln \left (x \right )-6 \,{\mathrm e}+9}{16 \ln \left (x \right )^{2}}\) \(57\)
parallelrisch \(-\frac {16 \ln \left (4 \ln \left (2\right )^{2}\right )^{2} x \ln \left (x \right )^{2}+16 x^{2} \ln \left (x \right )^{2}-8 x \,{\mathrm e} \ln \left (x \right )-16 x \ln \left (x \right )^{2}+9+{\mathrm e}^{2}+24 x \ln \left (x \right )-6 \,{\mathrm e}}{16 \ln \left (x \right )^{2}}\) \(61\)
norman \(\frac {\left (\frac {{\mathrm e}}{2}-\frac {3}{2}\right ) x \ln \left (x \right )+\left (-4 \ln \left (2\right )^{2}-8 \ln \left (2\right ) \ln \left (\ln \left (2\right )\right )-4 \ln \left (\ln \left (2\right )\right )^{2}+1\right ) x \ln \left (x \right )^{2}-x^{2} \ln \left (x \right )^{2}-\frac {9}{16}-\frac {{\mathrm e}^{2}}{16}+\frac {3 \,{\mathrm e}}{8}}{\ln \left (x \right )^{2}}\) \(65\)
parts \(x +\left (-\frac {{\mathrm e}}{2}+\frac {3}{2}\right ) \left (-\frac {x}{\ln \left (x \right )}-\operatorname {Ei}_{1}\left (-\ln \left (x \right )\right )\right )-\left (\frac {{\mathrm e}}{2}-\frac {3}{2}\right ) \operatorname {Ei}_{1}\left (-\ln \left (x \right )\right )-x^{2}-\ln \left (4 \ln \left (2\right )^{2}\right )^{2} x -\frac {\frac {{\mathrm e}^{2}}{8}-\frac {3 \,{\mathrm e}}{4}+\frac {9}{8}}{2 \ln \left (x \right )^{2}}\) \(75\)
default \(-4 x \ln \left (2\right )^{2}-8 \ln \left (2\right ) \ln \left (\ln \left (2\right )\right ) x -4 x \ln \left (\ln \left (2\right )\right )^{2}-x^{2}+x -\frac {{\mathrm e} \,\operatorname {Ei}_{1}\left (-\ln \left (x \right )\right )}{2}-\frac {{\mathrm e} \left (-\frac {x}{\ln \left (x \right )}-\operatorname {Ei}_{1}\left (-\ln \left (x \right )\right )\right )}{2}-\frac {3 x}{2 \ln \left (x \right )}-\frac {{\mathrm e}^{2}}{16 \ln \left (x \right )^{2}}+\frac {3 \,{\mathrm e}}{8 \ln \left (x \right )^{2}}-\frac {9}{16 \ln \left (x \right )^{2}}\) \(92\)

[In]

int(1/8*(-8*x*ln(x)^3*ln(4*ln(2)^2)^2+(-16*x^2+8*x)*ln(x)^3+(4*x*exp(1)-12*x)*ln(x)^2+(-4*x*exp(1)+12*x)*ln(x)
+exp(1)^2-6*exp(1)+9)/x/ln(x)^3,x,method=_RETURNVERBOSE)

[Out]

-4*x*ln(2)^2-8*ln(2)*ln(ln(2))*x-4*x*ln(ln(2))^2-x^2+x-1/16*(-8*x*exp(1)*ln(x)+exp(2)+24*x*ln(x)-6*exp(1)+9)/l
n(x)^2

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.90 \[ \int \frac {9-6 e+e^2+(12 x-4 e x) \log (x)+(-12 x+4 e x) \log ^2(x)+\left (8 x-16 x^2\right ) \log ^3(x)-32 x \log ^3(x) \log ^2(\log (4))}{8 x \log ^3(x)} \, dx=-\frac {16 \, x \log \left (4 \, \log \left (2\right )^{2}\right )^{2} \log \left (x\right )^{2} + 16 \, {\left (x^{2} - x\right )} \log \left (x\right )^{2} - 8 \, {\left (x e - 3 \, x\right )} \log \left (x\right ) + e^{2} - 6 \, e + 9}{16 \, \log \left (x\right )^{2}} \]

[In]

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

[Out]

-1/16*(16*x*log(4*log(2)^2)^2*log(x)^2 + 16*(x^2 - x)*log(x)^2 - 8*(x*e - 3*x)*log(x) + e^2 - 6*e + 9)/log(x)^
2

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 61 vs. \(2 (27) = 54\).

Time = 0.07 (sec) , antiderivative size = 61, normalized size of antiderivative = 2.10 \[ \int \frac {9-6 e+e^2+(12 x-4 e x) \log (x)+(-12 x+4 e x) \log ^2(x)+\left (8 x-16 x^2\right ) \log ^3(x)-32 x \log ^3(x) \log ^2(\log (4))}{8 x \log ^3(x)} \, dx=- x^{2} + x \left (- 4 \log {\left (2 \right )}^{2} - 4 \log {\left (\log {\left (2 \right )} \right )}^{2} + 1 - 8 \log {\left (2 \right )} \log {\left (\log {\left (2 \right )} \right )}\right ) + \frac {\left (- 24 x + 8 e x\right ) \log {\left (x \right )} - 9 - e^{2} + 6 e}{16 \log {\left (x \right )}^{2}} \]

[In]

integrate(1/8*(-8*x*ln(x)**3*ln(4*ln(2)**2)**2+(-16*x**2+8*x)*ln(x)**3+(4*x*exp(1)-12*x)*ln(x)**2+(-4*x*exp(1)
+12*x)*ln(x)+exp(1)**2-6*exp(1)+9)/x/ln(x)**3,x)

[Out]

-x**2 + x*(-4*log(2)**2 - 4*log(log(2))**2 + 1 - 8*log(2)*log(log(2))) + ((-24*x + 8*E*x)*log(x) - 9 - exp(2)
+ 6*E)/(16*log(x)**2)

Maxima [C] (verification not implemented)

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

Time = 0.24 (sec) , antiderivative size = 71, normalized size of antiderivative = 2.45 \[ \int \frac {9-6 e+e^2+(12 x-4 e x) \log (x)+(-12 x+4 e x) \log ^2(x)+\left (8 x-16 x^2\right ) \log ^3(x)-32 x \log ^3(x) \log ^2(\log (4))}{8 x \log ^3(x)} \, dx=-x \log \left (4 \, \log \left (2\right )^{2}\right )^{2} - x^{2} + \frac {1}{2} \, {\rm Ei}\left (\log \left (x\right )\right ) e - \frac {1}{2} \, e \Gamma \left (-1, -\log \left (x\right )\right ) + x - \frac {e^{2}}{16 \, \log \left (x\right )^{2}} + \frac {3 \, e}{8 \, \log \left (x\right )^{2}} - \frac {9}{16 \, \log \left (x\right )^{2}} - \frac {3}{2} \, {\rm Ei}\left (\log \left (x\right )\right ) + \frac {3}{2} \, \Gamma \left (-1, -\log \left (x\right )\right ) \]

[In]

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

[Out]

-x*log(4*log(2)^2)^2 - x^2 + 1/2*Ei(log(x))*e - 1/2*e*gamma(-1, -log(x)) + x - 1/16*e^2/log(x)^2 + 3/8*e/log(x
)^2 - 9/16/log(x)^2 - 3/2*Ei(log(x)) + 3/2*gamma(-1, -log(x))

Giac [B] (verification not implemented)

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

Time = 0.27 (sec) , antiderivative size = 77, normalized size of antiderivative = 2.66 \[ \int \frac {9-6 e+e^2+(12 x-4 e x) \log (x)+(-12 x+4 e x) \log ^2(x)+\left (8 x-16 x^2\right ) \log ^3(x)-32 x \log ^3(x) \log ^2(\log (4))}{8 x \log ^3(x)} \, dx=-\frac {64 \, x \log \left (2\right )^{2} \log \left (x\right )^{2} + 128 \, x \log \left (2\right ) \log \left (x\right )^{2} \log \left (\log \left (2\right )\right ) + 64 \, x \log \left (x\right )^{2} \log \left (\log \left (2\right )\right )^{2} + 16 \, x^{2} \log \left (x\right )^{2} - 8 \, x e \log \left (x\right ) - 16 \, x \log \left (x\right )^{2} + 24 \, x \log \left (x\right ) + e^{2} - 6 \, e + 9}{16 \, \log \left (x\right )^{2}} \]

[In]

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

[Out]

-1/16*(64*x*log(2)^2*log(x)^2 + 128*x*log(2)*log(x)^2*log(log(2)) + 64*x*log(x)^2*log(log(2))^2 + 16*x^2*log(x
)^2 - 8*x*e*log(x) - 16*x*log(x)^2 + 24*x*log(x) + e^2 - 6*e + 9)/log(x)^2

Mupad [B] (verification not implemented)

Time = 8.89 (sec) , antiderivative size = 62, normalized size of antiderivative = 2.14 \[ \int \frac {9-6 e+e^2+(12 x-4 e x) \log (x)+(-12 x+4 e x) \log ^2(x)+\left (8 x-16 x^2\right ) \log ^3(x)-32 x \log ^3(x) \log ^2(\log (4))}{8 x \log ^3(x)} \, dx=-\frac {x^4+\frac {x^3\,\left (8\,{\ln \left (4\,{\ln \left (2\right )}^2\right )}^2-8\right )}{8}}{x^2}-\frac {\frac {x^2\,{\left (\mathrm {e}-3\right )}^2}{16}-\frac {x^3\,\ln \left (x\right )\,\left (4\,\mathrm {e}-12\right )}{8}}{x^2\,{\ln \left (x\right )}^2} \]

[In]

int((exp(2)/8 - (3*exp(1))/4 + (log(x)^3*(8*x - 16*x^2))/8 - (log(x)^2*(12*x - 4*x*exp(1)))/8 + (log(x)*(12*x
- 4*x*exp(1)))/8 - x*log(4*log(2)^2)^2*log(x)^3 + 9/8)/(x*log(x)^3),x)

[Out]

- (x^4 + (x^3*(8*log(4*log(2)^2)^2 - 8))/8)/x^2 - ((x^2*(exp(1) - 3)^2)/16 - (x^3*log(x)*(4*exp(1) - 12))/8)/(
x^2*log(x)^2)