\(\int \frac {e^x (2 x-4 x^2)+e^{x+x^2} (x-2 x^2)+(e^x (4 x-2 x^2-2 x^3)+e^{x+x^2} (2 x-x^2-3 x^3+2 x^4)) \log (-x+x^2)+e^x (-9 x^2+4 x^4+4 x^5+x^6) \log ^2(-x+x^2)}{-4+e^{2 x^2} (-1+x)+4 x+e^{x^2} (-4+4 x)+(36 x-12 x^2-20 x^3-4 x^4+e^{x^2} (18 x-6 x^2-10 x^3-2 x^4)) \log (-x+x^2)+(-81 x^2-27 x^3+54 x^4+42 x^5+11 x^6+x^7) \log ^2(-x+x^2)} \, dx\) [2136]

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

Optimal result

Integrand size = 240, antiderivative size = 35 \[ \int \frac {e^x \left (2 x-4 x^2\right )+e^{x+x^2} \left (x-2 x^2\right )+\left (e^x \left (4 x-2 x^2-2 x^3\right )+e^{x+x^2} \left (2 x-x^2-3 x^3+2 x^4\right )\right ) \log \left (-x+x^2\right )+e^x \left (-9 x^2+4 x^4+4 x^5+x^6\right ) \log ^2\left (-x+x^2\right )}{-4+e^{2 x^2} (-1+x)+4 x+e^{x^2} (-4+4 x)+\left (36 x-12 x^2-20 x^3-4 x^4+e^{x^2} \left (18 x-6 x^2-10 x^3-2 x^4\right )\right ) \log \left (-x+x^2\right )+\left (-81 x^2-27 x^3+54 x^4+42 x^5+11 x^6+x^7\right ) \log ^2\left (-x+x^2\right )} \, dx=\frac {e^x x}{(3+x)^2-\frac {2+e^{x^2}}{x \log \left (-x+x^2\right )}} \] Output:

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

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.06 \[ \int \frac {e^x \left (2 x-4 x^2\right )+e^{x+x^2} \left (x-2 x^2\right )+\left (e^x \left (4 x-2 x^2-2 x^3\right )+e^{x+x^2} \left (2 x-x^2-3 x^3+2 x^4\right )\right ) \log \left (-x+x^2\right )+e^x \left (-9 x^2+4 x^4+4 x^5+x^6\right ) \log ^2\left (-x+x^2\right )}{-4+e^{2 x^2} (-1+x)+4 x+e^{x^2} (-4+4 x)+\left (36 x-12 x^2-20 x^3-4 x^4+e^{x^2} \left (18 x-6 x^2-10 x^3-2 x^4\right )\right ) \log \left (-x+x^2\right )+\left (-81 x^2-27 x^3+54 x^4+42 x^5+11 x^6+x^7\right ) \log ^2\left (-x+x^2\right )} \, dx=\frac {e^x x^2 \log ((-1+x) x)}{-2-e^{x^2}+x (3+x)^2 \log ((-1+x) x)} \] Input:

Integrate[(E^x*(2*x - 4*x^2) + E^(x + x^2)*(x - 2*x^2) + (E^x*(4*x - 2*x^2 
 - 2*x^3) + E^(x + x^2)*(2*x - x^2 - 3*x^3 + 2*x^4))*Log[-x + x^2] + E^x*( 
-9*x^2 + 4*x^4 + 4*x^5 + x^6)*Log[-x + x^2]^2)/(-4 + E^(2*x^2)*(-1 + x) + 
4*x + E^x^2*(-4 + 4*x) + (36*x - 12*x^2 - 20*x^3 - 4*x^4 + E^x^2*(18*x - 6 
*x^2 - 10*x^3 - 2*x^4))*Log[-x + x^2] + (-81*x^2 - 27*x^3 + 54*x^4 + 42*x^ 
5 + 11*x^6 + x^7)*Log[-x + x^2]^2),x]
 

Output:

