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

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

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

x + x/(2 - x - 2*x^2 + E^x*x^2 + x^3) + x/Log[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 {-x^6+4 x^5-e^{2 x} x^4-2 x^4-8 x^3+7 x^2+e^x \left (-2 x^5+4 x^4+2 x^3-4 x^2\right )+\left (x^6-4 x^5+e^{2 x} x^4+2 x^4+6 x^3-5 x^2+e^x \left (2 x^5-4 x^4-3 x^3+3 x^2\right )-4 x+6\right ) \log ^2(x)+\left (x^6-4 x^5+e^{2 x} x^4+2 x^4+8 x^3-7 x^2+e^x \left (2 x^5-4 x^4-2 x^3+4 x^2\right )-4 x+4\right ) \log (x)+4 x-4}{\left (x^6-4 x^5+e^{2 x} x^4+2 x^4+8 x^3-7 x^2+e^x \left (2 x^5-4 x^4-2 x^3+4 x^2\right )-4 x+4\right ) \log ^2(x)} \, dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

$Aborted
 
Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.85

\[\frac {x \left (x^{3}+{\mathrm e}^{x} x^{2}-2 x^{2}-x +3\right )}{{\mathrm e}^{x} x^{2}+x^{3}-2 x^{2}-x +2}+\frac {x}{\ln \left (x \right )}\]

Input:

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

Output:

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

Fricas [B] (verification not implemented)

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

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

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

Output:

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

Sympy [A] (verification not implemented)

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

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

Output:

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

Maxima [B] (verification not implemented)

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

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

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

Output:

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

Giac [B] (verification not implemented)

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

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

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

Output:

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

Mupad [B] (verification not implemented)

Time = 6.93 (sec) , antiderivative size = 76, normalized size of antiderivative = 2.81 \[ \int \frac {-4+4 x+7 x^2-8 x^3-2 x^4-e^{2 x} x^4+4 x^5-x^6+e^x \left (-4 x^2+2 x^3+4 x^4-2 x^5\right )+\left (4-4 x-7 x^2+8 x^3+2 x^4+e^{2 x} x^4-4 x^5+x^6+e^x \left (4 x^2-2 x^3-4 x^4+2 x^5\right )\right ) \log (x)+\left (6-4 x-5 x^2+6 x^3+2 x^4+e^{2 x} x^4-4 x^5+x^6+e^x \left (3 x^2-3 x^3-4 x^4+2 x^5\right )\right ) \log ^2(x)}{\left (4-4 x-7 x^2+8 x^3+2 x^4+e^{2 x} x^4-4 x^5+x^6+e^x \left (4 x^2-2 x^3-4 x^4+2 x^5\right )\right ) \log ^2(x)} \, dx=\frac {x\,\left (3\,\ln \left (x\right )-x+x^2\,{\mathrm {e}}^x-2\,x^2\,\ln \left (x\right )+x^3\,\ln \left (x\right )-x\,\ln \left (x\right )-2\,x^2+x^3+x^2\,{\mathrm {e}}^x\,\ln \left (x\right )+2\right )}{\ln \left (x\right )\,\left (x^2\,{\mathrm {e}}^x-x-2\,x^2+x^3+2\right )} \] Input:

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

Output:

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

Reduce [B] (verification not implemented)

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

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

Output:

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