\(\int \frac {\log (e x) (e^{x+x^2} (-4+2 x)-2 e^{x+x^2} \log (x^2))+\log ^2(e x) (e^{x+x^2} (4-4 x-3 x^2+2 x^3)+e^{x+x^2} (1-x-2 x^2) \log (x^2))}{4 x^2-4 x^3+x^4+(4 x^2-2 x^3) \log (x^2)+x^2 \log ^2(x^2)} \, dx\) [2819]

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

Optimal result

Integrand size = 129, antiderivative size = 28 \[ \int \frac {\log (e x) \left (e^{x+x^2} (-4+2 x)-2 e^{x+x^2} \log \left (x^2\right )\right )+\log ^2(e x) \left (e^{x+x^2} \left (4-4 x-3 x^2+2 x^3\right )+e^{x+x^2} \left (1-x-2 x^2\right ) \log \left (x^2\right )\right )}{4 x^2-4 x^3+x^4+\left (4 x^2-2 x^3\right ) \log \left (x^2\right )+x^2 \log ^2\left (x^2\right )} \, dx=\frac {e^{x (1+x)} \log ^2(e x)}{x \left (-2+x-\log \left (x^2\right )\right )} \]

[Out]

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

Rubi [F]

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

[In]

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

[Out]

2*Defer[Int][E^(x + x^2)/(x^2*(-2 + x - Log[x^2])^2), x] - Defer[Int][E^(x + x^2)/(x*(-2 + x - Log[x^2])^2), x
] + 4*Defer[Int][(E^(x + x^2)*Log[x])/(x^2*(-2 + x - Log[x^2])^2), x] - 2*Defer[Int][(E^(x + x^2)*Log[x])/(x*(
-2 + x - Log[x^2])^2), x] + 2*Defer[Int][(E^(x + x^2)*Log[x]^2)/(x^2*(-2 + x - Log[x^2])^2), x] - Defer[Int][(
E^(x + x^2)*Log[x]^2)/(x*(-2 + x - Log[x^2])^2), x] + 2*Defer[Int][E^(x + x^2)/(-2 + x - Log[x^2]), x] + Defer
[Int][E^(x + x^2)/(x^2*(-2 + x - Log[x^2])), x] + Defer[Int][E^(x + x^2)/(x*(-2 + x - Log[x^2])), x] + 4*Defer
[Int][(E^(x + x^2)*Log[x])/(-2 + x - Log[x^2]), x] + 2*Defer[Int][(E^(x + x^2)*Log[x])/(x*(-2 + x - Log[x^2]))
, x] + 2*Defer[Int][(E^(x + x^2)*Log[x]^2)/(-2 + x - Log[x^2]), x] - Defer[Int][(E^(x + x^2)*Log[x]^2)/(x^2*(-
2 + x - Log[x^2])), x] + Defer[Int][(E^(x + x^2)*Log[x]^2)/(x*(-2 + x - Log[x^2])), x]

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

Mathematica [A] (verified)