(E^x*x^2*Log[(-1 + x)*x])/(-2 - E^x^2 + x*(3 + x)^2*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 {e^x \left (2 x-4 x^2\right )+e^{x^2+x} \left (x-2 x^2\right )+\left (e^x \left (-2 x^3-2 x^2+4 x\right )+e^{x^2+x} \left (2 x^4-3 x^3-x^2+2 x\right )\right ) \log \left (x^2-x\right )+e^x \left (x^6+4 x^5+4 x^4-9 x^2\right ) \log ^2\left (x^2-x\right )}{e^{2 x^2} (x-1)+e^{x^2} (4 x-4)+\left (-4 x^4-20 x^3-12 x^2+e^{x^2} \left (-2 x^4-10 x^3-6 x^2+18 x\right )+36 x\right ) \log \left (x^2-x\right )+\left (x^7+11 x^6+42 x^5+54 x^4-27 x^3-81 x^2\right ) \log ^2\left (x^2-x\right )+4 x-4} \, dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {e^x x^2 \log ((x-1) x) \left (2 x^5 \log ((x-1) x)+10 x^4 \log ((x-1) x)-2 x^3+3 x^3 \log ((x-1) x)-15 x^2-27 x^2 \log ((x-1) x)-8 x+3 x \log ((x-1) x)+9 \log ((x-1) x)+9\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )^2}-\frac {e^x x \left (2 x^3 \log ((x-1) x)-3 x^2 \log ((x-1) x)-2 x-x \log ((x-1) x)+2 \log ((x-1) x)+1\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )}\right )dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {e^x x^2 \log ((x-1) x) \left (2 x^5 \log ((x-1) x)+10 x^4 \log ((x-1) x)-2 x^3+3 x^3 \log ((x-1) x)-15 x^2-27 x^2 \log ((x-1) x)-8 x+3 x \log ((x-1) x)+9 \log ((x-1) x)+9\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )^2}-\frac {e^x x \left (2 x^3 \log ((x-1) x)-3 x^2 \log ((x-1) x)-2 x-x \log ((x-1) x)+2 \log ((x-1) x)+1\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )}\right )dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {e^x x^2 \log ((x-1) x) \left (2 x^5 \log ((x-1) x)+10 x^4 \log ((x-1) x)-2 x^3+3 x^3 \log ((x-1) x)-15 x^2-27 x^2 \log ((x-1) x)-8 x+3 x \log ((x-1) x)+9 \log ((x-1) x)+9\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )^2}-\frac {e^x x \left (2 x^3 \log ((x-1) x)-3 x^2 \log ((x-1) x)-2 x-x \log ((x-1) x)+2 \log ((x-1) x)+1\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )}\right )dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {e^x x^2 \log ((x-1) x) \left (2 x^5 \log ((x-1) x)+10 x^4 \log ((x-1) x)-2 x^3+3 x^3 \log ((x-1) x)-15 x^2-27 x^2 \log ((x-1) x)-8 x+3 x \log ((x-1) x)+9 \log ((x-1) x)+9\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )^2}-\frac {e^x x \left (2 x^3 \log ((x-1) x)-3 x^2 \log ((x-1) x)-2 x-x \log ((x-1) x)+2 \log ((x-1) x)+1\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )}\right )dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {e^x x^2 \log ((x-1) x) \left (2 x^5 \log ((x-1) x)+10 x^4 \log ((x-1) x)-2 x^3+3 x^3 \log ((x-1) x)-15 x^2-27 x^2 \log ((x-1) x)-8 x+3 x \log ((x-1) x)+9 \log ((x-1) x)+9\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )^2}-\frac {e^x x \left (2 x^3 \log ((x-1) x)-3 x^2 \log ((x-1) x)-2 x-x \log ((x-1) x)+2 \log ((x-1) x)+1\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )}\right )dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {e^x x^2 \log ((x-1) x) \left (2 x^5 \log ((x-1) x)+10 x^4 \log ((x-1) x)-2 x^3+3 x^3 \log ((x-1) x)-15 x^2-27 x^2 \log ((x-1) x)-8 x+3 x \log ((x-1) x)+9 \log ((x-1) x)+9\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )^2}-\frac {e^x x \left (2 x^3 \log ((x-1) x)-3 x^2 \log ((x-1) x)-2 x-x \log ((x-1) x)+2 \log ((x-1) x)+1\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )}\right )dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {e^x x^2 \log ((x-1) x) \left (2 x^5 \log ((x-1) x)+10 x^4 \log ((x-1) x)-2 x^3+3 x^3 \log ((x-1) x)-15 x^2-27 x^2 \log ((x-1) x)-8 x+3 x \log ((x-1) x)+9 \log ((x-1) x)+9\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )^2}-\frac {e^x x \left (2 x^3 \log ((x-1) x)-3 x^2 \log ((x-1) x)-2 x-x \log ((x-1) x)+2 \log ((x-1) x)+1\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )}\right )dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {e^x x^2 \log ((x-1) x) \left (2 x^5 \log ((x-1) x)+10 x^4 \log ((x-1) x)-2 x^3+3 x^3 \log ((x-1) x)-15 x^2-27 x^2 \log ((x-1) x)-8 x+3 x \log ((x-1) x)+9 \log ((x-1) x)+9\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )^2}-\frac {e^x x \left (2 x^3 \log ((x-1) x)-3 x^2 \log ((x-1) x)-2 x-x \log ((x-1) x)+2 \log ((x-1) x)+1\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )}\right )dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {e^x x^2 \log ((x-1) x) \left (2 x^5 \log ((x-1) x)+10 x^4 \log ((x-1) x)-2 x^3+3 x^3 \log ((x-1) x)-15 x^2-27 x^2 \log ((x-1) x)-8 x+3 x \log ((x-1) x)+9 \log ((x-1) x)+9\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )^2}-\frac {e^x x \left (2 x^3 \log ((x-1) x)-3 x^2 \log ((x-1) x)-2 x-x \log ((x-1) x)+2 \log ((x-1) x)+1\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )}\right )dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {e^x x^2 \log ((x-1) x) \left (2 x^5 \log ((x-1) x)+10 x^4 \log ((x-1) x)-2 x^3+3 x^3 \log ((x-1) x)-15 x^2-27 x^2 \log ((x-1) x)-8 x+3 x \log ((x-1) x)+9 \log ((x-1) x)+9\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )^2}-\frac {e^x x \left (2 x^3 \log ((x-1) x)-3 x^2 \log ((x-1) x)-2 x-x \log ((x-1) x)+2 \log ((x-1) x)+1\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )}\right )dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {e^x x^2 \log ((x-1) x) \left (2 x^5 \log ((x-1) x)+10 x^4 \log ((x-1) x)-2 x^3+3 x^3 \log ((x-1) x)-15 x^2-27 x^2 \log ((x-1) x)-8 x+3 x \log ((x-1) x)+9 \log ((x-1) x)+9\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )^2}-\frac {e^x x \left (2 x^3 \log ((x-1) x)-3 x^2 \log ((x-1) x)-2 x-x \log ((x-1) x)+2 \log ((x-1) x)+1\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )}\right )dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {e^x x^2 \log ((x-1) x) \left (2 x^5 \log ((x-1) x)+10 x^4 \log ((x-1) x)-2 x^3+3 x^3 \log ((x-1) x)-15 x^2-27 x^2 \log ((x-1) x)-8 x+3 x \log ((x-1) x)+9 \log ((x-1) x)+9\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )^2}-\frac {e^x x \left (2 x^3 \log ((x-1) x)-3 x^2 \log ((x-1) x)-2 x-x \log ((x-1) x)+2 \log ((x-1) x)+1\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )}\right )dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {e^x x^2 \log ((x-1) x) \left (2 x^5 \log ((x-1) x)+10 x^4 \log ((x-1) x)-2 x^3+3 x^3 \log ((x-1) x)-15 x^2-27 x^2 \log ((x-1) x)-8 x+3 x \log ((x-1) x)+9 \log ((x-1) x)+9\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )^2}-\frac {e^x x \left (2 x^3 \log ((x-1) x)-3 x^2 \log ((x-1) x)-2 x-x \log ((x-1) x)+2 \log ((x-1) x)+1\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )}\right )dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {e^x x^2 \log ((x-1) x) \left (2 x^5 \log ((x-1) x)+10 x^4 \log ((x-1) x)-2 x^3+3 x^3 \log ((x-1) x)-15 x^2-27 x^2 \log ((x-1) x)-8 x+3 x \log ((x-1) x)+9 \log ((x-1) x)+9\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )^2}-\frac {e^x x \left (2 x^3 \log ((x-1) x)-3 x^2 \log ((x-1) x)-2 x-x \log ((x-1) x)+2 \log ((x-1) x)+1\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )}\right )dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {e^x x^2 \log ((x-1) x) \left (2 x^5 \log ((x-1) x)+10 x^4 \log ((x-1) x)-2 x^3+3 x^3 \log ((x-1) x)-15 x^2-27 x^2 \log ((x-1) x)-8 x+3 x \log ((x-1) x)+9 \log ((x-1) x)+9\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )^2}-\frac {e^x x \left (2 x^3 \log ((x-1) x)-3 x^2 \log ((x-1) x)-2 x-x \log ((x-1) x)+2 \log ((x-1) x)+1\right )}{(x-1) \left (x^3 \log ((x-1) x)-e^{x^2}+6 x^2 \log ((x-1) x)+9 x \log ((x-1) x)-2\right )}\right )dx\)

