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

Optimal result
Mathematica [A] (verified)
Rubi [F]
Maple [C] (warning: unable to verify)
Fricas [A] (verification not implemented)
Sympy [A] (verification not implemented)
Maxima [B] (verification not implemented)
Giac [B] (verification not implemented)
Mupad [F(-1)]
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 328, antiderivative size = 32 \[ \int \frac {-x-x^2+4 x^3+e^4 (-2+2 x)+\left (2-4 x+e^4 \left (-2 x+2 x^2\right )\right ) \log (x)+e^8 \left (-x+x^2\right ) \log ^2(x)+\left (2-2 x-4 x^2+2 x^3+2 x^4+\left (2 x-2 x^2+e^4 \left (-2 x^3+2 x^4\right )\right ) \log (x)+e^4 \left (2 x-2 x^2\right ) \log ^2(x)\right ) \log \left (-x+x^2\right )+\left (-x^5+x^6+\left (2 x^3-2 x^4\right ) \log (x)+\left (-x+x^2\right ) \log ^2(x)\right ) \log ^2\left (-x+x^2\right )}{-x+x^2+e^4 \left (-2 x+2 x^2\right ) \log (x)+e^8 \left (-x+x^2\right ) \log ^2(x)+\left (-2 x^3+2 x^4+\left (2 x-2 x^2+e^4 \left (-2 x^3+2 x^4\right )\right ) \log (x)+e^4 \left (2 x-2 x^2\right ) \log ^2(x)\right ) \log \left (-x+x^2\right )+\left (-x^5+x^6+\left (2 x^3-2 x^4\right ) \log (x)+\left (-x+x^2\right ) \log ^2(x)\right ) \log ^2\left (-x+x^2\right )} \, dx=-3+x-\frac {2}{1+e^4 \log (x)+\left (x^2-\log (x)\right ) \log \left (-x+x^2\right )} \] Output:

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

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.06 \[ \int \frac {-x-x^2+4 x^3+e^4 (-2+2 x)+\left (2-4 x+e^4 \left (-2 x+2 x^2\right )\right ) \log (x)+e^8 \left (-x+x^2\right ) \log ^2(x)+\left (2-2 x-4 x^2+2 x^3+2 x^4+\left (2 x-2 x^2+e^4 \left (-2 x^3+2 x^4\right )\right ) \log (x)+e^4 \left (2 x-2 x^2\right ) \log ^2(x)\right ) \log \left (-x+x^2\right )+\left (-x^5+x^6+\left (2 x^3-2 x^4\right ) \log (x)+\left (-x+x^2\right ) \log ^2(x)\right ) \log ^2\left (-x+x^2\right )}{-x+x^2+e^4 \left (-2 x+2 x^2\right ) \log (x)+e^8 \left (-x+x^2\right ) \log ^2(x)+\left (-2 x^3+2 x^4+\left (2 x-2 x^2+e^4 \left (-2 x^3+2 x^4\right )\right ) \log (x)+e^4 \left (2 x-2 x^2\right ) \log ^2(x)\right ) \log \left (-x+x^2\right )+\left (-x^5+x^6+\left (2 x^3-2 x^4\right ) \log (x)+\left (-x+x^2\right ) \log ^2(x)\right ) \log ^2\left (-x+x^2\right )} \, dx=x-\frac {2}{1+e^4 \log (x)+x^2 \log ((-1+x) x)-\log (x) \log ((-1+x) x)} \] Input:

Integrate[(-x - x^2 + 4*x^3 + E^4*(-2 + 2*x) + (2 - 4*x + E^4*(-2*x + 2*x^ 
2))*Log[x] + E^8*(-x + x^2)*Log[x]^2 + (2 - 2*x - 4*x^2 + 2*x^3 + 2*x^4 + 
(2*x - 2*x^2 + E^4*(-2*x^3 + 2*x^4))*Log[x] + E^4*(2*x - 2*x^2)*Log[x]^2)* 
Log[-x + x^2] + (-x^5 + x^6 + (2*x^3 - 2*x^4)*Log[x] + (-x + x^2)*Log[x]^2 
)*Log[-x + x^2]^2)/(-x + x^2 + E^4*(-2*x + 2*x^2)*Log[x] + E^8*(-x + x^2)* 
Log[x]^2 + (-2*x^3 + 2*x^4 + (2*x - 2*x^2 + E^4*(-2*x^3 + 2*x^4))*Log[x] + 
 E^4*(2*x - 2*x^2)*Log[x]^2)*Log[-x + x^2] + (-x^5 + x^6 + (2*x^3 - 2*x^4) 
*Log[x] + (-x + x^2)*Log[x]^2)*Log[-x + x^2]^2),x]
 

Output:

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

Rubi [F]

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {4 x^3-x^2+e^8 \left (x^2-x\right ) \log ^2(x)+\left (e^4 \left (2 x^2-2 x\right )-4 x+2\right ) \log (x)+\left (2 x^4+2 x^3-4 x^2+e^4 \left (2 x-2 x^2\right ) \log ^2(x)+\left (-2 x^2+e^4 \left (2 x^4-2 x^3\right )+2 x\right ) \log (x)-2 x+2\right ) \log \left (x^2-x\right )+\left (x^6-x^5+\left (x^2-x\right ) \log ^2(x)+\left (2 x^3-2 x^4\right ) \log (x)\right ) \log ^2\left (x^2-x\right )-x+e^4 (2 x-2)}{x^2+e^8 \left (x^2-x\right ) \log ^2(x)+e^4 \left (2 x^2-2 x\right ) \log (x)+\left (2 x^4-2 x^3+e^4 \left (2 x-2 x^2\right ) \log ^2(x)+\left (-2 x^2+e^4 \left (2 x^4-2 x^3\right )+2 x\right ) \log (x)\right ) \log \left (x^2-x\right )+\left (x^6-x^5+\left (x^2-x\right ) \log ^2(x)+\left (2 x^3-2 x^4\right ) \log (x)\right ) \log ^2\left (x^2-x\right )-x} \, dx\)

\(\Big \downarrow \) 7239

\(\displaystyle \int \frac {-\left ((x-1) x^5 \log ^2((x-1) x)\right )-4 x^3+x^2-2 \log (x) \left (-\left ((x-1) x^3 \log ^2((x-1) x)\right )+e^4 x^2+(x-1) \left (e^4 x^2-1\right ) x \log ((x-1) x)-\left (2+e^4\right ) x+1\right )-2 \left (x^4+x^3-2 x^2-x+1\right ) \log ((x-1) x)+\left (1-2 e^4\right ) x-(x-1) x \log ^2(x) \left (e^4-\log ((x-1) x)\right )^2+2 e^4}{(1-x) x \left (x^2 \log ((x-1) x)+\log (x) \left (e^4-\log ((x-1) x)\right )+1\right )^2}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {2 \left (2 x^2-1\right )}{x \left (x^2-\log (x)\right ) \left (x^2 \log ((x-1) x)+e^4 \log (x)-\log (x) \log ((x-1) x)+1\right )}+\frac {2 \left (-2 x^5+x^4+2 \left (1-\frac {e^4}{2}\right ) x^3+4 \left (1+\frac {e^4}{2}\right ) x^3 \log (x)-2 \left (1-\frac {e^4}{2}\right ) x^2-2 \left (1+e^4\right ) x^2 \log (x)-x-2 x \log ^2(x)+\log ^2(x)+1\right )}{(1-x) x \left (x^2-\log (x)\right ) \left (x^2 \log ((x-1) x)+e^4 \log (x)-\log (x) \log ((x-1) x)+1\right )^2}+1\right )dx\)

\(\Big \downarrow \) 7299

