\(\int \frac {e^{-x} ((-36+24 e^2-4 e^4) \log (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2})+(-9 x+6 e^2 x-e^4 x-27 x^2) \log ^2(\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}))}{9 x-6 e^2 x+e^4 x+27 x^2} \, dx\) [7504]

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

Optimal result

Integrand size = 154, antiderivative size = 28 \[ \int \frac {e^{-x} \left (\left (-36+24 e^2-4 e^4\right ) \log \left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )+\left (-9 x+6 e^2 x-e^4 x-27 x^2\right ) \log ^2\left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )\right )}{9 x-6 e^2 x+e^4 x+27 x^2} \, dx=e^{-x} \log ^2\left (\left (3+\frac {\left (-1+\frac {e^2}{3}\right )^2}{x}\right )^2\right ) \]

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(88\) vs. \(2(28)=56\).

Time = 0.16 (sec) , antiderivative size = 88, normalized size of antiderivative = 3.14, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.019, Rules used = {6, 1607, 2326} \[ \int \frac {e^{-x} \left (\left (-36+24 e^2-4 e^4\right ) \log \left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )+\left (-9 x+6 e^2 x-e^4 x-27 x^2\right ) \log ^2\left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )\right )}{9 x-6 e^2 x+e^4 x+27 x^2} \, dx=\frac {e^{-x} \left (27 x^2+e^4 x-6 e^2 x+9 x\right ) \log ^2\left (\frac {729 x^2+486 x+54 e^4 (x+1)-108 e^2 (3 x+1)+e^8-12 e^6+81}{81 x^2}\right )}{x \left (27 x+\left (e^2-3\right )^2\right )} \]

[In]

Int[((-36 + 24*E^2 - 4*E^4)*Log[(81 - 12*E^6 + E^8 + E^2*(-108 - 324*x) + 486*x + 729*x^2 + E^4*(54 + 54*x))/(
81*x^2)] + (-9*x + 6*E^2*x - E^4*x - 27*x^2)*Log[(81 - 12*E^6 + E^8 + E^2*(-108 - 324*x) + 486*x + 729*x^2 + E
^4*(54 + 54*x))/(81*x^2)]^2)/(E^x*(9*x - 6*E^2*x + E^4*x + 27*x^2)),x]

[Out]

((9*x - 6*E^2*x + E^4*x + 27*x^2)*Log[(81 - 12*E^6 + E^8 + 486*x + 729*x^2 + 54*E^4*(1 + x) - 108*E^2*(1 + 3*x
))/(81*x^2)]^2)/(E^x*x*((-3 + E^2)^2 + 27*x))

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, x]

Rule 1607

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

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}& = \int \frac {e^{-x} \left (\left (-36+24 e^2-4 e^4\right ) \log \left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )+\left (-9 x+6 e^2 x-e^4 x-27 x^2\right ) \log ^2\left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )\right )}{e^4 x+\left (9-6 e^2\right ) x+27 x^2} \, dx \\ & = \int \frac {e^{-x} \left (\left (-36+24 e^2-4 e^4\right ) \log \left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )+\left (-9 x+6 e^2 x-e^4 x-27 x^2\right ) \log ^2\left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )\right )}{\left (9-6 e^2+e^4\right ) x+27 x^2} \, dx \\ & = \int \frac {e^{-x} \left (\left (-36+24 e^2-4 e^4\right ) \log \left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )+\left (-9 x+6 e^2 x-e^4 x-27 x^2\right ) \log ^2\left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )\right )}{x \left (9-6 e^2+e^4+27 x\right )} \, dx \\ & = \frac {e^{-x} \left (9 x-6 e^2 x+e^4 x+27 x^2\right ) \log ^2\left (\frac {81-12 e^6+e^8+486 x+729 x^2+54 e^4 (1+x)-108 e^2 (1+3 x)}{81 x^2}\right )}{x \left (\left (-3+e^2\right )^2+27 x\right )} \\ \end{align*}

Mathematica [F]

\[ \int \frac {e^{-x} \left (\left (-36+24 e^2-4 e^4\right ) \log \left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )+\left (-9 x+6 e^2 x-e^4 x-27 x^2\right ) \log ^2\left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )\right )}{9 x-6 e^2 x+e^4 x+27 x^2} \, dx=\int \frac {e^{-x} \left (\left (-36+24 e^2-4 e^4\right ) \log \left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )+\left (-9 x+6 e^2 x-e^4 x-27 x^2\right ) \log ^2\left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )\right )}{9 x-6 e^2 x+e^4 x+27 x^2} \, dx \]

[In]

Integrate[((-36 + 24*E^2 - 4*E^4)*Log[(81 - 12*E^6 + E^8 + E^2*(-108 - 324*x) + 486*x + 729*x^2 + E^4*(54 + 54
*x))/(81*x^2)] + (-9*x + 6*E^2*x - E^4*x - 27*x^2)*Log[(81 - 12*E^6 + E^8 + E^2*(-108 - 324*x) + 486*x + 729*x
^2 + E^4*(54 + 54*x))/(81*x^2)]^2)/(E^x*(9*x - 6*E^2*x + E^4*x + 27*x^2)),x]