Input:

Int[(E^x*(2*x - 4*x^2) + E^(x + x^2)*(x - 2*x^2) + (E^x*(4*x - 2*x^2 - 2*x 
^3) + E^(x + x^2)*(2*x - x^2 - 3*x^3 + 2*x^4))*Log[-x + x^2] + E^x*(-9*x^2 
 + 4*x^4 + 4*x^5 + x^6)*Log[-x + x^2]^2)/(-4 + E^(2*x^2)*(-1 + x) + 4*x + 
E^x^2*(-4 + 4*x) + (36*x - 12*x^2 - 20*x^3 - 4*x^4 + E^x^2*(18*x - 6*x^2 - 
 10*x^3 - 2*x^4))*Log[-x + x^2] + (-81*x^2 - 27*x^3 + 54*x^4 + 42*x^5 + 11 
*x^6 + x^7)*Log[-x + x^2]^2),x]
 

Output:

$Aborted
 
Maple [A] (verified)

Time = 54.90 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.74

method result size
parallelrisch \(\frac {\ln \left (x^{2}-x \right ) {\mathrm e}^{x} x^{2}}{\ln \left (x^{2}-x \right ) x^{3}+6 \ln \left (x^{2}-x \right ) x^{2}+9 x \ln \left (x^{2}-x \right )-{\mathrm e}^{x^{2}}-2}\) \(61\)
risch \(\frac {x \,{\mathrm e}^{x}}{\left (3+x \right )^{2}}-\frac {2 x \,{\mathrm e}^{x} \left ({\mathrm e}^{x^{2}}+2\right )}{\left (x^{2}+6 x +9\right ) \left (9 i \pi x \,\operatorname {csgn}\left (i \left (-1+x \right )\right ) \operatorname {csgn}\left (i x \left (-1+x \right )\right ) \operatorname {csgn}\left (i x \right )-6 i \pi \,x^{2} \operatorname {csgn}\left (i x \left (-1+x \right )\right )^{2} \operatorname {csgn}\left (i x \right )-6 i \pi \,x^{2} \operatorname {csgn}\left (i \left (-1+x \right )\right ) \operatorname {csgn}\left (i x \left (-1+x \right )\right )^{2}+9 i \pi x \operatorname {csgn}\left (i x \left (-1+x \right )\right )^{3}+i \pi \,x^{3} \operatorname {csgn}\left (i x \left (-1+x \right )\right )^{3}+6 i \pi \,x^{2} \operatorname {csgn}\left (i \left (-1+x \right )\right ) \operatorname {csgn}\left (i x \left (-1+x \right )\right ) \operatorname {csgn}\left (i x \right )-9 i \pi x \operatorname {csgn}\left (i x \left (-1+x \right )\right )^{2} \operatorname {csgn}\left (i x \right )-i \pi \,x^{3} \operatorname {csgn}\left (i x \left (-1+x \right )\right )^{2} \operatorname {csgn}\left (i x \right )+i \pi \,x^{3} \operatorname {csgn}\left (i \left (-1+x \right )\right ) \operatorname {csgn}\left (i x \left (-1+x \right )\right ) \operatorname {csgn}\left (i x \right )-9 i \pi x \,\operatorname {csgn}\left (i \left (-1+x \right )\right ) \operatorname {csgn}\left (i x \left (-1+x \right )\right )^{2}-i \pi \,x^{3} \operatorname {csgn}\left (i \left (-1+x \right )\right ) \operatorname {csgn}\left (i x \left (-1+x \right )\right )^{2}+6 i \pi \,x^{2} \operatorname {csgn}\left (i x \left (-1+x \right )\right )^{3}-2 x^{3} \ln \left (x \right )-2 \ln \left (-1+x \right ) x^{3}-12 x^{2} \ln \left (x \right )-12 \ln \left (-1+x \right ) x^{2}-18 x \ln \left (x \right )-18 \ln \left (-1+x \right ) x +2 \,{\mathrm e}^{x^{2}}+4\right )}\) \(348\)

