\(\int \frac {-3 e^x x^3+e^{2 x} (2 x+x^4)+(e^{2 x} (18-6 x+36 x^3-12 x^4)+e^x (-81 x^2+54 x^3-9 x^4)+(e^{2 x} (6-2 x+12 x^3-4 x^4)+e^x (-27 x^2+18 x^3-3 x^4)) \log (3-x)) \log (3+\log (3-x))}{-81 x^6+27 x^7+e^x (108 x^4-36 x^5+54 x^7-18 x^8)+e^{2 x} (-36 x^2+12 x^3-36 x^5+12 x^6-9 x^8+3 x^9)+(-27 x^6+9 x^7+e^x (36 x^4-12 x^5+18 x^7-6 x^8)+e^{2 x} (-12 x^2+4 x^3-12 x^5+4 x^6-3 x^8+x^9)) \log (3-x)} \, dx\) [7832]

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

Optimal result

Integrand size = 277, antiderivative size = 30 \[ \int \frac {-3 e^x x^3+e^{2 x} \left (2 x+x^4\right )+\left (e^{2 x} \left (18-6 x+36 x^3-12 x^4\right )+e^x \left (-81 x^2+54 x^3-9 x^4\right )+\left (e^{2 x} \left (6-2 x+12 x^3-4 x^4\right )+e^x \left (-27 x^2+18 x^3-3 x^4\right )\right ) \log (3-x)\right ) \log (3+\log (3-x))}{-81 x^6+27 x^7+e^x \left (108 x^4-36 x^5+54 x^7-18 x^8\right )+e^{2 x} \left (-36 x^2+12 x^3-36 x^5+12 x^6-9 x^8+3 x^9\right )+\left (-27 x^6+9 x^7+e^x \left (36 x^4-12 x^5+18 x^7-6 x^8\right )+e^{2 x} \left (-12 x^2+4 x^3-12 x^5+4 x^6-3 x^8+x^9\right )\right ) \log (3-x)} \, dx=\frac {\log (3+\log (3-x))}{x \left (2+x^2 \left (-3 e^{-x}+x\right )\right )} \]

[Out]

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

Rubi [F(-1)]

Timed out. \[ \int \frac {-3 e^x x^3+e^{2 x} \left (2 x+x^4\right )+\left (e^{2 x} \left (18-6 x+36 x^3-12 x^4\right )+e^x \left (-81 x^2+54 x^3-9 x^4\right )+\left (e^{2 x} \left (6-2 x+12 x^3-4 x^4\right )+e^x \left (-27 x^2+18 x^3-3 x^4\right )\right ) \log (3-x)\right ) \log (3+\log (3-x))}{-81 x^6+27 x^7+e^x \left (108 x^4-36 x^5+54 x^7-18 x^8\right )+e^{2 x} \left (-36 x^2+12 x^3-36 x^5+12 x^6-9 x^8+3 x^9\right )+\left (-27 x^6+9 x^7+e^x \left (36 x^4-12 x^5+18 x^7-6 x^8\right )+e^{2 x} \left (-12 x^2+4 x^3-12 x^5+4 x^6-3 x^8+x^9\right )\right ) \log (3-x)} \, dx=\text {\$Aborted} \]

[In]

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

[Out]

$Aborted