[Out]

Integrate[((-36 + 24*E^2 - 4*E^4)*Log[(81 - 12*E^6 + E^8 + E^2*(-108 - 324*x) + 486*x + 729*x^2 + E^4*(54 + 54
*x))/(81*x^2)] + (-9*x + 6*E^2*x - E^4*x - 27*x^2)*Log[(81 - 12*E^6 + E^8 + E^2*(-108 - 324*x) + 486*x + 729*x
^2 + E^4*(54 + 54*x))/(81*x^2)]^2)/(E^x*(9*x - 6*E^2*x + E^4*x + 27*x^2)), x]

Maple [B] (verified)

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

Time = 1.00 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.86

method result size
norman \(\ln \left (\frac {{\mathrm e}^{8}-12 \,{\mathrm e}^{6}+\left (54 x +54\right ) {\mathrm e}^{4}+\left (-324 x -108\right ) {\mathrm e}^{2}+729 x^{2}+486 x +81}{81 x^{2}}\right )^{2} {\mathrm e}^{-x}\) \(52\)
parallelrisch \(\ln \left (\frac {{\mathrm e}^{8}-12 \,{\mathrm e}^{6}+\left (54 x +54\right ) {\mathrm e}^{4}+\left (-324 x -108\right ) {\mathrm e}^{2}+729 x^{2}+486 x +81}{81 x^{2}}\right )^{2} {\mathrm e}^{-x}\) \(52\)
risch \(\text {Expression too large to display}\) \(3672\)

[In]

int(((-x*exp(2)^2+6*exp(2)*x-27*x^2-9*x)*ln(1/81*(exp(2)^4-12*exp(2)^3+(54*x+54)*exp(2)^2+(-324*x-108)*exp(2)+
729*x^2+486*x+81)/x^2)^2+(-4*exp(2)^2+24*exp(2)-36)*ln(1/81*(exp(2)^4-12*exp(2)^3+(54*x+54)*exp(2)^2+(-324*x-1
08)*exp(2)+729*x^2+486*x+81)/x^2))/(x*exp(2)^2-6*exp(2)*x+27*x^2+9*x)/exp(x),x,method=_RETURNVERBOSE)

[Out]

ln(1/81*(exp(2)^4-12*exp(2)^3+(54*x+54)*exp(2)^2+(-324*x-108)*exp(2)+729*x^2+486*x+81)/x^2)^2/exp(x)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.61 \[ \int \frac {e^{-x} \left (\left (-36+24 e^2-4 e^4\right ) \log \left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )+\left (-9 x+6 e^2 x-e^4 x-27 x^2\right ) \log ^2\left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )\right )}{9 x-6 e^2 x+e^4 x+27 x^2} \, dx=e^{\left (-x\right )} \log \left (\frac {729 \, x^{2} + 54 \, {\left (x + 1\right )} e^{4} - 108 \, {\left (3 \, x + 1\right )} e^{2} + 486 \, x + e^{8} - 12 \, e^{6} + 81}{81 \, x^{2}}\right )^{2} \]

[In]

integrate(((-x*exp(2)^2+6*exp(2)*x-27*x^2-9*x)*log(1/81*(exp(2)^4-12*exp(2)^3+(54*x+54)*exp(2)^2+(-324*x-108)*
exp(2)+729*x^2+486*x+81)/x^2)^2+(-4*exp(2)^2+24*exp(2)-36)*log(1/81*(exp(2)^4-12*exp(2)^3+(54*x+54)*exp(2)^2+(
-324*x-108)*exp(2)+729*x^2+486*x+81)/x^2))/(x*exp(2)^2-6*exp(2)*x+27*x^2+9*x)/exp(x),x, algorithm="fricas")

[Out]

e^(-x)*log(1/81*(729*x^2 + 54*(x + 1)*e^4 - 108*(3*x + 1)*e^2 + 486*x + e^8 - 12*e^6 + 81)/x^2)^2

Sympy [F(-1)]

Timed out. \[ \int \frac {e^{-x} \left (\left (-36+24 e^2-4 e^4\right ) \log \left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )+\left (-9 x+6 e^2 x-e^4 x-27 x^2\right ) \log ^2\left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )\right )}{9 x-6 e^2 x+e^4 x+27 x^2} \, dx=\text {Timed out} \]

[In]

integrate(((-x*exp(2)**2+6*exp(2)*x-27*x**2-9*x)*ln(1/81*(exp(2)**4-12*exp(2)**3+(54*x+54)*exp(2)**2+(-324*x-1
08)*exp(2)+729*x**2+486*x+81)/x**2)**2+(-4*exp(2)**2+24*exp(2)-36)*ln(1/81*(exp(2)**4-12*exp(2)**3+(54*x+54)*e
xp(2)**2+(-324*x-108)*exp(2)+729*x**2+486*x+81)/x**2))/(x*exp(2)**2-6*exp(2)*x+27*x**2+9*x)/exp(x),x)

[Out]

Timed out

Maxima [B] (verification not implemented)

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