Input:

int(((x^6+4*x^5+4*x^4-9*x^2)*exp(x)*ln(x^2-x)^2+((2*x^4-3*x^3-x^2+2*x)*exp 
(x)*exp(x^2)+(-2*x^3-2*x^2+4*x)*exp(x))*ln(x^2-x)+(-2*x^2+x)*exp(x)*exp(x^ 
2)+(-4*x^2+2*x)*exp(x))/((x^7+11*x^6+42*x^5+54*x^4-27*x^3-81*x^2)*ln(x^2-x 
)^2+((-2*x^4-10*x^3-6*x^2+18*x)*exp(x^2)-4*x^4-20*x^3-12*x^2+36*x)*ln(x^2- 
x)+(-1+x)*exp(x^2)^2+(-4+4*x)*exp(x^2)+4*x-4),x,method=_RETURNVERBOSE)
 

Output:

ln(x^2-x)*exp(x)*x^2/(ln(x^2-x)*x^3+6*ln(x^2-x)*x^2+9*x*ln(x^2-x)-exp(x^2) 
-2)
 

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.71 \[ \int \frac {e^x \left (2 x-4 x^2\right )+e^{x+x^2} \left (x-2 x^2\right )+\left (e^x \left (4 x-2 x^2-2 x^3\right )+e^{x+x^2} \left (2 x-x^2-3 x^3+2 x^4\right )\right ) \log \left (-x+x^2\right )+e^x \left (-9 x^2+4 x^4+4 x^5+x^6\right ) \log ^2\left (-x+x^2\right )}{-4+e^{2 x^2} (-1+x)+4 x+e^{x^2} (-4+4 x)+\left (36 x-12 x^2-20 x^3-4 x^4+e^{x^2} \left (18 x-6 x^2-10 x^3-2 x^4\right )\right ) \log \left (-x+x^2\right )+\left (-81 x^2-27 x^3+54 x^4+42 x^5+11 x^6+x^7\right ) \log ^2\left (-x+x^2\right )} \, dx=\frac {x^{2} e^{\left (x^{2} + x\right )} \log \left (x^{2} - x\right )}{{\left (x^{3} + 6 \, x^{2} + 9 \, x\right )} e^{\left (x^{2}\right )} \log \left (x^{2} - x\right ) - e^{\left (2 \, x^{2}\right )} - 2 \, e^{\left (x^{2}\right )}} \] Input:

integrate(((x^6+4*x^5+4*x^4-9*x^2)*exp(x)*log(x^2-x)^2+((2*x^4-3*x^3-x^2+2 
*x)*exp(x)*exp(x^2)+(-2*x^3-2*x^2+4*x)*exp(x))*log(x^2-x)+(-2*x^2+x)*exp(x 
)*exp(x^2)+(-4*x^2+2*x)*exp(x))/((x^7+11*x^6+42*x^5+54*x^4-27*x^3-81*x^2)* 
log(x^2-x)^2+((-2*x^4-10*x^3-6*x^2+18*x)*exp(x^2)-4*x^4-20*x^3-12*x^2+36*x 
)*log(x^2-x)+(-1+x)*exp(x^2)^2+(-4+4*x)*exp(x^2)+4*x-4),x, algorithm="fric 
as")
 

Output:

x^2*e^(x^2 + x)*log(x^2 - x)/((x^3 + 6*x^2 + 9*x)*e^(x^2)*log(x^2 - x) - e 
^(2*x^2) - 2*e^(x^2))
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 53 vs. \(2 (24) = 48\).

Time = 0.26 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.51 \[ \int \frac {e^x \left (2 x-4 x^2\right )+e^{x+x^2} \left (x-2 x^2\right )+\left (e^x \left (4 x-2 x^2-2 x^3\right )+e^{x+x^2} \left (2 x-x^2-3 x^3+2 x^4\right )\right ) \log \left (-x+x^2\right )+e^x \left (-9 x^2+4 x^4+4 x^5+x^6\right ) \log ^2\left (-x+x^2\right )}{-4+e^{2 x^2} (-1+x)+4 x+e^{x^2} (-4+4 x)+\left (36 x-12 x^2-20 x^3-4 x^4+e^{x^2} \left (18 x-6 x^2-10 x^3-2 x^4\right )\right ) \log \left (-x+x^2\right )+\left (-81 x^2-27 x^3+54 x^4+42 x^5+11 x^6+x^7\right ) \log ^2\left (-x+x^2\right )} \, dx=- \frac {x^{2} e^{x} \log {\left (x^{2} - x \right )}}{- x^{3} \log {\left (x^{2} - x \right )} - 6 x^{2} \log {\left (x^{2} - x \right )} - 9 x \log {\left (x^{2} - x \right )} + e^{x^{2}} + 2} \] Input:

integrate(((x**6+4*x**5+4*x**4-9*x**2)*exp(x)*ln(x**2-x)**2+((2*x**4-3*x** 
3-x**2+2*x)*exp(x)*exp(x**2)+(-2*x**3-2*x**2+4*x)*exp(x))*ln(x**2-x)+(-2*x 
**2+x)*exp(x)*exp(x**2)+(-4*x**2+2*x)*exp(x))/((x**7+11*x**6+42*x**5+54*x* 
*4-27*x**3-81*x**2)*ln(x**2-x)**2+((-2*x**4-10*x**3-6*x**2+18*x)*exp(x**2) 
-4*x**4-20*x**3-12*x**2+36*x)*ln(x**2-x)+(-1+x)*exp(x**2)**2+(-4+4*x)*exp( 
x**2)+4*x-4),x)
 

Output:

-x**2*exp(x)*log(x**2 - x)/(-x**3*log(x**2 - x) - 6*x**2*log(x**2 - x) - 9 
*x*log(x**2 - x) + exp(x**2) + 2)
 

Maxima [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.77 \[ \int \frac {e^x \left (2 x-4 x^2\right )+e^{x+x^2} \left (x-2 x^2\right )+\left (e^x \left (4 x-2 x^2-2 x^3\right )+e^{x+x^2} \left (2 x-x^2-3 x^3+2 x^4\right )\right ) \log \left (-x+x^2\right )+e^x \left (-9 x^2+4 x^4+4 x^5+x^6\right ) \log ^2\left (-x+x^2\right )}{-4+e^{2 x^2} (-1+x)+4 x+e^{x^2} (-4+4 x)+\left (36 x-12 x^2-20 x^3-4 x^4+e^{x^2} \left (18 x-6 x^2-10 x^3-2 x^4\right )\right ) \log \left (-x+x^2\right )+\left (-81 x^2-27 x^3+54 x^4+42 x^5+11 x^6+x^7\right ) \log ^2\left (-x+x^2\right )} \, dx=\frac {x^{2} e^{x} \log \left (x - 1\right ) + x^{2} e^{x} \log \left (x\right )}{{\left (x^{3} + 6 \, x^{2} + 9 \, x\right )} \log \left (x - 1\right ) + {\left (x^{3} + 6 \, x^{2} + 9 \, x\right )} \log \left (x\right ) - e^{\left (x^{2}\right )} - 2} \] Input:

integrate(((x^6+4*x^5+4*x^4-9*x^2)*exp(x)*log(x^2-x)^2+((2*x^4-3*x^3-x^2+2 
*x)*exp(x)*exp(x^2)+(-2*x^3-2*x^2+4*x)*exp(x))*log(x^2-x)+(-2*x^2+x)*exp(x 
)*exp(x^2)+(-4*x^2+2*x)*exp(x))/((x^7+11*x^6+42*x^5+54*x^4-27*x^3-81*x^2)* 
log(x^2-x)^2+((-2*x^4-10*x^3-6*x^2+18*x)*exp(x^2)-4*x^4-20*x^3-12*x^2+36*x 
)*log(x^2-x)+(-1+x)*exp(x^2)^2+(-4+4*x)*exp(x^2)+4*x-4),x, algorithm="maxi 
ma")
 

Output:

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

Giac [B] (verification not implemented)

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

Time = 0.45 (sec) , antiderivative size = 72, normalized size of antiderivative = 2.06 \[ \int \frac {e^x \left (2 x-4 x^2\right )+e^{x+x^2} \left (x-2 x^2\right )+\left (e^x \left (4 x-2 x^2-2 x^3\right )+e^{x+x^2} \left (2 x-x^2-3 x^3+2 x^4\right )\right ) \log \left (-x+x^2\right )+e^x \left (-9 x^2+4 x^4+4 x^5+x^6\right ) \log ^2\left (-x+x^2\right )}{-4+e^{2 x^2} (-1+x)+4 x+e^{x^2} (-4+4 x)+\left (36 x-12 x^2-20 x^3-4 x^4+e^{x^2} \left (18 x-6 x^2-10 x^3-2 x^4\right )\right ) \log \left (-x+x^2\right )+\left (-81 x^2-27 x^3+54 x^4+42 x^5+11 x^6+x^7\right ) \log ^2\left (-x+x^2\right )} \, dx=\frac {x^{2} e^{x} \log \left (x - 1\right ) + x^{2} e^{x} \log \left (x\right )}{x^{3} \log \left (x - 1\right ) + x^{3} \log \left (x\right ) + 6 \, x^{2} \log \left (x - 1\right ) + 6 \, x^{2} \log \left (x\right ) + 9 \, x \log \left (x - 1\right ) + 9 \, x \log \left (x\right ) - e^{\left (x^{2}\right )} - 2} \] Input:

integrate(((x^6+4*x^5+4*x^4-9*x^2)*exp(x)*log(x^2-x)^2+((2*x^4-3*x^3-x^2+2 
*x)*exp(x)*exp(x^2)+(-2*x^3-2*x^2+4*x)*exp(x))*log(x^2-x)+(-2*x^2+x)*exp(x 
)*exp(x^2)+(-4*x^2+2*x)*exp(x))/((x^7+11*x^6+42*x^5+54*x^4-27*x^3-81*x^2)* 
log(x^2-x)^2+((-2*x^4-10*x^3-6*x^2+18*x)*exp(x^2)-4*x^4-20*x^3-12*x^2+36*x 
)*log(x^2-x)+(-1+x)*exp(x^2)^2+(-4+4*x)*exp(x^2)+4*x-4),x, algorithm="giac 
")
 

Output:

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

Mupad [F(-1)]

Timed out. \[ \int \frac {e^x \left (2 x-4 x^2\right )+e^{x+x^2} \left (x-2 x^2\right )+\left (e^x \left (4 x-2 x^2-2 x^3\right )+e^{x+x^2} \left (2 x-x^2-3 x^3+2 x^4\right )\right ) \log \left (-x+x^2\right )+e^x \left (-9 x^2+4 x^4+4 x^5+x^6\right ) \log ^2\left (-x+x^2\right )}{-4+e^{2 x^2} (-1+x)+4 x+e^{x^2} (-4+4 x)+\left (36 x-12 x^2-20 x^3-4 x^4+e^{x^2} \left (18 x-6 x^2-10 x^3-2 x^4\right )\right ) \log \left (-x+x^2\right )+\left (-81 x^2-27 x^3+54 x^4+42 x^5+11 x^6+x^7\right ) \log ^2\left (-x+x^2\right )} \, dx=\int \frac {{\mathrm {e}}^x\,\left (x^6+4\,x^5+4\,x^4-9\,x^2\right )\,{\ln \left (x^2-x\right )}^2+\left ({\mathrm {e}}^{x^2}\,{\mathrm {e}}^x\,\left (2\,x^4-3\,x^3-x^2+2\,x\right )-{\mathrm {e}}^x\,\left (2\,x^3+2\,x^2-4\,x\right )\right )\,\ln \left (x^2-x\right )+{\mathrm {e}}^x\,\left (2\,x-4\,x^2\right )+{\mathrm {e}}^{x^2}\,{\mathrm {e}}^x\,\left (x-2\,x^2\right )}{\left (x^7+11\,x^6+42\,x^5+54\,x^4-27\,x^3-81\,x^2\right )\,{\ln \left (x^2-x\right )}^2+\left (36\,x-{\mathrm {e}}^{x^2}\,\left (2\,x^4+10\,x^3+6\,x^2-18\,x\right )-12\,x^2-20\,x^3-4\,x^4\right )\,\ln \left (x^2-x\right )+4\,x+{\mathrm {e}}^{2\,x^2}\,\left (x-1\right )+{\mathrm {e}}^{x^2}\,\left (4\,x-4\right )-4} \,d x \] Input:

int((exp(x)*(2*x - 4*x^2) - log(x^2 - x)*(exp(x)*(2*x^2 - 4*x + 2*x^3) - e 
xp(x^2)*exp(x)*(2*x - x^2 - 3*x^3 + 2*x^4)) + exp(x^2)*exp(x)*(x - 2*x^2) 
+ exp(x)*log(x^2 - x)^2*(4*x^4 - 9*x^2 + 4*x^5 + x^6))/(4*x - log(x^2 - x) 
*(exp(x^2)*(6*x^2 - 18*x + 10*x^3 + 2*x^4) - 36*x + 12*x^2 + 20*x^3 + 4*x^ 
4) + log(x^2 - x)^2*(54*x^4 - 27*x^3 - 81*x^2 + 42*x^5 + 11*x^6 + x^7) + e 
xp(2*x^2)*(x - 1) + exp(x^2)*(4*x - 4) - 4),x)
 

Output:

int((exp(x)*(2*x - 4*x^2) - log(x^2 - x)*(exp(x)*(2*x^2 - 4*x + 2*x^3) - e 
xp(x^2)*exp(x)*(2*x - x^2 - 3*x^3 + 2*x^4)) + exp(x^2)*exp(x)*(x - 2*x^2) 
+ exp(x)*log(x^2 - x)^2*(4*x^4 - 9*x^2 + 4*x^5 + x^6))/(4*x - log(x^2 - x) 
*(exp(x^2)*(6*x^2 - 18*x + 10*x^3 + 2*x^4) - 36*x + 12*x^2 + 20*x^3 + 4*x^ 
4) + log(x^2 - x)^2*(54*x^4 - 27*x^3 - 81*x^2 + 42*x^5 + 11*x^6 + x^7) + e 
xp(2*x^2)*(x - 1) + exp(x^2)*(4*x - 4) - 4), x)
 

Reduce [F]

\[ \int \frac {e^x \left (2 x-4 x^2\right )+e^{x+x^2} \left (x-2 x^2\right )+\left (e^x \left (4 x-2 x^2-2 x^3\right )+e^{x+x^2} \left (2 x-x^2-3 x^3+2 x^4\right )\right ) \log \left (-x+x^2\right )+e^x \left (-9 x^2+4 x^4+4 x^5+x^6\right ) \log ^2\left (-x+x^2\right )}{-4+e^{2 x^2} (-1+x)+4 x+e^{x^2} (-4+4 x)+\left (36 x-12 x^2-20 x^3-4 x^4+e^{x^2} \left (18 x-6 x^2-10 x^3-2 x^4\right )\right ) \log \left (-x+x^2\right )+\left (-81 x^2-27 x^3+54 x^4+42 x^5+11 x^6+x^7\right ) \log ^2\left (-x+x^2\right )} \, dx=\int \frac {\left (x^{6}+4 x^{5}+4 x^{4}-9 x^{2}\right ) {\mathrm e}^{x} \mathrm {log}\left (x^{2}-x \right )^{2}+\left (\left (2 x^{4}-3 x^{3}-x^{2}+2 x \right ) {\mathrm e}^{x} {\mathrm e}^{x^{2}}+\left (-2 x^{3}-2 x^{2}+4 x \right ) {\mathrm e}^{x}\right ) \mathrm {log}\left (x^{2}-x \right )+\left (-2 x^{2}+x \right ) {\mathrm e}^{x} {\mathrm e}^{x^{2}}+\left (-4 x^{2}+2 x \right ) {\mathrm e}^{x}}{\left (x^{7}+11 x^{6}+42 x^{5}+54 x^{4}-27 x^{3}-81 x^{2}\right ) \mathrm {log}\left (x^{2}-x \right )^{2}+\left (\left (-2 x^{4}-10 x^{3}-6 x^{2}+18 x \right ) {\mathrm e}^{x^{2}}-4 x^{4}-20 x^{3}-12 x^{2}+36 x \right ) \mathrm {log}\left (x^{2}-x \right )+\left (x -1\right ) \left ({\mathrm e}^{x^{2}}\right )^{2}+\left (4 x -4\right ) {\mathrm e}^{x^{2}}+4 x -4}d x \] Input:

int(((x^6+4*x^5+4*x^4-9*x^2)*exp(x)*log(x^2-x)^2+((2*x^4-3*x^3-x^2+2*x)*ex 
p(x)*exp(x^2)+(-2*x^3-2*x^2+4*x)*exp(x))*log(x^2-x)+(-2*x^2+x)*exp(x)*exp( 
x^2)+(-4*x^2+2*x)*exp(x))/((x^7+11*x^6+42*x^5+54*x^4-27*x^3-81*x^2)*log(x^ 
2-x)^2+((-2*x^4-10*x^3-6*x^2+18*x)*exp(x^2)-4*x^4-20*x^3-12*x^2+36*x)*log( 
x^2-x)+(-1+x)*exp(x^2)^2+(-4+4*x)*exp(x^2)+4*x-4),x)
 

Output:

int(((x^6+4*x^5+4*x^4-9*x^2)*exp(x)*log(x^2-x)^2+((2*x^4-3*x^3-x^2+2*x)*ex 
p(x)*exp(x^2)+(-2*x^3-2*x^2+4*x)*exp(x))*log(x^2-x)+(-2*x^2+x)*exp(x)*exp( 
x^2)+(-4*x^2+2*x)*exp(x))/((x^7+11*x^6+42*x^5+54*x^4-27*x^3-81*x^2)*log(x^ 
2-x)^2+((-2*x^4-10*x^3-6*x^2+18*x)*exp(x^2)-4*x^4-20*x^3-12*x^2+36*x)*log( 
x^2-x)+(-1+x)*exp(x^2)^2+(-4+4*x)*exp(x^2)+4*x-4),x)