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

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

Optimal result

Integrand size = 141, antiderivative size = 33 \[ \int \frac {1-6 x+11 x^2-6 x^3+x^4+\left (18-54 x+18 x^2\right ) \log (3)+81 \log ^2(3)+e^{e^x-x} \left (\left (-1+x-2 x^2+x^3\right ) \log (3)+(-9+9 x) \log ^2(3)+e^x \left (\left (-x+3 x^2-x^3\right ) \log (3)-9 x \log ^2(3)\right )\right )}{1-6 x+11 x^2-6 x^3+x^4+\left (18-54 x+18 x^2\right ) \log (3)+81 \log ^2(3)} \, dx=x+\frac {e^{e^x-x} x}{-9+\frac {-(1-x)^2+x}{\log (3)}} \] Output:

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

Mathematica [A] (verified)

Time = 0.48 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.91 \[ \int \frac {1-6 x+11 x^2-6 x^3+x^4+\left (18-54 x+18 x^2\right ) \log (3)+81 \log ^2(3)+e^{e^x-x} \left (\left (-1+x-2 x^2+x^3\right ) \log (3)+(-9+9 x) \log ^2(3)+e^x \left (\left (-x+3 x^2-x^3\right ) \log (3)-9 x \log ^2(3)\right )\right )}{1-6 x+11 x^2-6 x^3+x^4+\left (18-54 x+18 x^2\right ) \log (3)+81 \log ^2(3)} \, dx=x-\frac {e^{e^x-x} x \log (3)}{1-3 x+x^2+9 \log (3)} \] Input:

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

Output:

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

Rubi [F]

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {x^4-6 x^3+11 x^2+\left (18 x^2-54 x+18\right ) \log (3)+e^{e^x-x} \left (e^x \left (\left (-x^3+3 x^2-x\right ) \log (3)-9 x \log ^2(3)\right )+\left (x^3-2 x^2+x-1\right ) \log (3)+(9 x-9) \log ^2(3)\right )-6 x+1+81 \log ^2(3)}{x^4-6 x^3+11 x^2+\left (18 x^2-54 x+18\right ) \log (3)-6 x+1+81 \log ^2(3)} \, dx\)

\(\Big \downarrow \) 2463

\(\displaystyle \int \left (\frac {4 i \left (x^4-6 x^3+11 x^2+\left (18 x^2-54 x+18\right ) \log (3)+e^{e^x-x} \left (e^x \left (\left (-x^3+3 x^2-x\right ) \log (3)-9 x \log ^2(3)\right )+\left (x^3-2 x^2+x-1\right ) \log (3)+(9 x-9) \log ^2(3)\right )-6 x+1+81 \log ^2(3)\right )}{(36 \log (3)-5)^{3/2} \left (-2 x+3+i \sqrt {36 \log (3)-5}\right )}+\frac {4 i \left (x^4-6 x^3+11 x^2+\left (18 x^2-54 x+18\right ) \log (3)+e^{e^x-x} \left (e^x \left (\left (-x^3+3 x^2-x\right ) \log (3)-9 x \log ^2(3)\right )+\left (x^3-2 x^2+x-1\right ) \log (3)+(9 x-9) \log ^2(3)\right )-6 x+1+81 \log ^2(3)\right )}{(36 \log (3)-5)^{3/2} \left (2 x-3+i \sqrt {36 \log (3)-5}\right )}-\frac {4 \left (x^4-6 x^3+11 x^2+\left (18 x^2-54 x+18\right ) \log (3)+e^{e^x-x} \left (e^x \left (\left (-x^3+3 x^2-x\right ) \log (3)-9 x \log ^2(3)\right )+\left (x^3-2 x^2+x-1\right ) \log (3)+(9 x-9) \log ^2(3)\right )-6 x+1+81 \log ^2(3)\right )}{(36 \log (3)-5) \left (-2 x+3+i \sqrt {36 \log (3)-5}\right )^2}-\frac {4 \left (x^4-6 x^3+11 x^2+\left (18 x^2-54 x+18\right ) \log (3)+e^{e^x-x} \left (e^x \left (\left (-x^3+3 x^2-x\right ) \log (3)-9 x \log ^2(3)\right )+\left (x^3-2 x^2+x-1\right ) \log (3)+(9 x-9) \log ^2(3)\right )-6 x+1+81 \log ^2(3)\right )}{(36 \log (3)-5) \left (2 x-3+i \sqrt {36 \log (3)-5}\right )^2}\right )dx\)

\(\Big \downarrow \) 7239