Time = 5.12 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00 \[ \int \frac {\log (e x) \left (e^{x+x^2} (-4+2 x)-2 e^{x+x^2} \log \left (x^2\right )\right )+\log ^2(e x) \left (e^{x+x^2} \left (4-4 x-3 x^2+2 x^3\right )+e^{x+x^2} \left (1-x-2 x^2\right ) \log \left (x^2\right )\right )}{4 x^2-4 x^3+x^4+\left (4 x^2-2 x^3\right ) \log \left (x^2\right )+x^2 \log ^2\left (x^2\right )} \, dx=\frac {e^{x+x^2} (1+\log (x))^2}{x \left (-2+x-\log \left (x^2\right )\right )} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 1.15 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.04

method result size
parallelrisch \(\frac {\ln \left (x \,{\mathrm e}\right )^{2} {\mathrm e}^{x^{2}+x}}{x \left (x -2-\ln \left (x^{2}\right )\right )}\) \(29\)
risch \(-\frac {{\mathrm e}^{\left (1+x \right ) x} \ln \left (x \right )}{2 x}-\frac {\left (4+i \pi \,\operatorname {csgn}\left (i x^{2}\right ) \operatorname {csgn}\left (i x \right )^{2}-2 i \pi \operatorname {csgn}\left (i x^{2}\right )^{2} \operatorname {csgn}\left (i x \right )+i \pi \operatorname {csgn}\left (i x^{2}\right )^{3}+2 x \right ) {\mathrm e}^{\left (1+x \right ) x}}{8 x}+\frac {\left (4 x^{2}+4 i x \pi \,\operatorname {csgn}\left (i x^{2}\right ) \operatorname {csgn}\left (i x \right )^{2}-8 i x \pi \operatorname {csgn}\left (i x^{2}\right )^{2} \operatorname {csgn}\left (i x \right )+4 i x \pi \operatorname {csgn}\left (i x^{2}\right )^{3}-\pi ^{2} \operatorname {csgn}\left (i x \right )^{4} \operatorname {csgn}\left (i x^{2}\right )^{2}+4 \pi ^{2} \operatorname {csgn}\left (i x \right )^{3} \operatorname {csgn}\left (i x^{2}\right )^{3}-6 \pi ^{2} \operatorname {csgn}\left (i x \right )^{2} \operatorname {csgn}\left (i x^{2}\right )^{4}+4 \pi ^{2} \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x^{2}\right )^{5}-\pi ^{2} \operatorname {csgn}\left (i x^{2}\right )^{6}\right ) {\mathrm e}^{\left (1+x \right ) x}}{8 x \left (i \pi \,\operatorname {csgn}\left (i x^{2}\right ) \operatorname {csgn}\left (i x \right )^{2}-2 i \pi \operatorname {csgn}\left (i x^{2}\right )^{2} \operatorname {csgn}\left (i x \right )+i \pi \operatorname {csgn}\left (i x^{2}\right )^{3}+2 x -4 \ln \left (x \right )-4\right )}\) \(305\)

[In]

int((((-2*x^2-x+1)*exp(x^2+x)*ln(x^2)+(2*x^3-3*x^2-4*x+4)*exp(x^2+x))*ln(x*exp(1))^2+(-2*exp(x^2+x)*ln(x^2)+(2
*x-4)*exp(x^2+x))*ln(x*exp(1)))/(x^2*ln(x^2)^2+(-2*x^3+4*x^2)*ln(x^2)+x^4-4*x^3+4*x^2),x,method=_RETURNVERBOSE
)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.86 \[ \int \frac {\log (e x) \left (e^{x+x^2} (-4+2 x)-2 e^{x+x^2} \log \left (x^2\right )\right )+\log ^2(e x) \left (e^{x+x^2} \left (4-4 x-3 x^2+2 x^3\right )+e^{x+x^2} \left (1-x-2 x^2\right ) \log \left (x^2\right )\right )}{4 x^2-4 x^3+x^4+\left (4 x^2-2 x^3\right ) \log \left (x^2\right )+x^2 \log ^2\left (x^2\right )} \, dx=\frac {e^{\left (x^{2} + x\right )} \log \left (x^{2}\right )^{2} + 4 \, e^{\left (x^{2} + x\right )} \log \left (x^{2}\right ) + 4 \, e^{\left (x^{2} + x\right )}}{4 \, {\left (x^{2} - x \log \left (x^{2}\right ) - 2 \, x\right )}} \]

[In]

