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

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

Optimal result

Integrand size = 137, antiderivative size = 24 \[ \int \frac {2 x^2-8 x^3+e^2 \left (2 x-8 x^2\right )+\left (e^2 x+x^2\right ) \log (x)+\left (e^2 \left (-8+x-4 x^2\right )+e^2 x \log (x)\right ) \log \left (-8+x-4 x^2+x \log (x)\right )}{-8 x^2+x^3-4 x^4+e^4 \left (-8+x-4 x^2\right )+e^2 \left (-16 x+2 x^2-8 x^3\right )+\left (e^4 x+2 e^2 x^2+x^3\right ) \log (x)} \, dx=\frac {x \log (-8+x-x (4 x-\log (x)))}{e^2+x} \]

[Out]

ln(x-x*(4*x-ln(x))-8)*x/(x+exp(2))

Rubi [F]

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

[In]

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

[Out]

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

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

Mathematica [A] (verified)

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

[In]

Integrate[(2*x^2 - 8*x^3 + E^2*(2*x - 8*x^2) + (E^2*x + x^2)*Log[x] + (E^2*(-8 + x - 4*x^2) + E^2*x*Log[x])*Lo
g[-8 + x - 4*x^2 + x*Log[x]])/(-8*x^2 + x^3 - 4*x^4 + E^4*(-8 + x - 4*x^2) + E^2*(-16*x + 2*x^2 - 8*x^3) + (E^
4*x + 2*E^2*x^2 + x^3)*Log[x]),x]

[Out]

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

Maple [A] (verified)

Time = 23.05 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.92

