\(\int \frac {(5-2 x) \log (x)+(-5+x) \log (-5 x+x^2)+(5 x-x^2+(-5 x+x^2) \log (x)) \log ^2(-5 x+x^2)+(-5 x+x^2+(-5 x+x^2) \log (x)) \log (x^2) \log ^2(-5 x+x^2)}{(-5 x+x^2) \log ^2(-5 x+x^2)} \, dx\) [3258]

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

Optimal result

Integrand size = 103, antiderivative size = 21 \[ \int \frac {(5-2 x) \log (x)+(-5+x) \log \left (-5 x+x^2\right )+\left (5 x-x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log ^2\left (-5 x+x^2\right )+\left (-5 x+x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log \left (x^2\right ) \log ^2\left (-5 x+x^2\right )}{\left (-5 x+x^2\right ) \log ^2\left (-5 x+x^2\right )} \, dx=\log (x) \left (-x+\frac {1}{\log ((-5+x) x)}+x \log \left (x^2\right )\right ) \]

[Out]

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

Rubi [F]

\[ \int \frac {(5-2 x) \log (x)+(-5+x) \log \left (-5 x+x^2\right )+\left (5 x-x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log ^2\left (-5 x+x^2\right )+\left (-5 x+x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log \left (x^2\right ) \log ^2\left (-5 x+x^2\right )}{\left (-5 x+x^2\right ) \log ^2\left (-5 x+x^2\right )} \, dx=\int \frac {(5-2 x) \log (x)+(-5+x) \log \left (-5 x+x^2\right )+\left (5 x-x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log ^2\left (-5 x+x^2\right )+\left (-5 x+x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log \left (x^2\right ) \log ^2\left (-5 x+x^2\right )}{\left (-5 x+x^2\right ) \log ^2\left (-5 x+x^2\right )} \, dx \]

[In]

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

[Out]

-(x*Log[x]) + x*Log[x]*Log[x^2] - Defer[Int][Log[x]/((-5 + x)*Log[(-5 + x)*x]^2), x] - Defer[Int][Log[x]/(x*Lo
g[(-5 + x)*x]^2), x] + Defer[Int][1/(x*Log[(-5 + x)*x]), x]

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

Mathematica [A] (verified)

Time = 0.23 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.95 \[ \int \frac {(5-2 x) \log (x)+(-5+x) \log \left (-5 x+x^2\right )+\left (5 x-x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log ^2\left (-5 x+x^2\right )+\left (-5 x+x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log \left (x^2\right ) \log ^2\left (-5 x+x^2\right )}{\left (-5 x+x^2\right ) \log ^2\left (-5 x+x^2\right )} \, dx=\log (x) \left (\frac {1}{\log ((-5+x) x)}+x \left (-1+\log \left (x^2\right )\right )\right ) \]

[In]

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

[Out]

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

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(93\) vs. \(2(21)=42\).

Time = 4.72 (sec) , antiderivative size = 94, normalized size of antiderivative = 4.48

method result size
parallelrisch \(\frac {-240 \ln \left (x \right ) \ln \left (x^{2}-5 x \right ) x +240 \ln \left (x \right )+240 \ln \left (x^{2}\right ) x \ln \left (x \right ) \ln \left (x^{2}-5 x \right )+2400 \ln \left (x^{2}-5 x \right ) \ln \left (x \right ) \ln \left (x^{2}\right )-2400 \ln \left (x \right )^{2} \ln \left (x^{2}-5 x \right )-600 \ln \left (x^{2}\right )^{2} \ln \left (x^{2}-5 x \right )}{240 \ln \left (x^{2}-5 x \right )}\) \(94\)
risch \(2 x \ln \left (x \right )^{2}-\frac {i \pi x \operatorname {csgn}\left (i x \right )^{2} \operatorname {csgn}\left (i x^{2}\right ) \ln \left (x \right )}{2}+i \pi x \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x^{2}\right )^{2} \ln \left (x \right )-\frac {i \pi x \operatorname {csgn}\left (i x^{2}\right )^{3} \ln \left (x \right )}{2}-x \ln \left (x \right )+\frac {2 \ln \left (x \right )}{2 \ln \left (x \right )+2 \ln \left (-5+x \right )+i \pi \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x \left (-5+x \right )\right )^{2}-i \pi \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x \left (-5+x \right )\right ) \operatorname {csgn}\left (i \left (-5+x \right )\right )-i \pi \operatorname {csgn}\left (i x \left (-5+x \right )\right )^{3}+i \pi \operatorname {csgn}\left (i x \left (-5+x \right )\right )^{2} \operatorname {csgn}\left (i \left (-5+x \right )\right )}\) \(167\)

[In]

int((((x^2-5*x)*ln(x)+x^2-5*x)*ln(x^2-5*x)^2*ln(x^2)+((x^2-5*x)*ln(x)-x^2+5*x)*ln(x^2-5*x)^2+(-5+x)*ln(x^2-5*x
)+(5-2*x)*ln(x))/(x^2-5*x)/ln(x^2-5*x)^2,x,method=_RETURNVERBOSE)

[Out]

1/240*(-240*ln(x)*ln(x^2-5*x)*x+240*ln(x)+240*ln(x^2)*x*ln(x)*ln(x^2-5*x)+2400*ln(x^2-5*x)*ln(x)*ln(x^2)-2400*
ln(x)^2*ln(x^2-5*x)-600*ln(x^2)^2*ln(x^2-5*x))/ln(x^2-5*x)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.71 \[ \int \frac {(5-2 x) \log (x)+(-5+x) \log \left (-5 x+x^2\right )+\left (5 x-x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log ^2\left (-5 x+x^2\right )+\left (-5 x+x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log \left (x^2\right ) \log ^2\left (-5 x+x^2\right )}{\left (-5 x+x^2\right ) \log ^2\left (-5 x+x^2\right )} \, dx=\frac {{\left (2 \, x \log \left (x\right )^{2} - x \log \left (x\right )\right )} \log \left (x^{2} - 5 \, x\right ) + \log \left (x\right )}{\log \left (x^{2} - 5 \, x\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.14 \[ \int \frac {(5-2 x) \log (x)+(-5+x) \log \left (-5 x+x^2\right )+\left (5 x-x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log ^2\left (-5 x+x^2\right )+\left (-5 x+x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log \left (x^2\right ) \log ^2\left (-5 x+x^2\right )}{\left (-5 x+x^2\right ) \log ^2\left (-5 x+x^2\right )} \, dx=2 x \log {\left (x \right )}^{2} - x \log {\left (x \right )} + \frac {\log {\left (x \right )}}{\log {\left (x^{2} - 5 x \right )}} \]

[In]

integrate((((x**2-5*x)*ln(x)+x**2-5*x)*ln(x**2-5*x)**2*ln(x**2)+((x**2-5*x)*ln(x)-x**2+5*x)*ln(x**2-5*x)**2+(-
5+x)*ln(x**2-5*x)+(5-2*x)*ln(x))/(x**2-5*x)/ln(x**2-5*x)**2,x)

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 45 vs. \(2 (21) = 42\).

Time = 0.24 (sec) , antiderivative size = 45, normalized size of antiderivative = 2.14 \[ \int \frac {(5-2 x) \log (x)+(-5+x) \log \left (-5 x+x^2\right )+\left (5 x-x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log ^2\left (-5 x+x^2\right )+\left (-5 x+x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log \left (x^2\right ) \log ^2\left (-5 x+x^2\right )}{\left (-5 x+x^2\right ) \log ^2\left (-5 x+x^2\right )} \, dx=\frac {2 \, x \log \left (x\right )^{3} - x \log \left (x\right )^{2} + {\left (2 \, x \log \left (x\right )^{2} - x \log \left (x\right )\right )} \log \left (x - 5\right ) + \log \left (x\right )}{\log \left (x - 5\right ) + \log \left (x\right )} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.19 \[ \int \frac {(5-2 x) \log (x)+(-5+x) \log \left (-5 x+x^2\right )+\left (5 x-x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log ^2\left (-5 x+x^2\right )+\left (-5 x+x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log \left (x^2\right ) \log ^2\left (-5 x+x^2\right )}{\left (-5 x+x^2\right ) \log ^2\left (-5 x+x^2\right )} \, dx=2 \, x \log \left (x\right )^{2} - x \log \left (x\right ) + \frac {\log \left (x\right )}{\log \left (x - 5\right ) + \log \left (x\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 10.27 (sec) , antiderivative size = 55, normalized size of antiderivative = 2.62 \[ \int \frac {(5-2 x) \log (x)+(-5+x) \log \left (-5 x+x^2\right )+\left (5 x-x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log ^2\left (-5 x+x^2\right )+\left (-5 x+x^2+\left (-5 x+x^2\right ) \log (x)\right ) \log \left (x^2\right ) \log ^2\left (-5 x+x^2\right )}{\left (-5 x+x^2\right ) \log ^2\left (-5 x+x^2\right )} \, dx=\frac {\ln \left (x\right )}{\ln \left (x^2-5\,x\right )}-\frac {5}{4\,\left (x-\frac {5}{2}\right )}-\frac {x}{2\,x-5}+\frac {5}{2\,x-5}-x\,\ln \left (x\right )+x\,\ln \left (x^2\right )\,\ln \left (x\right ) \]

[In]

int((log(x)*(2*x - 5) - log(x^2 - 5*x)*(x - 5) + log(x^2 - 5*x)^2*(log(x)*(5*x - x^2) - 5*x + x^2) + log(x^2)*
log(x^2 - 5*x)^2*(5*x + log(x)*(5*x - x^2) - x^2))/(log(x^2 - 5*x)^2*(5*x - x^2)),x)

[Out]

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