Time = 0.35 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.07 \[ \int \frac {e^{-x} \left (\left (-36+24 e^2-4 e^4\right ) \log \left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )+\left (-9 x+6 e^2 x-e^4 x-27 x^2\right ) \log ^2\left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )\right )}{9 x-6 e^2 x+e^4 x+27 x^2} \, dx=4 \, {\left (4 \, \log \left (3\right )^{2} - 2 \, {\left (2 \, \log \left (3\right ) + \log \left (x\right )\right )} \log \left (27 \, x + e^{4} - 6 \, e^{2} + 9\right ) + \log \left (27 \, x + e^{4} - 6 \, e^{2} + 9\right )^{2} + 4 \, \log \left (3\right ) \log \left (x\right ) + \log \left (x\right )^{2}\right )} e^{\left (-x\right )} \]

[In]

integrate(((-x*exp(2)^2+6*exp(2)*x-27*x^2-9*x)*log(1/81*(exp(2)^4-12*exp(2)^3+(54*x+54)*exp(2)^2+(-324*x-108)*
exp(2)+729*x^2+486*x+81)/x^2)^2+(-4*exp(2)^2+24*exp(2)-36)*log(1/81*(exp(2)^4-12*exp(2)^3+(54*x+54)*exp(2)^2+(
-324*x-108)*exp(2)+729*x^2+486*x+81)/x^2))/(x*exp(2)^2-6*exp(2)*x+27*x^2+9*x)/exp(x),x, algorithm="maxima")

[Out]

4*(4*log(3)^2 - 2*(2*log(3) + log(x))*log(27*x + e^4 - 6*e^2 + 9) + log(27*x + e^4 - 6*e^2 + 9)^2 + 4*log(3)*l
og(x) + log(x)^2)*e^(-x)

Giac [A] (verification not implemented)

none

Time = 1.46 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.68 \[ \int \frac {e^{-x} \left (\left (-36+24 e^2-4 e^4\right ) \log \left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )+\left (-9 x+6 e^2 x-e^4 x-27 x^2\right ) \log ^2\left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )\right )}{9 x-6 e^2 x+e^4 x+27 x^2} \, dx=e^{\left (-x\right )} \log \left (\frac {729 \, x^{2} + 54 \, x e^{4} - 324 \, x e^{2} + 486 \, x + e^{8} - 12 \, e^{6} + 54 \, e^{4} - 108 \, e^{2} + 81}{81 \, x^{2}}\right )^{2} \]

[In]

integrate(((-x*exp(2)^2+6*exp(2)*x-27*x^2-9*x)*log(1/81*(exp(2)^4-12*exp(2)^3+(54*x+54)*exp(2)^2+(-324*x-108)*
exp(2)+729*x^2+486*x+81)/x^2)^2+(-4*exp(2)^2+24*exp(2)-36)*log(1/81*(exp(2)^4-12*exp(2)^3+(54*x+54)*exp(2)^2+(
-324*x-108)*exp(2)+729*x^2+486*x+81)/x^2))/(x*exp(2)^2-6*exp(2)*x+27*x^2+9*x)/exp(x),x, algorithm="giac")

[Out]

e^(-x)*log(1/81*(729*x^2 + 54*x*e^4 - 324*x*e^2 + 486*x + e^8 - 12*e^6 + 54*e^4 - 108*e^2 + 81)/x^2)^2

Mupad [B] (verification not implemented)

Time = 14.42 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.71 \[ \int \frac {e^{-x} \left (\left (-36+24 e^2-4 e^4\right ) \log \left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )+\left (-9 x+6 e^2 x-e^4 x-27 x^2\right ) \log ^2\left (\frac {81-12 e^6+e^8+e^2 (-108-324 x)+486 x+729 x^2+e^4 (54+54 x)}{81 x^2}\right )\right )}{9 x-6 e^2 x+e^4 x+27 x^2} \, dx={\mathrm {e}}^{-x}\,{\ln \left (\frac {6\,x-\frac {4\,{\mathrm {e}}^6}{27}+\frac {{\mathrm {e}}^8}{81}+9\,x^2+\frac {{\mathrm {e}}^4\,\left (54\,x+54\right )}{81}-\frac {{\mathrm {e}}^2\,\left (324\,x+108\right )}{81}+1}{x^2}\right )}^2 \]

[In]

int(-(exp(-x)*(log((6*x - (4*exp(6))/27 + exp(8)/81 + 9*x^2 + (exp(4)*(54*x + 54))/81 - (exp(2)*(324*x + 108))
/81 + 1)/x^2)^2*(9*x - 6*x*exp(2) + x*exp(4) + 27*x^2) + log((6*x - (4*exp(6))/27 + exp(8)/81 + 9*x^2 + (exp(4
)*(54*x + 54))/81 - (exp(2)*(324*x + 108))/81 + 1)/x^2)*(4*exp(4) - 24*exp(2) + 36)))/(9*x - 6*x*exp(2) + x*ex
p(4) + 27*x^2),x)

[Out]

exp(-x)*log((6*x - (4*exp(6))/27 + exp(8)/81 + 9*x^2 + (exp(4)*(54*x + 54))/81 - (exp(2)*(324*x + 108))/81 + 1
)/x^2)^2