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

   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 [B] (verification not implemented)

Optimal result

Integrand size = 100, antiderivative size = 25 \[ \int \frac {-6 x+9 x^2+e^{x^2} \left (3-3 x+9 x^2-12 x^3-6 x^4\right )+\left (-3 x^2+6 e^{x^2} x^3\right ) \log (x)}{1-4 x+2 x^2+4 x^3+x^4+\left (2 x-4 x^2-2 x^3\right ) \log (x)+x^2 \log ^2(x)} \, dx=\frac {3 \left (-e^{x^2}+x\right )}{2-\frac {1}{x}+x-\log (x)} \]

[Out]

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

Rubi [F]

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

[In]

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

[Out]

3*Defer[Int][E^x^2/(-1 + 2*x + x^2 - x*Log[x])^2, x] - 3*Defer[Int][x/(-1 + 2*x + x^2 - x*Log[x])^2, x] - 3*De
fer[Int][(E^x^2*x)/(-1 + 2*x + x^2 - x*Log[x])^2, x] + 3*Defer[Int][x^2/(-1 + 2*x + x^2 - x*Log[x])^2, x] + 3*
Defer[Int][(E^x^2*x^2)/(-1 + 2*x + x^2 - x*Log[x])^2, x] - 3*Defer[Int][x^3/(-1 + 2*x + x^2 - x*Log[x])^2, x]
+ 3*Defer[Int][x/(-1 + 2*x + x^2 - x*Log[x]), x] - 6*Defer[Int][(E^x^2*x^2)/(-1 + 2*x + x^2 - x*Log[x]), x]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 11.26 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.08

method result size
risch \(\frac {3 \left (-{\mathrm e}^{x^{2}}+x \right ) x}{x^{2}-x \ln \left (x \right )+2 x -1}\) \(27\)
parallelrisch \(\frac {3 x^{2}-3 \,{\mathrm e}^{x^{2}} x}{x^{2}-x \ln \left (x \right )+2 x -1}\) \(30\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.64 \[ \int \frac {-6 x+9 x^2+e^{x^2} \left (3-3 x+9 x^2-12 x^3-6 x^4\right )+\left (-3 x^2+6 e^{x^2} x^3\right ) \log (x)}{1-4 x+2 x^2+4 x^3+x^4+\left (2 x-4 x^2-2 x^3\right ) \log (x)+x^2 \log ^2(x)} \, dx=- \frac {3 x^{2}}{- x^{2} + x \log {\left (x \right )} - 2 x + 1} - \frac {3 x e^{x^{2}}}{x^{2} - x \log {\left (x \right )} + 2 x - 1} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 12.48 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.04 \[ \int \frac {-6 x+9 x^2+e^{x^2} \left (3-3 x+9 x^2-12 x^3-6 x^4\right )+\left (-3 x^2+6 e^{x^2} x^3\right ) \log (x)}{1-4 x+2 x^2+4 x^3+x^4+\left (2 x-4 x^2-2 x^3\right ) \log (x)+x^2 \log ^2(x)} \, dx=\frac {3\,x\,\left (x-{\mathrm {e}}^{x^2}\right )}{2\,x-x\,\ln \left (x\right )+x^2-1} \]

[In]

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

[Out]

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