\(\displaystyle \int \left (-\frac {e^{e^x} x \log (3)}{x^2-3 x+1+9 \log (3)}+\frac {e^{e^x-x} \log (3) \left (x^3-2 x^2+x (1+9 \log (3))-1-9 \log (3)\right )}{\left (x^2-3 x+1+9 \log (3)\right )^2}+1\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\log (3) \left (1-\frac {3 i}{\sqrt {36 \log (3)-5}}\right ) \int \frac {e^{e^x}}{2 x-i \sqrt {-5+36 \log (3)}-3}dx+\log (3) \left (1-\frac {5 i}{\sqrt {36 \log (3)-5}}\right ) \int \frac {e^{e^x-x}}{2 x-i \sqrt {-5+36 \log (3)}-3}dx+\frac {6 \log (3) \left (3+i \sqrt {36 \log (3)-5}\right ) \int \frac {e^{e^x-x}}{\left (-2 x+i \sqrt {-5+36 \log (3)}+3\right )^2}dx}{5-36 \log (3)}-\frac {8 \log (3) (1+9 \log (3)) \int \frac {e^{e^x-x}}{\left (-2 x+i \sqrt {-5+36 \log (3)}+3\right )^2}dx}{5-36 \log (3)}-\frac {8 i \log (3) (1+9 \log (3)) \int \frac {e^{e^x-x}}{-2 x+i \sqrt {-5+36 \log (3)}+3}dx}{(36 \log (3)-5)^{3/2}}+\frac {18 i \log (3) \int \frac {e^{e^x-x}}{-2 x+i \sqrt {-5+36 \log (3)}+3}dx}{(36 \log (3)-5)^{3/2}}+\frac {6 \log (3) \left (3-i \sqrt {36 \log (3)-5}\right ) \int \frac {e^{e^x-x}}{\left (2 x+i \sqrt {-5+36 \log (3)}-3\right )^2}dx}{5-36 \log (3)}-\frac {8 \log (3) (1+9 \log (3)) \int \frac {e^{e^x-x}}{\left (2 x+i \sqrt {-5+36 \log (3)}-3\right )^2}dx}{5-36 \log (3)}-\log (3) \left (1+\frac {3 i}{\sqrt {36 \log (3)-5}}\right ) \int \frac {e^{e^x}}{2 x+i \sqrt {-5+36 \log (3)}-3}dx+\log (3) \left (1+\frac {5 i}{\sqrt {36 \log (3)-5}}\right ) \int \frac {e^{e^x-x}}{2 x+i \sqrt {-5+36 \log (3)}-3}dx-\frac {8 i \log (3) (1+9 \log (3)) \int \frac {e^{e^x-x}}{2 x+i \sqrt {-5+36 \log (3)}-3}dx}{(36 \log (3)-5)^{3/2}}+\frac {18 i \log (3) \int \frac {e^{e^x-x}}{2 x+i \sqrt {-5+36 \log (3)}-3}dx}{(36 \log (3)-5)^{3/2}}+x\)

Input:

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

Output:

$Aborted
 
Maple [A] (verified)

Time = 0.89 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.88

method result size
risch \(x -\frac {\ln \left (3\right ) x \,{\mathrm e}^{{\mathrm e}^{x}-x}}{x^{2}+9 \ln \left (3\right )-3 x +1}\) \(29\)
norman \(\frac {x^{3}+\left (9 \ln \left (3\right )-8\right ) x -\ln \left (3\right ) {\mathrm e}^{{\mathrm e}^{x}-x} x +27 \ln \left (3\right )+3}{x^{2}+9 \ln \left (3\right )-3 x +1}\) \(45\)
parallelrisch \(-\frac {\ln \left (3\right ) {\mathrm e}^{{\mathrm e}^{x}-x} x -x^{3}-3-9 x \ln \left (3\right )-27 \ln \left (3\right )+8 x}{x^{2}+9 \ln \left (3\right )-3 x +1}\) \(47\)

Input:

int((((-9*x*ln(3)^2+(-x^3+3*x^2-x)*ln(3))*exp(x)+(9*x-9)*ln(3)^2+(x^3-2*x^ 
2+x-1)*ln(3))*exp(exp(x)-x)+81*ln(3)^2+(18*x^2-54*x+18)*ln(3)+x^4-6*x^3+11 
*x^2-6*x+1)/(81*ln(3)^2+(18*x^2-54*x+18)*ln(3)+x^4-6*x^3+11*x^2-6*x+1),x,m 
ethod=_RETURNVERBOSE)
 

Output:

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

Fricas [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.27 \[ \int \frac {1-6 x+11 x^2-6 x^3+x^4+\left (18-54 x+18 x^2\right ) \log (3)+81 \log ^2(3)+e^{e^x-x} \left (\left (-1+x-2 x^2+x^3\right ) \log (3)+(-9+9 x) \log ^2(3)+e^x \left (\left (-x+3 x^2-x^3\right ) \log (3)-9 x \log ^2(3)\right )\right )}{1-6 x+11 x^2-6 x^3+x^4+\left (18-54 x+18 x^2\right ) \log (3)+81 \log ^2(3)} \, dx=\frac {x^{3} - x e^{\left (-x + e^{x}\right )} \log \left (3\right ) - 3 \, x^{2} + 9 \, x \log \left (3\right ) + x}{x^{2} - 3 \, x + 9 \, \log \left (3\right ) + 1} \] Input:

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

Output:

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

Sympy [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.79 \[ \int \frac {1-6 x+11 x^2-6 x^3+x^4+\left (18-54 x+18 x^2\right ) \log (3)+81 \log ^2(3)+e^{e^x-x} \left (\left (-1+x-2 x^2+x^3\right ) \log (3)+(-9+9 x) \log ^2(3)+e^x \left (\left (-x+3 x^2-x^3\right ) \log (3)-9 x \log ^2(3)\right )\right )}{1-6 x+11 x^2-6 x^3+x^4+\left (18-54 x+18 x^2\right ) \log (3)+81 \log ^2(3)} \, dx=x - \frac {x e^{- x + e^{x}} \log {\left (3 \right )}}{x^{2} - 3 x + 1 + 9 \log {\left (3 \right )}} \] Input:

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

Output:

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

Maxima [B] (verification not implemented)

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

Time = 0.18 (sec) , antiderivative size = 698, normalized size of antiderivative = 21.15 \[ \int \frac {1-6 x+11 x^2-6 x^3+x^4+\left (18-54 x+18 x^2\right ) \log (3)+81 \log ^2(3)+e^{e^x-x} \left (\left (-1+x-2 x^2+x^3\right ) \log (3)+(-9+9 x) \log ^2(3)+e^x \left (\left (-x+3 x^2-x^3\right ) \log (3)-9 x \log ^2(3)\right )\right )}{1-6 x+11 x^2-6 x^3+x^4+\left (18-54 x+18 x^2\right ) \log (3)+81 \log ^2(3)} \, dx=\text {Too large to display} \] Input:

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

Output:

81*((2*x - 3)/(x^2*(36*log(3) - 5) - 3*x*(36*log(3) - 5) + 324*log(3)^2 - 
9*log(3) - 5) + 4*arctan((2*x - 3)/sqrt(36*log(3) - 5))/(36*log(3) - 5)^(3 
/2))*log(3)^2 + 18*(4*(9*log(3) + 1)*arctan((2*x - 3)/sqrt(36*log(3) - 5)) 
/(36*log(3) - 5)^(3/2) - (x*(18*log(3) - 7) + 27*log(3) + 3)/(x^2*(36*log( 
3) - 5) - 3*x*(36*log(3) - 5) + 324*log(3)^2 - 9*log(3) - 5))*log(3) - 54* 
((3*x - 18*log(3) - 2)/(x^2*(36*log(3) - 5) - 3*x*(36*log(3) - 5) + 324*lo 
g(3)^2 - 9*log(3) - 5) + 6*arctan((2*x - 3)/sqrt(36*log(3) - 5))/(36*log(3 
) - 5)^(3/2))*log(3) + 18*((2*x - 3)/(x^2*(36*log(3) - 5) - 3*x*(36*log(3) 
 - 5) + 324*log(3)^2 - 9*log(3) - 5) + 4*arctan((2*x - 3)/sqrt(36*log(3) - 
 5))/(36*log(3) - 5)^(3/2))*log(3) - x*e^(-x + e^x)*log(3)/(x^2 - 3*x + 9* 
log(3) + 1) + x - 6*(162*log(3)^2 - 126*log(3) + 11)*arctan((2*x - 3)/sqrt 
(36*log(3) - 5))/(36*log(3) - 5)^(3/2) - 54*(18*log(3) - 1)*arctan((2*x - 
3)/sqrt(36*log(3) - 5))/(36*log(3) - 5)^(3/2) + 44*(9*log(3) + 1)*arctan(( 
2*x - 3)/sqrt(36*log(3) - 5))/(36*log(3) - 5)^(3/2) + ((162*log(3)^2 - 288 
*log(3) + 47)*x + 729*log(3)^2 - 81*log(3) - 18)/(x^2*(36*log(3) - 5) - 3* 
x*(36*log(3) - 5) + 324*log(3)^2 - 9*log(3) - 5) - 11*(x*(18*log(3) - 7) + 
 27*log(3) + 3)/(x^2*(36*log(3) - 5) - 3*x*(36*log(3) - 5) + 324*log(3)^2 
- 9*log(3) - 5) + 6*(9*x*(9*log(3) - 2) - 162*log(3)^2 + 45*log(3) + 7)/(x 
^2*(36*log(3) - 5) - 3*x*(36*log(3) - 5) + 324*log(3)^2 - 9*log(3) - 5) - 
6*(3*x - 18*log(3) - 2)/(x^2*(36*log(3) - 5) - 3*x*(36*log(3) - 5) + 32...
 

Giac [F]

\[ \int \frac {1-6 x+11 x^2-6 x^3+x^4+\left (18-54 x+18 x^2\right ) \log (3)+81 \log ^2(3)+e^{e^x-x} \left (\left (-1+x-2 x^2+x^3\right ) \log (3)+(-9+9 x) \log ^2(3)+e^x \left (\left (-x+3 x^2-x^3\right ) \log (3)-9 x \log ^2(3)\right )\right )}{1-6 x+11 x^2-6 x^3+x^4+\left (18-54 x+18 x^2\right ) \log (3)+81 \log ^2(3)} \, dx=\int { \frac {x^{4} - 6 \, x^{3} + 11 \, x^{2} + {\left (9 \, {\left (x - 1\right )} \log \left (3\right )^{2} - {\left (9 \, x \log \left (3\right )^{2} + {\left (x^{3} - 3 \, x^{2} + x\right )} \log \left (3\right )\right )} e^{x} + {\left (x^{3} - 2 \, x^{2} + x - 1\right )} \log \left (3\right )\right )} e^{\left (-x + e^{x}\right )} + 18 \, {\left (x^{2} - 3 \, x + 1\right )} \log \left (3\right ) + 81 \, \log \left (3\right )^{2} - 6 \, x + 1}{x^{4} - 6 \, x^{3} + 11 \, x^{2} + 18 \, {\left (x^{2} - 3 \, x + 1\right )} \log \left (3\right ) + 81 \, \log \left (3\right )^{2} - 6 \, x + 1} \,d x } \] Input:

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

Output:

integrate((x^4 - 6*x^3 + 11*x^2 + (9*(x - 1)*log(3)^2 - (9*x*log(3)^2 + (x 
^3 - 3*x^2 + x)*log(3))*e^x + (x^3 - 2*x^2 + x - 1)*log(3))*e^(-x + e^x) + 
 18*(x^2 - 3*x + 1)*log(3) + 81*log(3)^2 - 6*x + 1)/(x^4 - 6*x^3 + 11*x^2 
+ 18*(x^2 - 3*x + 1)*log(3) + 81*log(3)^2 - 6*x + 1), x)
 

Mupad [B] (verification not implemented)

Time = 2.48 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.85 \[ \int \frac {1-6 x+11 x^2-6 x^3+x^4+\left (18-54 x+18 x^2\right ) \log (3)+81 \log ^2(3)+e^{e^x-x} \left (\left (-1+x-2 x^2+x^3\right ) \log (3)+(-9+9 x) \log ^2(3)+e^x \left (\left (-x+3 x^2-x^3\right ) \log (3)-9 x \log ^2(3)\right )\right )}{1-6 x+11 x^2-6 x^3+x^4+\left (18-54 x+18 x^2\right ) \log (3)+81 \log ^2(3)} \, dx=x-\frac {x\,{\mathrm {e}}^{{\mathrm {e}}^x-x}\,\ln \left (3\right )}{x^2-3\,x+9\,\ln \left (3\right )+1} \] Input:

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.64 \[ \int \frac {1-6 x+11 x^2-6 x^3+x^4+\left (18-54 x+18 x^2\right ) \log (3)+81 \log ^2(3)+e^{e^x-x} \left (\left (-1+x-2 x^2+x^3\right ) \log (3)+(-9+9 x) \log ^2(3)+e^x \left (\left (-x+3 x^2-x^3\right ) \log (3)-9 x \log ^2(3)\right )\right )}{1-6 x+11 x^2-6 x^3+x^4+\left (18-54 x+18 x^2\right ) \log (3)+81 \log ^2(3)} \, dx=\frac {x \left (-e^{e^{x}} \mathrm {log}\left (3\right )+9 e^{x} \mathrm {log}\left (3\right )+e^{x} x^{2}-3 e^{x} x +e^{x}\right )}{e^{x} \left (9 \,\mathrm {log}\left (3\right )+x^{2}-3 x +1\right )} \] Input:

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

Output:

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