\(\int \frac {-5+e^4-x+x^2+(-5+e^4-x^2) \log (x)+(4-e) \log ^2(x)}{25+e^8+10 x-9 x^2-2 x^3+x^4+e^4 (-10-2 x+2 x^2)+(-40+(8-2 e) e^4-8 x+8 x^2+e (10+2 x-2 x^2)) \log (x)+(16-8 e+e^2) \log ^2(x)} \, dx\) [6470]

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

Optimal result

Integrand size = 119, antiderivative size = 33 \[ \int \frac {-5+e^4-x+x^2+\left (-5+e^4-x^2\right ) \log (x)+(4-e) \log ^2(x)}{25+e^8+10 x-9 x^2-2 x^3+x^4+e^4 \left (-10-2 x+2 x^2\right )+\left (-40+(8-2 e) e^4-8 x+8 x^2+e \left (10+2 x-2 x^2\right )\right ) \log (x)+\left (16-8 e+e^2\right ) \log ^2(x)} \, dx=\frac {x^2}{2 x+x \left (2-e+\frac {-5+e^4-x+x^2}{\log (x)}\right )} \]

[Out]

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

Rubi [F]

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

[In]

Int[(-5 + E^4 - x + x^2 + (-5 + E^4 - x^2)*Log[x] + (4 - E)*Log[x]^2)/(25 + E^8 + 10*x - 9*x^2 - 2*x^3 + x^4 +
 E^4*(-10 - 2*x + 2*x^2) + (-40 + (8 - 2*E)*E^4 - 8*x + 8*x^2 + E*(10 + 2*x - 2*x^2))*Log[x] + (16 - 8*E + E^2
)*Log[x]^2),x]

[Out]

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

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

Mathematica [A] (verified)

Time = 0.34 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.73 \[ \int \frac {-5+e^4-x+x^2+\left (-5+e^4-x^2\right ) \log (x)+(4-e) \log ^2(x)}{25+e^8+10 x-9 x^2-2 x^3+x^4+e^4 \left (-10-2 x+2 x^2\right )+\left (-40+(8-2 e) e^4-8 x+8 x^2+e \left (10+2 x-2 x^2\right )\right ) \log (x)+\left (16-8 e+e^2\right ) \log ^2(x)} \, dx=\frac {x \log (x)}{-5+e^4-x+x^2-(-4+e) \log (x)} \]

[In]

Integrate[(-5 + E^4 - x + x^2 + (-5 + E^4 - x^2)*Log[x] + (4 - E)*Log[x]^2)/(25 + E^8 + 10*x - 9*x^2 - 2*x^3 +
 x^4 + E^4*(-10 - 2*x + 2*x^2) + (-40 + (8 - 2*E)*E^4 - 8*x + 8*x^2 + E*(10 + 2*x - 2*x^2))*Log[x] + (16 - 8*E
 + E^2)*Log[x]^2),x]

[Out]

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

Maple [A] (verified)

Time = 1.43 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.88

method result size
default \(-\frac {x \ln \left (x \right )}{{\mathrm e} \ln \left (x \right )-x^{2}-4 \ln \left (x \right )-{\mathrm e}^{4}+x +5}\) \(29\)
norman \(-\frac {x \ln \left (x \right )}{{\mathrm e} \ln \left (x \right )-x^{2}-4 \ln \left (x \right )-{\mathrm e}^{4}+x +5}\) \(29\)
parallelrisch \(-\frac {x \ln \left (x \right )}{{\mathrm e} \ln \left (x \right )-x^{2}-4 \ln \left (x \right )-{\mathrm e}^{4}+x +5}\) \(29\)
risch \(-\frac {x}{{\mathrm e}-4}+\frac {x \left ({\mathrm e}^{4}+x^{2}-x -5\right )}{\left ({\mathrm e}-4\right ) \left ({\mathrm e}^{4}-{\mathrm e} \ln \left (x \right )+x^{2}-x +4 \ln \left (x \right )-5\right )}\) \(51\)

[In]