\(\displaystyle \int \left (\frac {2 \left (2 x^2-1\right )}{x \left (x^2-\log (x)\right ) \left (x^2 \log ((x-1) x)+e^4 \log (x)-\log (x) \log ((x-1) x)+1\right )}+\frac {2 \left (-2 x^5+x^4+2 \left (1-\frac {e^4}{2}\right ) x^3+4 \left (1+\frac {e^4}{2}\right ) x^3 \log (x)-2 \left (1-\frac {e^4}{2}\right ) x^2-2 \left (1+e^4\right ) x^2 \log (x)-x-2 x \log ^2(x)+\log ^2(x)+1\right )}{(1-x) x \left (x^2-\log (x)\right ) \left (x^2 \log ((x-1) x)+e^4 \log (x)-\log (x) \log ((x-1) x)+1\right )^2}+1\right )dx\)

Input:

Int[(-x - x^2 + 4*x^3 + E^4*(-2 + 2*x) + (2 - 4*x + E^4*(-2*x + 2*x^2))*Lo 
g[x] + E^8*(-x + x^2)*Log[x]^2 + (2 - 2*x - 4*x^2 + 2*x^3 + 2*x^4 + (2*x - 
 2*x^2 + E^4*(-2*x^3 + 2*x^4))*Log[x] + E^4*(2*x - 2*x^2)*Log[x]^2)*Log[-x 
 + x^2] + (-x^5 + x^6 + (2*x^3 - 2*x^4)*Log[x] + (-x + x^2)*Log[x]^2)*Log[ 
-x + x^2]^2)/(-x + x^2 + E^4*(-2*x + 2*x^2)*Log[x] + E^8*(-x + x^2)*Log[x] 
^2 + (-2*x^3 + 2*x^4 + (2*x - 2*x^2 + E^4*(-2*x^3 + 2*x^4))*Log[x] + E^4*( 
2*x - 2*x^2)*Log[x]^2)*Log[-x + x^2] + (-x^5 + x^6 + (2*x^3 - 2*x^4)*Log[x 
] + (-x + x^2)*Log[x]^2)*Log[-x + x^2]^2),x]
 

Output:

$Aborted
 
Maple [C] (warning: unable to verify)

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

Time = 2.70 (sec) , antiderivative size = 221, normalized size of antiderivative = 6.91

\[x -\frac {4}{-i \pi \,x^{2} \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i \left (-1+x \right )\right ) \operatorname {csgn}\left (i x \left (-1+x \right )\right )+i \pi \,x^{2} \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x \left (-1+x \right )\right )^{2}+i \pi \,x^{2} \operatorname {csgn}\left (i \left (-1+x \right )\right ) \operatorname {csgn}\left (i x \left (-1+x \right )\right )^{2}-i \pi \,x^{2} \operatorname {csgn}\left (i x \left (-1+x \right )\right )^{3}+i \ln \left (x \right ) \pi \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i \left (-1+x \right )\right ) \operatorname {csgn}\left (i x \left (-1+x \right )\right )-i \ln \left (x \right ) \pi \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x \left (-1+x \right )\right )^{2}-i \ln \left (x \right ) \pi \,\operatorname {csgn}\left (i \left (-1+x \right )\right ) \operatorname {csgn}\left (i x \left (-1+x \right )\right )^{2}+i \ln \left (x \right ) \pi \operatorname {csgn}\left (i x \left (-1+x \right )\right )^{3}+2 x^{2} \ln \left (x \right )+2 x^{2} \ln \left (-1+x \right )+2 \,{\mathrm e}^{4} \ln \left (x \right )-2 \ln \left (x \right )^{2}-2 \ln \left (x \right ) \ln \left (-1+x \right )+2}\]

Input:

int((((x^2-x)*ln(x)^2+(-2*x^4+2*x^3)*ln(x)+x^6-x^5)*ln(x^2-x)^2+((-2*x^2+2 
*x)*exp(4)*ln(x)^2+((2*x^4-2*x^3)*exp(4)-2*x^2+2*x)*ln(x)+2*x^4+2*x^3-4*x^ 
2-2*x+2)*ln(x^2-x)+(x^2-x)*exp(4)^2*ln(x)^2+((2*x^2-2*x)*exp(4)-4*x+2)*ln( 
x)+(-2+2*x)*exp(4)+4*x^3-x^2-x)/(((x^2-x)*ln(x)^2+(-2*x^4+2*x^3)*ln(x)+x^6 
-x^5)*ln(x^2-x)^2+((-2*x^2+2*x)*exp(4)*ln(x)^2+((2*x^4-2*x^3)*exp(4)-2*x^2 
+2*x)*ln(x)+2*x^4-2*x^3)*ln(x^2-x)+(x^2-x)*exp(4)^2*ln(x)^2+(2*x^2-2*x)*ex 
p(4)*ln(x)+x^2-x),x)
 

Output:

x-4/(-I*Pi*x^2*csgn(I*x)*csgn(I*(-1+x))*csgn(I*x*(-1+x))+I*Pi*x^2*csgn(I*x 
)*csgn(I*x*(-1+x))^2+I*Pi*x^2*csgn(I*(-1+x))*csgn(I*x*(-1+x))^2-I*Pi*x^2*c 
sgn(I*x*(-1+x))^3+I*ln(x)*Pi*csgn(I*x)*csgn(I*(-1+x))*csgn(I*x*(-1+x))-I*l 
n(x)*Pi*csgn(I*x)*csgn(I*x*(-1+x))^2-I*ln(x)*Pi*csgn(I*(-1+x))*csgn(I*x*(- 
1+x))^2+I*ln(x)*Pi*csgn(I*x*(-1+x))^3+2*x^2*ln(x)+2*x^2*ln(-1+x)+2*exp(4)* 
ln(x)-2*ln(x)^2-2*ln(x)*ln(-1+x)+2)
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.69 \[ \int \frac {-x-x^2+4 x^3+e^4 (-2+2 x)+\left (2-4 x+e^4 \left (-2 x+2 x^2\right )\right ) \log (x)+e^8 \left (-x+x^2\right ) \log ^2(x)+\left (2-2 x-4 x^2+2 x^3+2 x^4+\left (2 x-2 x^2+e^4 \left (-2 x^3+2 x^4\right )\right ) \log (x)+e^4 \left (2 x-2 x^2\right ) \log ^2(x)\right ) \log \left (-x+x^2\right )+\left (-x^5+x^6+\left (2 x^3-2 x^4\right ) \log (x)+\left (-x+x^2\right ) \log ^2(x)\right ) \log ^2\left (-x+x^2\right )}{-x+x^2+e^4 \left (-2 x+2 x^2\right ) \log (x)+e^8 \left (-x+x^2\right ) \log ^2(x)+\left (-2 x^3+2 x^4+\left (2 x-2 x^2+e^4 \left (-2 x^3+2 x^4\right )\right ) \log (x)+e^4 \left (2 x-2 x^2\right ) \log ^2(x)\right ) \log \left (-x+x^2\right )+\left (-x^5+x^6+\left (2 x^3-2 x^4\right ) \log (x)+\left (-x+x^2\right ) \log ^2(x)\right ) \log ^2\left (-x+x^2\right )} \, dx=\frac {x e^{4} \log \left (x\right ) + {\left (x^{3} - x \log \left (x\right )\right )} \log \left (x^{2} - x\right ) + x - 2}{{\left (x^{2} - \log \left (x\right )\right )} \log \left (x^{2} - x\right ) + e^{4} \log \left (x\right ) + 1} \] Input:

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

Output:

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