Rubi steps Aborted

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.03 \[ \int \frac {-3 e^x x^3+e^{2 x} \left (2 x+x^4\right )+\left (e^{2 x} \left (18-6 x+36 x^3-12 x^4\right )+e^x \left (-81 x^2+54 x^3-9 x^4\right )+\left (e^{2 x} \left (6-2 x+12 x^3-4 x^4\right )+e^x \left (-27 x^2+18 x^3-3 x^4\right )\right ) \log (3-x)\right ) \log (3+\log (3-x))}{-81 x^6+27 x^7+e^x \left (108 x^4-36 x^5+54 x^7-18 x^8\right )+e^{2 x} \left (-36 x^2+12 x^3-36 x^5+12 x^6-9 x^8+3 x^9\right )+\left (-27 x^6+9 x^7+e^x \left (36 x^4-12 x^5+18 x^7-6 x^8\right )+e^{2 x} \left (-12 x^2+4 x^3-12 x^5+4 x^6-3 x^8+x^9\right )\right ) \log (3-x)} \, dx=\frac {e^x \log (3+\log (3-x))}{-3 x^3+e^x x \left (2+x^3\right )} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.05 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.13

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

[In]

int(((((-4*x^4+12*x^3-2*x+6)*exp(x)^2+(-3*x^4+18*x^3-27*x^2)*exp(x))*ln(-x+3)+(-12*x^4+36*x^3-6*x+18)*exp(x)^2
+(-9*x^4+54*x^3-81*x^2)*exp(x))*ln(ln(-x+3)+3)+(x^4+2*x)*exp(x)^2-3*exp(x)*x^3)/(((x^9-3*x^8+4*x^6-12*x^5+4*x^
3-12*x^2)*exp(x)^2+(-6*x^8+18*x^7-12*x^5+36*x^4)*exp(x)+9*x^7-27*x^6)*ln(-x+3)+(3*x^9-9*x^8+12*x^6-36*x^5+12*x
^3-36*x^2)*exp(x)^2+(-18*x^8+54*x^7-36*x^5+108*x^4)*exp(x)+27*x^7-81*x^6),x)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.07 \[ \int \frac {-3 e^x x^3+e^{2 x} \left (2 x+x^4\right )+\left (e^{2 x} \left (18-6 x+36 x^3-12 x^4\right )+e^x \left (-81 x^2+54 x^3-9 x^4\right )+\left (e^{2 x} \left (6-2 x+12 x^3-4 x^4\right )+e^x \left (-27 x^2+18 x^3-3 x^4\right )\right ) \log (3-x)\right ) \log (3+\log (3-x))}{-81 x^6+27 x^7+e^x \left (108 x^4-36 x^5+54 x^7-18 x^8\right )+e^{2 x} \left (-36 x^2+12 x^3-36 x^5+12 x^6-9 x^8+3 x^9\right )+\left (-27 x^6+9 x^7+e^x \left (36 x^4-12 x^5+18 x^7-6 x^8\right )+e^{2 x} \left (-12 x^2+4 x^3-12 x^5+4 x^6-3 x^8+x^9\right )\right ) \log (3-x)} \, dx=-\frac {e^{x} \log \left (\log \left (-x + 3\right ) + 3\right )}{3 \, x^{3} - {\left (x^{4} + 2 \, x\right )} e^{x}} \]

[In]

integrate(((((-4*x^4+12*x^3-2*x+6)*exp(x)^2+(-3*x^4+18*x^3-27*x^2)*exp(x))*log(-x+3)+(-12*x^4+36*x^3-6*x+18)*e
xp(x)^2+(-9*x^4+54*x^3-81*x^2)*exp(x))*log(log(-x+3)+3)+(x^4+2*x)*exp(x)^2-3*exp(x)*x^3)/(((x^9-3*x^8+4*x^6-12
*x^5+4*x^3-12*x^2)*exp(x)^2+(-6*x^8+18*x^7-12*x^5+36*x^4)*exp(x)+9*x^7-27*x^6)*log(-x+3)+(3*x^9-9*x^8+12*x^6-3
6*x^5+12*x^3-36*x^2)*exp(x)^2+(-18*x^8+54*x^7-36*x^5+108*x^4)*exp(x)+27*x^7-81*x^6),x, algorithm="fricas")

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 49 vs. \(2 (20) = 40\).

Time = 0.32 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.63 \[ \int \frac {-3 e^x x^3+e^{2 x} \left (2 x+x^4\right )+\left (e^{2 x} \left (18-6 x+36 x^3-12 x^4\right )+e^x \left (-81 x^2+54 x^3-9 x^4\right )+\left (e^{2 x} \left (6-2 x+12 x^3-4 x^4\right )+e^x \left (-27 x^2+18 x^3-3 x^4\right )\right ) \log (3-x)\right ) \log (3+\log (3-x))}{-81 x^6+27 x^7+e^x \left (108 x^4-36 x^5+54 x^7-18 x^8\right )+e^{2 x} \left (-36 x^2+12 x^3-36 x^5+12 x^6-9 x^8+3 x^9\right )+\left (-27 x^6+9 x^7+e^x \left (36 x^4-12 x^5+18 x^7-6 x^8\right )+e^{2 x} \left (-12 x^2+4 x^3-12 x^5+4 x^6-3 x^8+x^9\right )\right ) \log (3-x)} \, dx=\frac {3 x \log {\left (\log {\left (3 - x \right )} + 3 \right )}}{- 3 x^{5} - 6 x^{2} + \left (x^{6} + 4 x^{3} + 4\right ) e^{x}} + \frac {\log {\left (\log {\left (3 - x \right )} + 3 \right )}}{x^{4} + 2 x} \]

[In]

integrate(((((-4*x**4+12*x**3-2*x+6)*exp(x)**2+(-3*x**4+18*x**3-27*x**2)*exp(x))*ln(-x+3)+(-12*x**4+36*x**3-6*
x+18)*exp(x)**2+(-9*x**4+54*x**3-81*x**2)*exp(x))*ln(ln(-x+3)+3)+(x**4+2*x)*exp(x)**2-3*exp(x)*x**3)/(((x**9-3
*x**8+4*x**6-12*x**5+4*x**3-12*x**2)*exp(x)**2+(-6*x**8+18*x**7-12*x**5+36*x**4)*exp(x)+9*x**7-27*x**6)*ln(-x+
3)+(3*x**9-9*x**8+12*x**6-36*x**5+12*x**3-36*x**2)*exp(x)**2+(-18*x**8+54*x**7-36*x**5+108*x**4)*exp(x)+27*x**
7-81*x**6),x)

[Out]

3*x*log(log(3 - x) + 3)/(-3*x**5 - 6*x**2 + (x**6 + 4*x**3 + 4)*exp(x)) + log(log(3 - x) + 3)/(x**4 + 2*x)

Maxima [A] (verification not implemented)

none

Time = 0.36 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.07 \[ \int \frac {-3 e^x x^3+e^{2 x} \left (2 x+x^4\right )+\left (e^{2 x} \left (18-6 x+36 x^3-12 x^4\right )+e^x \left (-81 x^2+54 x^3-9 x^4\right )+\left (e^{2 x} \left (6-2 x+12 x^3-4 x^4\right )+e^x \left (-27 x^2+18 x^3-3 x^4\right )\right ) \log (3-x)\right ) \log (3+\log (3-x))}{-81 x^6+27 x^7+e^x \left (108 x^4-36 x^5+54 x^7-18 x^8\right )+e^{2 x} \left (-36 x^2+12 x^3-36 x^5+12 x^6-9 x^8+3 x^9\right )+\left (-27 x^6+9 x^7+e^x \left (36 x^4-12 x^5+18 x^7-6 x^8\right )+e^{2 x} \left (-12 x^2+4 x^3-12 x^5+4 x^6-3 x^8+x^9\right )\right ) \log (3-x)} \, dx=-\frac {e^{x} \log \left (\log \left (-x + 3\right ) + 3\right )}{3 \, x^{3} - {\left (x^{4} + 2 \, x\right )} e^{x}} \]

[In]

integrate(((((-4*x^4+12*x^3-2*x+6)*exp(x)^2+(-3*x^4+18*x^3-27*x^2)*exp(x))*log(-x+3)+(-12*x^4+36*x^3-6*x+18)*e
xp(x)^2+(-9*x^4+54*x^3-81*x^2)*exp(x))*log(log(-x+3)+3)+(x^4+2*x)*exp(x)^2-3*exp(x)*x^3)/(((x^9-3*x^8+4*x^6-12
*x^5+4*x^3-12*x^2)*exp(x)^2+(-6*x^8+18*x^7-12*x^5+36*x^4)*exp(x)+9*x^7-27*x^6)*log(-x+3)+(3*x^9-9*x^8+12*x^6-3
6*x^5+12*x^3-36*x^2)*exp(x)^2+(-18*x^8+54*x^7-36*x^5+108*x^4)*exp(x)+27*x^7-81*x^6),x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.38 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.03 \[ \int \frac {-3 e^x x^3+e^{2 x} \left (2 x+x^4\right )+\left (e^{2 x} \left (18-6 x+36 x^3-12 x^4\right )+e^x \left (-81 x^2+54 x^3-9 x^4\right )+\left (e^{2 x} \left (6-2 x+12 x^3-4 x^4\right )+e^x \left (-27 x^2+18 x^3-3 x^4\right )\right ) \log (3-x)\right ) \log (3+\log (3-x))}{-81 x^6+27 x^7+e^x \left (108 x^4-36 x^5+54 x^7-18 x^8\right )+e^{2 x} \left (-36 x^2+12 x^3-36 x^5+12 x^6-9 x^8+3 x^9\right )+\left (-27 x^6+9 x^7+e^x \left (36 x^4-12 x^5+18 x^7-6 x^8\right )+e^{2 x} \left (-12 x^2+4 x^3-12 x^5+4 x^6-3 x^8+x^9\right )\right ) \log (3-x)} \, dx=\frac {e^{x} \log \left (\log \left (-x + 3\right ) + 3\right )}{x^{4} e^{x} - 3 \, x^{3} + 2 \, x e^{x}} \]

[In]

integrate(((((-4*x^4+12*x^3-2*x+6)*exp(x)^2+(-3*x^4+18*x^3-27*x^2)*exp(x))*log(-x+3)+(-12*x^4+36*x^3-6*x+18)*e
xp(x)^2+(-9*x^4+54*x^3-81*x^2)*exp(x))*log(log(-x+3)+3)+(x^4+2*x)*exp(x)^2-3*exp(x)*x^3)/(((x^9-3*x^8+4*x^6-12
*x^5+4*x^3-12*x^2)*exp(x)^2+(-6*x^8+18*x^7-12*x^5+36*x^4)*exp(x)+9*x^7-27*x^6)*log(-x+3)+(3*x^9-9*x^8+12*x^6-3
6*x^5+12*x^3-36*x^2)*exp(x)^2+(-18*x^8+54*x^7-36*x^5+108*x^4)*exp(x)+27*x^7-81*x^6),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 15.64 (sec) , antiderivative size = 171, normalized size of antiderivative = 5.70 \[ \int \frac {-3 e^x x^3+e^{2 x} \left (2 x+x^4\right )+\left (e^{2 x} \left (18-6 x+36 x^3-12 x^4\right )+e^x \left (-81 x^2+54 x^3-9 x^4\right )+\left (e^{2 x} \left (6-2 x+12 x^3-4 x^4\right )+e^x \left (-27 x^2+18 x^3-3 x^4\right )\right ) \log (3-x)\right ) \log (3+\log (3-x))}{-81 x^6+27 x^7+e^x \left (108 x^4-36 x^5+54 x^7-18 x^8\right )+e^{2 x} \left (-36 x^2+12 x^3-36 x^5+12 x^6-9 x^8+3 x^9\right )+\left (-27 x^6+9 x^7+e^x \left (36 x^4-12 x^5+18 x^7-6 x^8\right )+e^{2 x} \left (-12 x^2+4 x^3-12 x^5+4 x^6-3 x^8+x^9\right )\right ) \log (3-x)} \, dx=\frac {3\,\ln \left (\ln \left (3-x\right )+3\right )\,\left (3\,x^3-x^4\right )}{\left (x^3+2\right )\,\left ({\mathrm {e}}^x\,\left (-x^6+3\,x^5-2\,x^3+6\,x^2\right )-9\,x^4+3\,x^5\right )}-\frac {\ln \left (\ln \left (3-x\right )+3\right )\,\left (\frac {9\,x^4-3\,x^5}{x^4+2\,x}-\frac {{\mathrm {e}}^x\,\left (-x^6+3\,x^5-2\,x^3+6\,x^2\right )}{x^4+2\,x}\right )}{{\mathrm {e}}^x\,\left (-x^6+3\,x^5-2\,x^3+6\,x^2\right )-9\,x^4+3\,x^5} \]

[In]

int((3*x^3*exp(x) + log(log(3 - x) + 3)*(exp(2*x)*(6*x - 36*x^3 + 12*x^4 - 18) + exp(x)*(81*x^2 - 54*x^3 + 9*x
^4) + log(3 - x)*(exp(2*x)*(2*x - 12*x^3 + 4*x^4 - 6) + exp(x)*(27*x^2 - 18*x^3 + 3*x^4))) - exp(2*x)*(2*x + x
^4))/(exp(2*x)*(36*x^2 - 12*x^3 + 36*x^5 - 12*x^6 + 9*x^8 - 3*x^9) - exp(x)*(108*x^4 - 36*x^5 + 54*x^7 - 18*x^
8) + log(3 - x)*(exp(2*x)*(12*x^2 - 4*x^3 + 12*x^5 - 4*x^6 + 3*x^8 - x^9) - exp(x)*(36*x^4 - 12*x^5 + 18*x^7 -
 6*x^8) + 27*x^6 - 9*x^7) + 81*x^6 - 27*x^7),x)

[Out]

(3*log(log(3 - x) + 3)*(3*x^3 - x^4))/((x^3 + 2)*(exp(x)*(6*x^2 - 2*x^3 + 3*x^5 - x^6) - 9*x^4 + 3*x^5)) - (lo
g(log(3 - x) + 3)*((9*x^4 - 3*x^5)/(2*x + x^4) - (exp(x)*(6*x^2 - 2*x^3 + 3*x^5 - x^6))/(2*x + x^4)))/(exp(x)*
(6*x^2 - 2*x^3 + 3*x^5 - x^6) - 9*x^4 + 3*x^5)