method result size
parallelrisch \(\frac {\ln \left (x \ln \left (x \right )-4 x^{2}+x -8\right ) x}{x +{\mathrm e}^{2}}\) \(22\)
risch \(-\frac {{\mathrm e}^{2} \ln \left (x \ln \left (x \right )-4 x^{2}+x -8\right )}{x +{\mathrm e}^{2}}+\ln \left (x \right )+\ln \left (\ln \left (x \right )-\frac {4 x^{2}-x +8}{x}\right )\) \(46\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.88 \[ \int \frac {2 x^2-8 x^3+e^2 \left (2 x-8 x^2\right )+\left (e^2 x+x^2\right ) \log (x)+\left (e^2 \left (-8+x-4 x^2\right )+e^2 x \log (x)\right ) \log \left (-8+x-4 x^2+x \log (x)\right )}{-8 x^2+x^3-4 x^4+e^4 \left (-8+x-4 x^2\right )+e^2 \left (-16 x+2 x^2-8 x^3\right )+\left (e^4 x+2 e^2 x^2+x^3\right ) \log (x)} \, dx=\frac {x \log \left (-4 \, x^{2} + x \log \left (x\right ) + x - 8\right )}{x + e^{2}} \]

[In]

integrate(((x*exp(2)*log(x)+(-4*x^2+x-8)*exp(2))*log(x*log(x)-4*x^2+x-8)+(exp(2)*x+x^2)*log(x)+(-8*x^2+2*x)*ex
p(2)-8*x^3+2*x^2)/((x*exp(2)^2+2*x^2*exp(2)+x^3)*log(x)+(-4*x^2+x-8)*exp(2)^2+(-8*x^3+2*x^2-16*x)*exp(2)-4*x^4
+x^3-8*x^2),x, algorithm="fricas")

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 41 vs. \(2 (19) = 38\).

Time = 0.27 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.71 \[ \int \frac {2 x^2-8 x^3+e^2 \left (2 x-8 x^2\right )+\left (e^2 x+x^2\right ) \log (x)+\left (e^2 \left (-8+x-4 x^2\right )+e^2 x \log (x)\right ) \log \left (-8+x-4 x^2+x \log (x)\right )}{-8 x^2+x^3-4 x^4+e^4 \left (-8+x-4 x^2\right )+e^2 \left (-16 x+2 x^2-8 x^3\right )+\left (e^4 x+2 e^2 x^2+x^3\right ) \log (x)} \, dx=\log {\left (x \right )} + \log {\left (\log {\left (x \right )} + \frac {- 4 x^{2} + x - 8}{x} \right )} - \frac {e^{2} \log {\left (- 4 x^{2} + x \log {\left (x \right )} + x - 8 \right )}}{x + e^{2}} \]

[In]

integrate(((x*exp(2)*ln(x)+(-4*x**2+x-8)*exp(2))*ln(x*ln(x)-4*x**2+x-8)+(exp(2)*x+x**2)*ln(x)+(-8*x**2+2*x)*ex
p(2)-8*x**3+2*x**2)/((x*exp(2)**2+2*x**2*exp(2)+x**3)*ln(x)+(-4*x**2+x-8)*exp(2)**2+(-8*x**3+2*x**2-16*x)*exp(
2)-4*x**4+x**3-8*x**2),x)

[Out]

log(x) + log(log(x) + (-4*x**2 + x - 8)/x) - exp(2)*log(-4*x**2 + x*log(x) + x - 8)/(x + exp(2))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 47 vs. \(2 (23) = 46\).

Time = 0.21 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.96 \[ \int \frac {2 x^2-8 x^3+e^2 \left (2 x-8 x^2\right )+\left (e^2 x+x^2\right ) \log (x)+\left (e^2 \left (-8+x-4 x^2\right )+e^2 x \log (x)\right ) \log \left (-8+x-4 x^2+x \log (x)\right )}{-8 x^2+x^3-4 x^4+e^4 \left (-8+x-4 x^2\right )+e^2 \left (-16 x+2 x^2-8 x^3\right )+\left (e^4 x+2 e^2 x^2+x^3\right ) \log (x)} \, dx=-\frac {e^{2} \log \left (-4 \, x^{2} + x \log \left (x\right ) + x - 8\right )}{x + e^{2}} + \log \left (x\right ) + \log \left (-\frac {4 \, x^{2} - x \log \left (x\right ) - x + 8}{x}\right ) \]

[In]

integrate(((x*exp(2)*log(x)+(-4*x^2+x-8)*exp(2))*log(x*log(x)-4*x^2+x-8)+(exp(2)*x+x^2)*log(x)+(-8*x^2+2*x)*ex
p(2)-8*x^3+2*x^2)/((x*exp(2)^2+2*x^2*exp(2)+x^3)*log(x)+(-4*x^2+x-8)*exp(2)^2+(-8*x^3+2*x^2-16*x)*exp(2)-4*x^4
+x^3-8*x^2),x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.88 \[ \int \frac {2 x^2-8 x^3+e^2 \left (2 x-8 x^2\right )+\left (e^2 x+x^2\right ) \log (x)+\left (e^2 \left (-8+x-4 x^2\right )+e^2 x \log (x)\right ) \log \left (-8+x-4 x^2+x \log (x)\right )}{-8 x^2+x^3-4 x^4+e^4 \left (-8+x-4 x^2\right )+e^2 \left (-16 x+2 x^2-8 x^3\right )+\left (e^4 x+2 e^2 x^2+x^3\right ) \log (x)} \, dx=\frac {x \log \left (-4 \, x^{2} + x \log \left (x\right ) + x - 8\right )}{x + e^{2}} \]

[In]

integrate(((x*exp(2)*log(x)+(-4*x^2+x-8)*exp(2))*log(x*log(x)-4*x^2+x-8)+(exp(2)*x+x^2)*log(x)+(-8*x^2+2*x)*ex
p(2)-8*x^3+2*x^2)/((x*exp(2)^2+2*x^2*exp(2)+x^3)*log(x)+(-4*x^2+x-8)*exp(2)^2+(-8*x^3+2*x^2-16*x)*exp(2)-4*x^4
+x^3-8*x^2),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 15.77 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.79 \[ \int \frac {2 x^2-8 x^3+e^2 \left (2 x-8 x^2\right )+\left (e^2 x+x^2\right ) \log (x)+\left (e^2 \left (-8+x-4 x^2\right )+e^2 x \log (x)\right ) \log \left (-8+x-4 x^2+x \log (x)\right )}{-8 x^2+x^3-4 x^4+e^4 \left (-8+x-4 x^2\right )+e^2 \left (-16 x+2 x^2-8 x^3\right )+\left (e^4 x+2 e^2 x^2+x^3\right ) \log (x)} \, dx=\ln \left (\frac {x+x\,\ln \left (x\right )-4\,x^2-8}{x}\right )+\ln \left (x\right )-\frac {\ln \left (x+x\,\ln \left (x\right )-4\,x^2-8\right )\,{\mathrm {e}}^2}{x+{\mathrm {e}}^2} \]

[In]

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

[Out]

log((x + x*log(x) - 4*x^2 - 8)/x) + log(x) - (log(x + x*log(x) - 4*x^2 - 8)*exp(2))/(x + exp(2))