int(((4-exp(1))*ln(x)^2+(exp(4)-x^2-5)*ln(x)+exp(4)+x^2-x-5)/((exp(1)^2-8*exp(1)+16)*ln(x)^2+((-2*exp(1)+8)*ex
p(4)+(-2*x^2+2*x+10)*exp(1)+8*x^2-8*x-40)*ln(x)+exp(4)^2+(2*x^2-2*x-10)*exp(4)+x^4-2*x^3-9*x^2+10*x+25),x,meth
od=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.73 \[ \int \frac {-5+e^4-x+x^2+\left (-5+e^4-x^2\right ) \log (x)+(4-e) \log ^2(x)}{25+e^8+10 x-9 x^2-2 x^3+x^4+e^4 \left (-10-2 x+2 x^2\right )+\left (-40+(8-2 e) e^4-8 x+8 x^2+e \left (10+2 x-2 x^2\right )\right ) \log (x)+\left (16-8 e+e^2\right ) \log ^2(x)} \, dx=\frac {x \log \left (x\right )}{x^{2} - {\left (e - 4\right )} \log \left (x\right ) - x + e^{4} - 5} \]

[In]

integrate(((4-exp(1))*log(x)^2+(exp(4)-x^2-5)*log(x)+exp(4)+x^2-x-5)/((exp(1)^2-8*exp(1)+16)*log(x)^2+((-2*exp
(1)+8)*exp(4)+(-2*x^2+2*x+10)*exp(1)+8*x^2-8*x-40)*log(x)+exp(4)^2+(2*x^2-2*x-10)*exp(4)+x^4-2*x^3-9*x^2+10*x+
25),x, algorithm="fricas")

[Out]

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

Sympy [B] (verification not implemented)

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

Time = 0.16 (sec) , antiderivative size = 70, normalized size of antiderivative = 2.12 \[ \int \frac {-5+e^4-x+x^2+\left (-5+e^4-x^2\right ) \log (x)+(4-e) \log ^2(x)}{25+e^8+10 x-9 x^2-2 x^3+x^4+e^4 \left (-10-2 x+2 x^2\right )+\left (-40+(8-2 e) e^4-8 x+8 x^2+e \left (10+2 x-2 x^2\right )\right ) \log (x)+\left (16-8 e+e^2\right ) \log ^2(x)} \, dx=- \frac {x}{-4 + e} + \frac {- x^{3} + x^{2} - x e^{4} + 5 x}{- e x^{2} + 4 x^{2} - 4 x + e x + \left (- 8 e + e^{2} + 16\right ) \log {\left (x \right )} - e^{5} - 20 + 5 e + 4 e^{4}} \]

[In]

integrate(((4-exp(1))*ln(x)**2+(exp(4)-x**2-5)*ln(x)+exp(4)+x**2-x-5)/((exp(1)**2-8*exp(1)+16)*ln(x)**2+((-2*e
xp(1)+8)*exp(4)+(-2*x**2+2*x+10)*exp(1)+8*x**2-8*x-40)*ln(x)+exp(4)**2+(2*x**2-2*x-10)*exp(4)+x**4-2*x**3-9*x*
*2+10*x+25),x)

[Out]

-x/(-4 + E) + (-x**3 + x**2 - x*exp(4) + 5*x)/(-E*x**2 + 4*x**2 - 4*x + E*x + (-8*E + exp(2) + 16)*log(x) - ex
p(5) - 20 + 5*E + 4*exp(4))

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.73 \[ \int \frac {-5+e^4-x+x^2+\left (-5+e^4-x^2\right ) \log (x)+(4-e) \log ^2(x)}{25+e^8+10 x-9 x^2-2 x^3+x^4+e^4 \left (-10-2 x+2 x^2\right )+\left (-40+(8-2 e) e^4-8 x+8 x^2+e \left (10+2 x-2 x^2\right )\right ) \log (x)+\left (16-8 e+e^2\right ) \log ^2(x)} \, dx=\frac {x \log \left (x\right )}{x^{2} - {\left (e - 4\right )} \log \left (x\right ) - x + e^{4} - 5} \]

[In]

integrate(((4-exp(1))*log(x)^2+(exp(4)-x^2-5)*log(x)+exp(4)+x^2-x-5)/((exp(1)^2-8*exp(1)+16)*log(x)^2+((-2*exp
(1)+8)*exp(4)+(-2*x^2+2*x+10)*exp(1)+8*x^2-8*x-40)*log(x)+exp(4)^2+(2*x^2-2*x-10)*exp(4)+x^4-2*x^3-9*x^2+10*x+
25),x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.79 \[ \int \frac {-5+e^4-x+x^2+\left (-5+e^4-x^2\right ) \log (x)+(4-e) \log ^2(x)}{25+e^8+10 x-9 x^2-2 x^3+x^4+e^4 \left (-10-2 x+2 x^2\right )+\left (-40+(8-2 e) e^4-8 x+8 x^2+e \left (10+2 x-2 x^2\right )\right ) \log (x)+\left (16-8 e+e^2\right ) \log ^2(x)} \, dx=\frac {x \log \left (x\right )}{x^{2} - e \log \left (x\right ) - x + e^{4} + 4 \, \log \left (x\right ) - 5} \]

[In]

integrate(((4-exp(1))*log(x)^2+(exp(4)-x^2-5)*log(x)+exp(4)+x^2-x-5)/((exp(1)^2-8*exp(1)+16)*log(x)^2+((-2*exp
(1)+8)*exp(4)+(-2*x^2+2*x+10)*exp(1)+8*x^2-8*x-40)*log(x)+exp(4)^2+(2*x^2-2*x-10)*exp(4)+x^4-2*x^3-9*x^2+10*x+
25),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 13.44 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.94 \[ \int \frac {-5+e^4-x+x^2+\left (-5+e^4-x^2\right ) \log (x)+(4-e) \log ^2(x)}{25+e^8+10 x-9 x^2-2 x^3+x^4+e^4 \left (-10-2 x+2 x^2\right )+\left (-40+(8-2 e) e^4-8 x+8 x^2+e \left (10+2 x-2 x^2\right )\right ) \log (x)+\left (16-8 e+e^2\right ) \log ^2(x)} \, dx=\frac {x-{\mathrm {e}}^4-4\,\ln \left (x\right )+\mathrm {e}\,\ln \left (x\right )+16\,x\,\ln \left (x\right )-x^2-4\,x\,\mathrm {e}\,\ln \left (x\right )+5}{4\,\left (\mathrm {e}-4\right )\,\left (x-{\mathrm {e}}^4-4\,\ln \left (x\right )+\mathrm {e}\,\ln \left (x\right )-x^2+5\right )} \]

[In]

int(-(x - exp(4) + log(x)*(x^2 - exp(4) + 5) + log(x)^2*(exp(1) - 4) - x^2 + 5)/(10*x + exp(8) + log(x)^2*(exp
(2) - 8*exp(1) + 16) - exp(4)*(2*x - 2*x^2 + 10) - log(x)*(8*x - exp(1)*(2*x - 2*x^2 + 10) - 8*x^2 + exp(4)*(2
*exp(1) - 8) + 40) - 9*x^2 - 2*x^3 + x^4 + 25),x)

[Out]

(x - exp(4) - 4*log(x) + exp(1)*log(x) + 16*x*log(x) - x^2 - 4*x*exp(1)*log(x) + 5)/(4*(exp(1) - 4)*(x - exp(4
) - 4*log(x) + exp(1)*log(x) - x^2 + 5))