Sympy [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.75 \[ \int \frac {-x-x^2+4 x^3+e^4 (-2+2 x)+\left (2-4 x+e^4 \left (-2 x+2 x^2\right )\right ) \log (x)+e^8 \left (-x+x^2\right ) \log ^2(x)+\left (2-2 x-4 x^2+2 x^3+2 x^4+\left (2 x-2 x^2+e^4 \left (-2 x^3+2 x^4\right )\right ) \log (x)+e^4 \left (2 x-2 x^2\right ) \log ^2(x)\right ) \log \left (-x+x^2\right )+\left (-x^5+x^6+\left (2 x^3-2 x^4\right ) \log (x)+\left (-x+x^2\right ) \log ^2(x)\right ) \log ^2\left (-x+x^2\right )}{-x+x^2+e^4 \left (-2 x+2 x^2\right ) \log (x)+e^8 \left (-x+x^2\right ) \log ^2(x)+\left (-2 x^3+2 x^4+\left (2 x-2 x^2+e^4 \left (-2 x^3+2 x^4\right )\right ) \log (x)+e^4 \left (2 x-2 x^2\right ) \log ^2(x)\right ) \log \left (-x+x^2\right )+\left (-x^5+x^6+\left (2 x^3-2 x^4\right ) \log (x)+\left (-x+x^2\right ) \log ^2(x)\right ) \log ^2\left (-x+x^2\right )} \, dx=x - \frac {2}{\left (x^{2} - \log {\left (x \right )}\right ) \log {\left (x^{2} - x \right )} + e^{4} \log {\left (x \right )} + 1} \] Input:

integrate((((x**2-x)*ln(x)**2+(-2*x**4+2*x**3)*ln(x)+x**6-x**5)*ln(x**2-x) 
**2+((-2*x**2+2*x)*exp(4)*ln(x)**2+((2*x**4-2*x**3)*exp(4)-2*x**2+2*x)*ln( 
x)+2*x**4+2*x**3-4*x**2-2*x+2)*ln(x**2-x)+(x**2-x)*exp(4)**2*ln(x)**2+((2* 
x**2-2*x)*exp(4)-4*x+2)*ln(x)+(2*x-2)*exp(4)+4*x**3-x**2-x)/(((x**2-x)*ln( 
x)**2+(-2*x**4+2*x**3)*ln(x)+x**6-x**5)*ln(x**2-x)**2+((-2*x**2+2*x)*exp(4 
)*ln(x)**2+((2*x**4-2*x**3)*exp(4)-2*x**2+2*x)*ln(x)+2*x**4-2*x**3)*ln(x** 
2-x)+(x**2-x)*exp(4)**2*ln(x)**2+(2*x**2-2*x)*exp(4)*ln(x)+x**2-x),x)
 

Output:

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 72 vs. \(2 (31) = 62\).

Time = 0.15 (sec) , antiderivative size = 72, normalized size of antiderivative = 2.25 \[ \int \frac {-x-x^2+4 x^3+e^4 (-2+2 x)+\left (2-4 x+e^4 \left (-2 x+2 x^2\right )\right ) \log (x)+e^8 \left (-x+x^2\right ) \log ^2(x)+\left (2-2 x-4 x^2+2 x^3+2 x^4+\left (2 x-2 x^2+e^4 \left (-2 x^3+2 x^4\right )\right ) \log (x)+e^4 \left (2 x-2 x^2\right ) \log ^2(x)\right ) \log \left (-x+x^2\right )+\left (-x^5+x^6+\left (2 x^3-2 x^4\right ) \log (x)+\left (-x+x^2\right ) \log ^2(x)\right ) \log ^2\left (-x+x^2\right )}{-x+x^2+e^4 \left (-2 x+2 x^2\right ) \log (x)+e^8 \left (-x+x^2\right ) \log ^2(x)+\left (-2 x^3+2 x^4+\left (2 x-2 x^2+e^4 \left (-2 x^3+2 x^4\right )\right ) \log (x)+e^4 \left (2 x-2 x^2\right ) \log ^2(x)\right ) \log \left (-x+x^2\right )+\left (-x^5+x^6+\left (2 x^3-2 x^4\right ) \log (x)+\left (-x+x^2\right ) \log ^2(x)\right ) \log ^2\left (-x+x^2\right )} \, dx=-\frac {x \log \left (x\right )^{2} - {\left (x^{3} - x \log \left (x\right )\right )} \log \left (x - 1\right ) - {\left (x^{3} + x e^{4}\right )} \log \left (x\right ) - x + 2}{{\left (x^{2} - \log \left (x\right )\right )} \log \left (x - 1\right ) + {\left (x^{2} + e^{4}\right )} \log \left (x\right ) - \log \left (x\right )^{2} + 1} \] Input:

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

Output:

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

Giac [B] (verification not implemented)

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

Time = 0.81 (sec) , antiderivative size = 77, normalized size of antiderivative = 2.41 \[ \int \frac {-x-x^2+4 x^3+e^4 (-2+2 x)+\left (2-4 x+e^4 \left (-2 x+2 x^2\right )\right ) \log (x)+e^8 \left (-x+x^2\right ) \log ^2(x)+\left (2-2 x-4 x^2+2 x^3+2 x^4+\left (2 x-2 x^2+e^4 \left (-2 x^3+2 x^4\right )\right ) \log (x)+e^4 \left (2 x-2 x^2\right ) \log ^2(x)\right ) \log \left (-x+x^2\right )+\left (-x^5+x^6+\left (2 x^3-2 x^4\right ) \log (x)+\left (-x+x^2\right ) \log ^2(x)\right ) \log ^2\left (-x+x^2\right )}{-x+x^2+e^4 \left (-2 x+2 x^2\right ) \log (x)+e^8 \left (-x+x^2\right ) \log ^2(x)+\left (-2 x^3+2 x^4+\left (2 x-2 x^2+e^4 \left (-2 x^3+2 x^4\right )\right ) \log (x)+e^4 \left (2 x-2 x^2\right ) \log ^2(x)\right ) \log \left (-x+x^2\right )+\left (-x^5+x^6+\left (2 x^3-2 x^4\right ) \log (x)+\left (-x+x^2\right ) \log ^2(x)\right ) \log ^2\left (-x+x^2\right )} \, dx=\frac {x^{3} \log \left (x - 1\right ) + x^{3} \log \left (x\right ) + x e^{4} \log \left (x\right ) - x \log \left (x - 1\right ) \log \left (x\right ) - x \log \left (x\right )^{2} + x - 2}{x^{2} \log \left (x - 1\right ) + x^{2} \log \left (x\right ) + e^{4} \log \left (x\right ) - \log \left (x - 1\right ) \log \left (x\right ) - \log \left (x\right )^{2} + 1} \] Input:

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

Output:

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

Mupad [F(-1)]

Timed out. \[ \int \frac {-x-x^2+4 x^3+e^4 (-2+2 x)+\left (2-4 x+e^4 \left (-2 x+2 x^2\right )\right ) \log (x)+e^8 \left (-x+x^2\right ) \log ^2(x)+\left (2-2 x-4 x^2+2 x^3+2 x^4+\left (2 x-2 x^2+e^4 \left (-2 x^3+2 x^4\right )\right ) \log (x)+e^4 \left (2 x-2 x^2\right ) \log ^2(x)\right ) \log \left (-x+x^2\right )+\left (-x^5+x^6+\left (2 x^3-2 x^4\right ) \log (x)+\left (-x+x^2\right ) \log ^2(x)\right ) \log ^2\left (-x+x^2\right )}{-x+x^2+e^4 \left (-2 x+2 x^2\right ) \log (x)+e^8 \left (-x+x^2\right ) \log ^2(x)+\left (-2 x^3+2 x^4+\left (2 x-2 x^2+e^4 \left (-2 x^3+2 x^4\right )\right ) \log (x)+e^4 \left (2 x-2 x^2\right ) \log ^2(x)\right ) \log \left (-x+x^2\right )+\left (-x^5+x^6+\left (2 x^3-2 x^4\right ) \log (x)+\left (-x+x^2\right ) \log ^2(x)\right ) \log ^2\left (-x+x^2\right )} \, dx=\int \frac {x-{\ln \left (x^2-x\right )}^2\,\left (\ln \left (x\right )\,\left (2\,x^3-2\,x^4\right )-{\ln \left (x\right )}^2\,\left (x-x^2\right )-x^5+x^6\right )-\ln \left (x^2-x\right )\,\left (2\,x^3-\ln \left (x\right )\,\left ({\mathrm {e}}^4\,\left (2\,x^3-2\,x^4\right )-2\,x+2\,x^2\right )-4\,x^2-2\,x+2\,x^4+{\mathrm {e}}^4\,{\ln \left (x\right )}^2\,\left (2\,x-2\,x^2\right )+2\right )+\ln \left (x\right )\,\left (4\,x+{\mathrm {e}}^4\,\left (2\,x-2\,x^2\right )-2\right )+x^2-4\,x^3-{\mathrm {e}}^4\,\left (2\,x-2\right )+{\mathrm {e}}^8\,{\ln \left (x\right )}^2\,\left (x-x^2\right )}{x+\ln \left (x^2-x\right )\,\left (\ln \left (x\right )\,\left ({\mathrm {e}}^4\,\left (2\,x^3-2\,x^4\right )-2\,x+2\,x^2\right )+2\,x^3-2\,x^4-{\mathrm {e}}^4\,{\ln \left (x\right )}^2\,\left (2\,x-2\,x^2\right )\right )-{\ln \left (x^2-x\right )}^2\,\left (\ln \left (x\right )\,\left (2\,x^3-2\,x^4\right )-{\ln \left (x\right )}^2\,\left (x-x^2\right )-x^5+x^6\right )-x^2+{\mathrm {e}}^4\,\ln \left (x\right )\,\left (2\,x-2\,x^2\right )+{\mathrm {e}}^8\,{\ln \left (x\right )}^2\,\left (x-x^2\right )} \,d x \] Input:

int((x - log(x^2 - x)^2*(log(x)*(2*x^3 - 2*x^4) - log(x)^2*(x - x^2) - x^5 
 + x^6) - log(x^2 - x)*(2*x^3 - log(x)*(exp(4)*(2*x^3 - 2*x^4) - 2*x + 2*x 
^2) - 4*x^2 - 2*x + 2*x^4 + exp(4)*log(x)^2*(2*x - 2*x^2) + 2) + log(x)*(4 
*x + exp(4)*(2*x - 2*x^2) - 2) + x^2 - 4*x^3 - exp(4)*(2*x - 2) + exp(8)*l 
og(x)^2*(x - x^2))/(x + log(x^2 - x)*(log(x)*(exp(4)*(2*x^3 - 2*x^4) - 2*x 
 + 2*x^2) + 2*x^3 - 2*x^4 - exp(4)*log(x)^2*(2*x - 2*x^2)) - log(x^2 - x)^ 
2*(log(x)*(2*x^3 - 2*x^4) - log(x)^2*(x - x^2) - x^5 + x^6) - x^2 + exp(4) 
*log(x)*(2*x - 2*x^2) + exp(8)*log(x)^2*(x - x^2)),x)
 

Output:

int((x - log(x^2 - x)^2*(log(x)*(2*x^3 - 2*x^4) - log(x)^2*(x - x^2) - x^5 
 + x^6) - log(x^2 - x)*(2*x^3 - log(x)*(exp(4)*(2*x^3 - 2*x^4) - 2*x + 2*x 
^2) - 4*x^2 - 2*x + 2*x^4 + exp(4)*log(x)^2*(2*x - 2*x^2) + 2) + log(x)*(4 
*x + exp(4)*(2*x - 2*x^2) - 2) + x^2 - 4*x^3 - exp(4)*(2*x - 2) + exp(8)*l 
og(x)^2*(x - x^2))/(x + log(x^2 - x)*(log(x)*(exp(4)*(2*x^3 - 2*x^4) - 2*x 
 + 2*x^2) + 2*x^3 - 2*x^4 - exp(4)*log(x)^2*(2*x - 2*x^2)) - log(x^2 - x)^ 
2*(log(x)*(2*x^3 - 2*x^4) - log(x)^2*(x - x^2) - x^5 + x^6) - x^2 + exp(4) 
*log(x)*(2*x - 2*x^2) + exp(8)*log(x)^2*(x - x^2)), x)
 

Reduce [B] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 74, normalized size of antiderivative = 2.31 \[ \int \frac {-x-x^2+4 x^3+e^4 (-2+2 x)+\left (2-4 x+e^4 \left (-2 x+2 x^2\right )\right ) \log (x)+e^8 \left (-x+x^2\right ) \log ^2(x)+\left (2-2 x-4 x^2+2 x^3+2 x^4+\left (2 x-2 x^2+e^4 \left (-2 x^3+2 x^4\right )\right ) \log (x)+e^4 \left (2 x-2 x^2\right ) \log ^2(x)\right ) \log \left (-x+x^2\right )+\left (-x^5+x^6+\left (2 x^3-2 x^4\right ) \log (x)+\left (-x+x^2\right ) \log ^2(x)\right ) \log ^2\left (-x+x^2\right )}{-x+x^2+e^4 \left (-2 x+2 x^2\right ) \log (x)+e^8 \left (-x+x^2\right ) \log ^2(x)+\left (-2 x^3+2 x^4+\left (2 x-2 x^2+e^4 \left (-2 x^3+2 x^4\right )\right ) \log (x)+e^4 \left (2 x-2 x^2\right ) \log ^2(x)\right ) \log \left (-x+x^2\right )+\left (-x^5+x^6+\left (2 x^3-2 x^4\right ) \log (x)+\left (-x+x^2\right ) \log ^2(x)\right ) \log ^2\left (-x+x^2\right )} \, dx=\frac {\mathrm {log}\left (x^{2}-x \right ) \mathrm {log}\left (x \right ) x -\mathrm {log}\left (x^{2}-x \right ) x^{3}-\mathrm {log}\left (x \right ) e^{4} x -x +2}{\mathrm {log}\left (x^{2}-x \right ) \mathrm {log}\left (x \right )-\mathrm {log}\left (x^{2}-x \right ) x^{2}-\mathrm {log}\left (x \right ) e^{4}-1} \] Input:

int((((x^2-x)*log(x)^2+(-2*x^4+2*x^3)*log(x)+x^6-x^5)*log(x^2-x)^2+((-2*x^ 
2+2*x)*exp(4)*log(x)^2+((2*x^4-2*x^3)*exp(4)-2*x^2+2*x)*log(x)+2*x^4+2*x^3 
-4*x^2-2*x+2)*log(x^2-x)+(x^2-x)*exp(4)^2*log(x)^2+((2*x^2-2*x)*exp(4)-4*x 
+2)*log(x)+(2*x-2)*exp(4)+4*x^3-x^2-x)/(((x^2-x)*log(x)^2+(-2*x^4+2*x^3)*l 
og(x)+x^6-x^5)*log(x^2-x)^2+((-2*x^2+2*x)*exp(4)*log(x)^2+((2*x^4-2*x^3)*e 
xp(4)-2*x^2+2*x)*log(x)+2*x^4-2*x^3)*log(x^2-x)+(x^2-x)*exp(4)^2*log(x)^2+ 
(2*x^2-2*x)*exp(4)*log(x)+x^2-x),x)
 

Output:

(log(x**2 - x)*log(x)*x - log(x**2 - x)*x**3 - log(x)*e**4*x - x + 2)/(log 
(x**2 - x)*log(x) - log(x**2 - x)*x**2 - log(x)*e**4 - 1)