integrate((((-2*x^2-x+1)*exp(x^2+x)*log(x^2)+(2*x^3-3*x^2-4*x+4)*exp(x^2+x))*log(x*exp(1))^2+(-2*exp(x^2+x)*lo
g(x^2)+(2*x-4)*exp(x^2+x))*log(x*exp(1)))/(x^2*log(x^2)^2+(-2*x^3+4*x^2)*log(x^2)+x^4-4*x^3+4*x^2),x, algorith
m="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.32 \[ \int \frac {\log (e x) \left (e^{x+x^2} (-4+2 x)-2 e^{x+x^2} \log \left (x^2\right )\right )+\log ^2(e x) \left (e^{x+x^2} \left (4-4 x-3 x^2+2 x^3\right )+e^{x+x^2} \left (1-x-2 x^2\right ) \log \left (x^2\right )\right )}{4 x^2-4 x^3+x^4+\left (4 x^2-2 x^3\right ) \log \left (x^2\right )+x^2 \log ^2\left (x^2\right )} \, dx=\frac {\left (\log {\left (x^{2} \right )}^{2} + 4 \log {\left (x^{2} \right )} + 4\right ) e^{x^{2} + x}}{4 x^{2} - 4 x \log {\left (x^{2} \right )} - 8 x} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.11 \[ \int \frac {\log (e x) \left (e^{x+x^2} (-4+2 x)-2 e^{x+x^2} \log \left (x^2\right )\right )+\log ^2(e x) \left (e^{x+x^2} \left (4-4 x-3 x^2+2 x^3\right )+e^{x+x^2} \left (1-x-2 x^2\right ) \log \left (x^2\right )\right )}{4 x^2-4 x^3+x^4+\left (4 x^2-2 x^3\right ) \log \left (x^2\right )+x^2 \log ^2\left (x^2\right )} \, dx=\frac {{\left (\log \left (x\right )^{2} + 2 \, \log \left (x\right ) + 1\right )} e^{\left (x^{2} + x\right )}}{x^{2} - 2 \, x \log \left (x\right ) - 2 \, x} \]

[In]

integrate((((-2*x^2-x+1)*exp(x^2+x)*log(x^2)+(2*x^3-3*x^2-4*x+4)*exp(x^2+x))*log(x*exp(1))^2+(-2*exp(x^2+x)*lo
g(x^2)+(2*x-4)*exp(x^2+x))*log(x*exp(1)))/(x^2*log(x^2)^2+(-2*x^3+4*x^2)*log(x^2)+x^4-4*x^3+4*x^2),x, algorith
m="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.34 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.54 \[ \int \frac {\log (e x) \left (e^{x+x^2} (-4+2 x)-2 e^{x+x^2} \log \left (x^2\right )\right )+\log ^2(e x) \left (e^{x+x^2} \left (4-4 x-3 x^2+2 x^3\right )+e^{x+x^2} \left (1-x-2 x^2\right ) \log \left (x^2\right )\right )}{4 x^2-4 x^3+x^4+\left (4 x^2-2 x^3\right ) \log \left (x^2\right )+x^2 \log ^2\left (x^2\right )} \, dx=\frac {e^{\left (x^{2} + x\right )} \log \left (x\right )^{2} + 2 \, e^{\left (x^{2} + x\right )} \log \left (x\right ) + e^{\left (x^{2} + x\right )}}{x^{2} - 2 \, x \log \left (x\right ) - 2 \, x} \]

[In]

integrate((((-2*x^2-x+1)*exp(x^2+x)*log(x^2)+(2*x^3-3*x^2-4*x+4)*exp(x^2+x))*log(x*exp(1))^2+(-2*exp(x^2+x)*lo
g(x^2)+(2*x-4)*exp(x^2+x))*log(x*exp(1)))/(x^2*log(x^2)^2+(-2*x^3+4*x^2)*log(x^2)+x^4-4*x^3+4*x^2),x, algorith
m="giac")

[Out]

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

Mupad [F(-1)]

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

[In]

int(-(log(x*exp(1))^2*(exp(x + x^2)*(4*x + 3*x^2 - 2*x^3 - 4) + log(x^2)*exp(x + x^2)*(x + 2*x^2 - 1)) - log(x
*exp(1))*(exp(x + x^2)*(2*x - 4) - 2*log(x^2)*exp(x + x^2)))/(log(x^2)*(4*x^2 - 2*x^3) + 4*x^2 - 4*x^3 + x^4 +
 x^2*log(x^2)^2),x)

[Out]

int(-(log(x*exp(1))^2*(exp(x + x^2)*(4*x + 3*x^2 - 2*x^3 - 4) + log(x^2)*exp(x + x^2)*(x + 2*x^2 - 1)) - log(x
*exp(1))*(exp(x + x^2)*(2*x - 4) - 2*log(x^2)*exp(x + x^2)))/(log(x^2)*(4*x^2 - 2*x^3) + 4*x^2 - 4*x^3 + x^4 +
 x^2*log(x^2)^2), x)