\(\int \frac {e^{\frac {(-9 x-27 x^2) \log ^2(3)}{-x-x^2+e^4 (1+3 x)}} (x^2+2 x^3+x^4+e^8 (1+6 x+9 x^2)+e^4 (-2 x-8 x^2-6 x^3)+(18 x^3+e^4 (-9 x-54 x^2-81 x^3)) \log ^2(3))}{x^2+2 x^3+x^4+e^8 (1+6 x+9 x^2)+e^4 (-2 x-8 x^2-6 x^3)} \, dx\) [4994]

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

Optimal result

Integrand size = 156, antiderivative size = 32 \[ \int \frac {e^{\frac {\left (-9 x-27 x^2\right ) \log ^2(3)}{-x-x^2+e^4 (1+3 x)}} \left (x^2+2 x^3+x^4+e^8 \left (1+6 x+9 x^2\right )+e^4 \left (-2 x-8 x^2-6 x^3\right )+\left (18 x^3+e^4 \left (-9 x-54 x^2-81 x^3\right )\right ) \log ^2(3)\right )}{x^2+2 x^3+x^4+e^8 \left (1+6 x+9 x^2\right )+e^4 \left (-2 x-8 x^2-6 x^3\right )} \, dx=e^{\frac {9 x \log ^2(3)}{-e^4+\frac {x+x^2}{1+3 x}}} x \]

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(164\) vs. \(2(32)=64\).

Time = 0.16 (sec) , antiderivative size = 164, normalized size of antiderivative = 5.12, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.006, Rules used = {2326} \[ \int \frac {e^{\frac {\left (-9 x-27 x^2\right ) \log ^2(3)}{-x-x^2+e^4 (1+3 x)}} \left (x^2+2 x^3+x^4+e^8 \left (1+6 x+9 x^2\right )+e^4 \left (-2 x-8 x^2-6 x^3\right )+\left (18 x^3+e^4 \left (-9 x-54 x^2-81 x^3\right )\right ) \log ^2(3)\right )}{x^2+2 x^3+x^4+e^8 \left (1+6 x+9 x^2\right )+e^4 \left (-2 x-8 x^2-6 x^3\right )} \, dx=-\frac {\left (2 x^3-e^4 \left (9 x^3+6 x^2+x\right )\right ) \exp \left (\frac {9 \left (3 x^2+x\right ) \log ^2(3)}{x^2+x-e^4 (3 x+1)}\right )}{\left (x^4+2 x^3+x^2+e^8 \left (9 x^2+6 x+1\right )-2 e^4 \left (3 x^3+4 x^2+x\right )\right ) \left (\frac {\left (2 x-3 e^4+1\right ) \left (3 x^2+x\right )}{\left (x^2+x-e^4 (3 x+1)\right )^2}-\frac {6 x+1}{x^2+x-e^4 (3 x+1)}\right )} \]

[In]

Int[(E^(((-9*x - 27*x^2)*Log[3]^2)/(-x - x^2 + E^4*(1 + 3*x)))*(x^2 + 2*x^3 + x^4 + E^8*(1 + 6*x + 9*x^2) + E^
4*(-2*x - 8*x^2 - 6*x^3) + (18*x^3 + E^4*(-9*x - 54*x^2 - 81*x^3))*Log[3]^2))/(x^2 + 2*x^3 + x^4 + E^8*(1 + 6*
x + 9*x^2) + E^4*(-2*x - 8*x^2 - 6*x^3)),x]

[Out]

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

Rule 2326

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = v*(y/(Log[F]*D[u, x]))}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

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

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.06 \[ \int \frac {e^{\frac {\left (-9 x-27 x^2\right ) \log ^2(3)}{-x-x^2+e^4 (1+3 x)}} \left (x^2+2 x^3+x^4+e^8 \left (1+6 x+9 x^2\right )+e^4 \left (-2 x-8 x^2-6 x^3\right )+\left (18 x^3+e^4 \left (-9 x-54 x^2-81 x^3\right )\right ) \log ^2(3)\right )}{x^2+2 x^3+x^4+e^8 \left (1+6 x+9 x^2\right )+e^4 \left (-2 x-8 x^2-6 x^3\right )} \, dx=e^{\frac {9 x (1+3 x) \log ^2(3)}{x (1+x)-e^4 (1+3 x)}} x \]

[In]

Integrate[(E^(((-9*x - 27*x^2)*Log[3]^2)/(-x - x^2 + E^4*(1 + 3*x)))*(x^2 + 2*x^3 + x^4 + E^8*(1 + 6*x + 9*x^2
) + E^4*(-2*x - 8*x^2 - 6*x^3) + (18*x^3 + E^4*(-9*x - 54*x^2 - 81*x^3))*Log[3]^2))/(x^2 + 2*x^3 + x^4 + E^8*(
1 + 6*x + 9*x^2) + E^4*(-2*x - 8*x^2 - 6*x^3)),x]

[Out]

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

Maple [A] (verified)

Time = 0.80 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.06

method result size
gosper \(x \,{\mathrm e}^{-\frac {9 x \left (1+3 x \right ) \ln \left (3\right )^{2}}{3 x \,{\mathrm e}^{4}-x^{2}+{\mathrm e}^{4}-x}}\) \(34\)
risch \(x \,{\mathrm e}^{-\frac {9 x \left (1+3 x \right ) \ln \left (3\right )^{2}}{3 x \,{\mathrm e}^{4}-x^{2}+{\mathrm e}^{4}-x}}\) \(34\)
parallelrisch \(x \,{\mathrm e}^{\frac {\ln \left (3\right )^{2} \left (-27 x^{2}-9 x \right )}{3 x \,{\mathrm e}^{4}-x^{2}+{\mathrm e}^{4}-x}}\) \(36\)
norman \(\frac {x \,{\mathrm e}^{4} {\mathrm e}^{\frac {\left (-27 x^{2}-9 x \right ) \ln \left (3\right )^{2}}{\left (1+3 x \right ) {\mathrm e}^{4}-x^{2}-x}}+\left (3 \,{\mathrm e}^{4}-1\right ) x^{2} {\mathrm e}^{\frac {\left (-27 x^{2}-9 x \right ) \ln \left (3\right )^{2}}{\left (1+3 x \right ) {\mathrm e}^{4}-x^{2}-x}}-x^{3} {\mathrm e}^{\frac {\left (-27 x^{2}-9 x \right ) \ln \left (3\right )^{2}}{\left (1+3 x \right ) {\mathrm e}^{4}-x^{2}-x}}}{3 x \,{\mathrm e}^{4}-x^{2}+{\mathrm e}^{4}-x}\) \(142\)

[In]

int((((-81*x^3-54*x^2-9*x)*exp(4)+18*x^3)*ln(3)^2+(9*x^2+6*x+1)*exp(4)^2+(-6*x^3-8*x^2-2*x)*exp(4)+x^4+2*x^3+x
^2)*exp((-27*x^2-9*x)*ln(3)^2/((1+3*x)*exp(4)-x^2-x))/((9*x^2+6*x+1)*exp(4)^2+(-6*x^3-8*x^2-2*x)*exp(4)+x^4+2*
x^3+x^2),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.00 \[ \int \frac {e^{\frac {\left (-9 x-27 x^2\right ) \log ^2(3)}{-x-x^2+e^4 (1+3 x)}} \left (x^2+2 x^3+x^4+e^8 \left (1+6 x+9 x^2\right )+e^4 \left (-2 x-8 x^2-6 x^3\right )+\left (18 x^3+e^4 \left (-9 x-54 x^2-81 x^3\right )\right ) \log ^2(3)\right )}{x^2+2 x^3+x^4+e^8 \left (1+6 x+9 x^2\right )+e^4 \left (-2 x-8 x^2-6 x^3\right )} \, dx=x e^{\left (\frac {9 \, {\left (3 \, x^{2} + x\right )} \log \left (3\right )^{2}}{x^{2} - {\left (3 \, x + 1\right )} e^{4} + x}\right )} \]

[In]

integrate((((-81*x^3-54*x^2-9*x)*exp(4)+18*x^3)*log(3)^2+(9*x^2+6*x+1)*exp(4)^2+(-6*x^3-8*x^2-2*x)*exp(4)+x^4+
2*x^3+x^2)*exp((-27*x^2-9*x)*log(3)^2/((1+3*x)*exp(4)-x^2-x))/((9*x^2+6*x+1)*exp(4)^2+(-6*x^3-8*x^2-2*x)*exp(4
)+x^4+2*x^3+x^2),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 1.79 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.97 \[ \int \frac {e^{\frac {\left (-9 x-27 x^2\right ) \log ^2(3)}{-x-x^2+e^4 (1+3 x)}} \left (x^2+2 x^3+x^4+e^8 \left (1+6 x+9 x^2\right )+e^4 \left (-2 x-8 x^2-6 x^3\right )+\left (18 x^3+e^4 \left (-9 x-54 x^2-81 x^3\right )\right ) \log ^2(3)\right )}{x^2+2 x^3+x^4+e^8 \left (1+6 x+9 x^2\right )+e^4 \left (-2 x-8 x^2-6 x^3\right )} \, dx=x e^{\frac {\left (- 27 x^{2} - 9 x\right ) \log {\left (3 \right )}^{2}}{- x^{2} - x + \left (3 x + 1\right ) e^{4}}} \]

[In]

integrate((((-81*x**3-54*x**2-9*x)*exp(4)+18*x**3)*ln(3)**2+(9*x**2+6*x+1)*exp(4)**2+(-6*x**3-8*x**2-2*x)*exp(
4)+x**4+2*x**3+x**2)*exp((-27*x**2-9*x)*ln(3)**2/((1+3*x)*exp(4)-x**2-x))/((9*x**2+6*x+1)*exp(4)**2+(-6*x**3-8
*x**2-2*x)*exp(4)+x**4+2*x**3+x**2),x)

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 91 vs. \(2 (30) = 60\).

Time = 0.43 (sec) , antiderivative size = 91, normalized size of antiderivative = 2.84 \[ \int \frac {e^{\frac {\left (-9 x-27 x^2\right ) \log ^2(3)}{-x-x^2+e^4 (1+3 x)}} \left (x^2+2 x^3+x^4+e^8 \left (1+6 x+9 x^2\right )+e^4 \left (-2 x-8 x^2-6 x^3\right )+\left (18 x^3+e^4 \left (-9 x-54 x^2-81 x^3\right )\right ) \log ^2(3)\right )}{x^2+2 x^3+x^4+e^8 \left (1+6 x+9 x^2\right )+e^4 \left (-2 x-8 x^2-6 x^3\right )} \, dx=x e^{\left (\frac {81 \, x e^{4} \log \left (3\right )^{2}}{x^{2} - x {\left (3 \, e^{4} - 1\right )} - e^{4}} - \frac {18 \, x \log \left (3\right )^{2}}{x^{2} - x {\left (3 \, e^{4} - 1\right )} - e^{4}} + \frac {27 \, e^{4} \log \left (3\right )^{2}}{x^{2} - x {\left (3 \, e^{4} - 1\right )} - e^{4}} + 27 \, \log \left (3\right )^{2}\right )} \]

[In]

integrate((((-81*x^3-54*x^2-9*x)*exp(4)+18*x^3)*log(3)^2+(9*x^2+6*x+1)*exp(4)^2+(-6*x^3-8*x^2-2*x)*exp(4)+x^4+
2*x^3+x^2)*exp((-27*x^2-9*x)*log(3)^2/((1+3*x)*exp(4)-x^2-x))/((9*x^2+6*x+1)*exp(4)^2+(-6*x^3-8*x^2-2*x)*exp(4
)+x^4+2*x^3+x^2),x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.47 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.16 \[ \int \frac {e^{\frac {\left (-9 x-27 x^2\right ) \log ^2(3)}{-x-x^2+e^4 (1+3 x)}} \left (x^2+2 x^3+x^4+e^8 \left (1+6 x+9 x^2\right )+e^4 \left (-2 x-8 x^2-6 x^3\right )+\left (18 x^3+e^4 \left (-9 x-54 x^2-81 x^3\right )\right ) \log ^2(3)\right )}{x^2+2 x^3+x^4+e^8 \left (1+6 x+9 x^2\right )+e^4 \left (-2 x-8 x^2-6 x^3\right )} \, dx=x e^{\left (\frac {9 \, {\left (3 \, x^{2} \log \left (3\right )^{2} + x \log \left (3\right )^{2}\right )}}{x^{2} - 3 \, x e^{4} + x - e^{4}}\right )} \]

[In]

integrate((((-81*x^3-54*x^2-9*x)*exp(4)+18*x^3)*log(3)^2+(9*x^2+6*x+1)*exp(4)^2+(-6*x^3-8*x^2-2*x)*exp(4)+x^4+
2*x^3+x^2)*exp((-27*x^2-9*x)*log(3)^2/((1+3*x)*exp(4)-x^2-x))/((9*x^2+6*x+1)*exp(4)^2+(-6*x^3-8*x^2-2*x)*exp(4
)+x^4+2*x^3+x^2),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 13.69 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.16 \[ \int \frac {e^{\frac {\left (-9 x-27 x^2\right ) \log ^2(3)}{-x-x^2+e^4 (1+3 x)}} \left (x^2+2 x^3+x^4+e^8 \left (1+6 x+9 x^2\right )+e^4 \left (-2 x-8 x^2-6 x^3\right )+\left (18 x^3+e^4 \left (-9 x-54 x^2-81 x^3\right )\right ) \log ^2(3)\right )}{x^2+2 x^3+x^4+e^8 \left (1+6 x+9 x^2\right )+e^4 \left (-2 x-8 x^2-6 x^3\right )} \, dx=x\,{\mathrm {e}}^{\frac {27\,{\ln \left (3\right )}^2\,x^2+9\,{\ln \left (3\right )}^2\,x}{x-{\mathrm {e}}^4-3\,x\,{\mathrm {e}}^4+x^2}} \]

[In]

int((exp((log(3)^2*(9*x + 27*x^2))/(x + x^2 - exp(4)*(3*x + 1)))*(exp(8)*(6*x + 9*x^2 + 1) - log(3)^2*(exp(4)*
(9*x + 54*x^2 + 81*x^3) - 18*x^3) - exp(4)*(2*x + 8*x^2 + 6*x^3) + x^2 + 2*x^3 + x^4))/(exp(8)*(6*x + 9*x^2 +
1) - exp(4)*(2*x + 8*x^2 + 6*x^3) + x^2 + 2*x^3 + x^4),x)

[Out]

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