\(\int \frac {-4 e^{x+e^{-x} (-e^2+e^x x)}+e^{3 x} (x^2+x^3)+e^{2 x} (-2 x^2-4 x^3-e^2 x^3)+e^2 (-x^3-2 x^4-x^5)+e^x (x^2+3 x^3+x^4-x^5+e^2 (2 x^3+2 x^4))}{e^{3 x} x^3+e^{x+e^{-x} (-e^2+e^x x)} (4 x+2 x^2)+e^{2 x} (-2 x^3-2 x^4)+e^x (x^3+2 x^4+x^5)} \, dx\) [131]

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

Optimal result

Integrand size = 195, antiderivative size = 33 \[ \int \frac {-4 e^{x+e^{-x} \left (-e^2+e^x x\right )}+e^{3 x} \left (x^2+x^3\right )+e^{2 x} \left (-2 x^2-4 x^3-e^2 x^3\right )+e^2 \left (-x^3-2 x^4-x^5\right )+e^x \left (x^2+3 x^3+x^4-x^5+e^2 \left (2 x^3+2 x^4\right )\right )}{e^{3 x} x^3+e^{x+e^{-x} \left (-e^2+e^x x\right )} \left (4 x+2 x^2\right )+e^{2 x} \left (-2 x^3-2 x^4\right )+e^x \left (x^3+2 x^4+x^5\right )} \, dx=\log \left (2+\frac {4}{x}+e^{e^{2-x}-x} \left (-1+e^x-x\right )^2 x\right ) \] Output:

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

Mathematica [A] (verified)

Time = 0.22 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.97 \[ \int \frac {-4 e^{x+e^{-x} \left (-e^2+e^x x\right )}+e^{3 x} \left (x^2+x^3\right )+e^{2 x} \left (-2 x^2-4 x^3-e^2 x^3\right )+e^2 \left (-x^3-2 x^4-x^5\right )+e^x \left (x^2+3 x^3+x^4-x^5+e^2 \left (2 x^3+2 x^4\right )\right )}{e^{3 x} x^3+e^{x+e^{-x} \left (-e^2+e^x x\right )} \left (4 x+2 x^2\right )+e^{2 x} \left (-2 x^3-2 x^4\right )+e^x \left (x^3+2 x^4+x^5\right )} \, dx=e^{2-x}+x-\log (x)+\log \left (x^2-2 e^{-x} x^2 (1+x)+e^{-2 x} x^2 (1+x)^2+2 e^{-e^{2-x}-x} (2+x)\right ) \] Input:

Integrate[(-4*E^(x + (-E^2 + E^x*x)/E^x) + E^(3*x)*(x^2 + x^3) + E^(2*x)*( 
-2*x^2 - 4*x^3 - E^2*x^3) + E^2*(-x^3 - 2*x^4 - x^5) + E^x*(x^2 + 3*x^3 + 
x^4 - x^5 + E^2*(2*x^3 + 2*x^4)))/(E^(3*x)*x^3 + E^(x + (-E^2 + E^x*x)/E^x 
)*(4*x + 2*x^2) + E^(2*x)*(-2*x^3 - 2*x^4) + E^x*(x^3 + 2*x^4 + x^5)),x]
 

Output:

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

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 {e^{3 x} \left (x^3+x^2\right )+e^{2 x} \left (-e^2 x^3-4 x^3-2 x^2\right )+e^2 \left (-x^5-2 x^4-x^3\right )+e^x \left (-x^5+x^4+3 x^3+x^2+e^2 \left (2 x^4+2 x^3\right )\right )-4 e^{x+e^{-x} \left (e^x x-e^2\right )}}{e^{3 x} x^3+e^{x+e^{-x} \left (e^x x-e^2\right )} \left (2 x^2+4 x\right )+e^{2 x} \left (-2 x^4-2 x^3\right )+e^x \left (x^5+2 x^4+x^3\right )} \, dx\)

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 2009

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

Input:

Int[(-4*E^(x + (-E^2 + E^x*x)/E^x) + E^(3*x)*(x^2 + x^3) + E^(2*x)*(-2*x^2 
 - 4*x^3 - E^2*x^3) + E^2*(-x^3 - 2*x^4 - x^5) + E^x*(x^2 + 3*x^3 + x^4 - 
x^5 + E^2*(2*x^3 + 2*x^4)))/(E^(3*x)*x^3 + E^(x + (-E^2 + E^x*x)/E^x)*(4*x 
 + 2*x^2) + E^(2*x)*(-2*x^3 - 2*x^4) + E^x*(x^3 + 2*x^4 + x^5)),x]
 

Output:

$Aborted
 
Maple [B] (verified)

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

Time = 1.01 (sec) , antiderivative size = 67, normalized size of antiderivative = 2.03

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

Input:

int((-4*exp(x)*exp((exp(x)*x-exp(2))/exp(x))+(x^3+x^2)*exp(x)^3+(-x^3*exp( 
2)-4*x^3-2*x^2)*exp(x)^2+((2*x^4+2*x^3)*exp(2)-x^5+x^4+3*x^3+x^2)*exp(x)+( 
-x^5-2*x^4-x^3)*exp(2))/((2*x^2+4*x)*exp(x)*exp((exp(x)*x-exp(2))/exp(x))+ 
x^3*exp(x)^3+(-2*x^4-2*x^3)*exp(x)^2+(x^5+2*x^4+x^3)*exp(x)),x,method=_RET 
URNVERBOSE)
 

Output:

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

Fricas [B] (verification not implemented)

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

Time = 0.10 (sec) , antiderivative size = 98, normalized size of antiderivative = 2.97 \[ \int \frac {-4 e^{x+e^{-x} \left (-e^2+e^x x\right )}+e^{3 x} \left (x^2+x^3\right )+e^{2 x} \left (-2 x^2-4 x^3-e^2 x^3\right )+e^2 \left (-x^3-2 x^4-x^5\right )+e^x \left (x^2+3 x^3+x^4-x^5+e^2 \left (2 x^3+2 x^4\right )\right )}{e^{3 x} x^3+e^{x+e^{-x} \left (-e^2+e^x x\right )} \left (4 x+2 x^2\right )+e^{2 x} \left (-2 x^3-2 x^4\right )+e^x \left (x^3+2 x^4+x^5\right )} \, dx=-{\left (2 \, x e^{x} - e^{x} \log \left (x + 2\right ) + e^{x} \log \left (x\right ) - e^{x} \log \left (\frac {x^{2} e^{\left (3 \, x\right )} + 2 \, {\left (x + 2\right )} e^{\left ({\left (2 \, x e^{x} - e^{2}\right )} e^{\left (-x\right )}\right )} - 2 \, {\left (x^{3} + x^{2}\right )} e^{\left (2 \, x\right )} + {\left (x^{4} + 2 \, x^{3} + x^{2}\right )} e^{x}}{x + 2}\right ) - e^{2}\right )} e^{\left (-x\right )} \] Input:

integrate((-4*exp(x)*exp((exp(x)*x-exp(2))/exp(x))+(x^3+x^2)*exp(x)^3+(-x^ 
3*exp(2)-4*x^3-2*x^2)*exp(x)^2+((2*x^4+2*x^3)*exp(2)-x^5+x^4+3*x^3+x^2)*ex 
p(x)+(-x^5-2*x^4-x^3)*exp(2))/((2*x^2+4*x)*exp(x)*exp((exp(x)*x-exp(2))/ex 
p(x))+x^3*exp(x)^3+(-2*x^4-2*x^3)*exp(x)^2+(x^5+2*x^4+x^3)*exp(x)),x, algo 
rithm="fricas")
 

Output:

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 94 vs. \(2 (26) = 52\).

Time = 0.97 (sec) , antiderivative size = 94, normalized size of antiderivative = 2.85 \[ \int \frac {-4 e^{x+e^{-x} \left (-e^2+e^x x\right )}+e^{3 x} \left (x^2+x^3\right )+e^{2 x} \left (-2 x^2-4 x^3-e^2 x^3\right )+e^2 \left (-x^3-2 x^4-x^5\right )+e^x \left (x^2+3 x^3+x^4-x^5+e^2 \left (2 x^3+2 x^4\right )\right )}{e^{3 x} x^3+e^{x+e^{-x} \left (-e^2+e^x x\right )} \left (4 x+2 x^2\right )+e^{2 x} \left (-2 x^3-2 x^4\right )+e^x \left (x^3+2 x^4+x^5\right )} \, dx=- x - \log {\left (x \right )} + \log {\left (x + 2 \right )} + \log {\left (e^{\left (x e^{x} - e^{2}\right ) e^{- x}} + \frac {x^{4} e^{- 2 x} - 2 x^{3} e^{- x} + 2 x^{3} e^{- 2 x} + x^{2} - 2 x^{2} e^{- x} + x^{2} e^{- 2 x}}{2 x e^{- 2 x} + 4 e^{- 2 x}} \right )} + e^{2} e^{- x} \] Input:

integrate((-4*exp(x)*exp((exp(x)*x-exp(2))/exp(x))+(x**3+x**2)*exp(x)**3+( 
-x**3*exp(2)-4*x**3-2*x**2)*exp(x)**2+((2*x**4+2*x**3)*exp(2)-x**5+x**4+3* 
x**3+x**2)*exp(x)+(-x**5-2*x**4-x**3)*exp(2))/((2*x**2+4*x)*exp(x)*exp((ex 
p(x)*x-exp(2))/exp(x))+x**3*exp(x)**3+(-2*x**4-2*x**3)*exp(x)**2+(x**5+2*x 
**4+x**3)*exp(x)),x)
 

Output:

-x - log(x) + log(x + 2) + log(exp((x*exp(x) - exp(2))*exp(-x)) + (x**4*ex 
p(-2*x) - 2*x**3*exp(-x) + 2*x**3*exp(-2*x) + x**2 - 2*x**2*exp(-x) + x**2 
*exp(-2*x))/(2*x*exp(-2*x) + 4*exp(-2*x))) + exp(2)*exp(-x)
 

Maxima [B] (verification not implemented)

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

Time = 0.18 (sec) , antiderivative size = 98, normalized size of antiderivative = 2.97 \[ \int \frac {-4 e^{x+e^{-x} \left (-e^2+e^x x\right )}+e^{3 x} \left (x^2+x^3\right )+e^{2 x} \left (-2 x^2-4 x^3-e^2 x^3\right )+e^2 \left (-x^3-2 x^4-x^5\right )+e^x \left (x^2+3 x^3+x^4-x^5+e^2 \left (2 x^3+2 x^4\right )\right )}{e^{3 x} x^3+e^{x+e^{-x} \left (-e^2+e^x x\right )} \left (4 x+2 x^2\right )+e^{2 x} \left (-2 x^3-2 x^4\right )+e^x \left (x^3+2 x^4+x^5\right )} \, dx=-x + \log \left (x\right ) + 2 \, \log \left (-x + e^{x} - 1\right ) + \log \left (\frac {2 \, {\left (x + 2\right )} e^{x} + {\left (x^{4} + 2 \, x^{3} + x^{2} e^{\left (2 \, x\right )} + x^{2} - 2 \, {\left (x^{3} + x^{2}\right )} e^{x}\right )} e^{\left (e^{\left (-x + 2\right )}\right )}}{x^{4} + 2 \, x^{3} + x^{2} e^{\left (2 \, x\right )} + x^{2} - 2 \, {\left (x^{3} + x^{2}\right )} e^{x}}\right ) \] Input:

integrate((-4*exp(x)*exp((exp(x)*x-exp(2))/exp(x))+(x^3+x^2)*exp(x)^3+(-x^ 
3*exp(2)-4*x^3-2*x^2)*exp(x)^2+((2*x^4+2*x^3)*exp(2)-x^5+x^4+3*x^3+x^2)*ex 
p(x)+(-x^5-2*x^4-x^3)*exp(2))/((2*x^2+4*x)*exp(x)*exp((exp(x)*x-exp(2))/ex 
p(x))+x^3*exp(x)^3+(-2*x^4-2*x^3)*exp(x)^2+(x^5+2*x^4+x^3)*exp(x)),x, algo 
rithm="maxima")
 

Output:

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

Giac [F]

\[ \int \frac {-4 e^{x+e^{-x} \left (-e^2+e^x x\right )}+e^{3 x} \left (x^2+x^3\right )+e^{2 x} \left (-2 x^2-4 x^3-e^2 x^3\right )+e^2 \left (-x^3-2 x^4-x^5\right )+e^x \left (x^2+3 x^3+x^4-x^5+e^2 \left (2 x^3+2 x^4\right )\right )}{e^{3 x} x^3+e^{x+e^{-x} \left (-e^2+e^x x\right )} \left (4 x+2 x^2\right )+e^{2 x} \left (-2 x^3-2 x^4\right )+e^x \left (x^3+2 x^4+x^5\right )} \, dx=\int { -\frac {{\left (x^{5} + 2 \, x^{4} + x^{3}\right )} e^{2} - {\left (x^{3} + x^{2}\right )} e^{\left (3 \, x\right )} + {\left (x^{3} e^{2} + 4 \, x^{3} + 2 \, x^{2}\right )} e^{\left (2 \, x\right )} + {\left (x^{5} - x^{4} - 3 \, x^{3} - x^{2} - 2 \, {\left (x^{4} + x^{3}\right )} e^{2}\right )} e^{x} + 4 \, e^{\left ({\left (x e^{x} - e^{2}\right )} e^{\left (-x\right )} + x\right )}}{x^{3} e^{\left (3 \, x\right )} + 2 \, {\left (x^{2} + 2 \, x\right )} e^{\left ({\left (x e^{x} - e^{2}\right )} e^{\left (-x\right )} + x\right )} - 2 \, {\left (x^{4} + x^{3}\right )} e^{\left (2 \, x\right )} + {\left (x^{5} + 2 \, x^{4} + x^{3}\right )} e^{x}} \,d x } \] Input:

integrate((-4*exp(x)*exp((exp(x)*x-exp(2))/exp(x))+(x^3+x^2)*exp(x)^3+(-x^ 
3*exp(2)-4*x^3-2*x^2)*exp(x)^2+((2*x^4+2*x^3)*exp(2)-x^5+x^4+3*x^3+x^2)*ex 
p(x)+(-x^5-2*x^4-x^3)*exp(2))/((2*x^2+4*x)*exp(x)*exp((exp(x)*x-exp(2))/ex 
p(x))+x^3*exp(x)^3+(-2*x^4-2*x^3)*exp(x)^2+(x^5+2*x^4+x^3)*exp(x)),x, algo 
rithm="giac")
 

Output:

integrate(-((x^5 + 2*x^4 + x^3)*e^2 - (x^3 + x^2)*e^(3*x) + (x^3*e^2 + 4*x 
^3 + 2*x^2)*e^(2*x) + (x^5 - x^4 - 3*x^3 - x^2 - 2*(x^4 + x^3)*e^2)*e^x + 
4*e^((x*e^x - e^2)*e^(-x) + x))/(x^3*e^(3*x) + 2*(x^2 + 2*x)*e^((x*e^x - e 
^2)*e^(-x) + x) - 2*(x^4 + x^3)*e^(2*x) + (x^5 + 2*x^4 + x^3)*e^x), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {-4 e^{x+e^{-x} \left (-e^2+e^x x\right )}+e^{3 x} \left (x^2+x^3\right )+e^{2 x} \left (-2 x^2-4 x^3-e^2 x^3\right )+e^2 \left (-x^3-2 x^4-x^5\right )+e^x \left (x^2+3 x^3+x^4-x^5+e^2 \left (2 x^3+2 x^4\right )\right )}{e^{3 x} x^3+e^{x+e^{-x} \left (-e^2+e^x x\right )} \left (4 x+2 x^2\right )+e^{2 x} \left (-2 x^3-2 x^4\right )+e^x \left (x^3+2 x^4+x^5\right )} \, dx=\int -\frac {{\mathrm {e}}^{2\,x}\,\left (x^3\,{\mathrm {e}}^2+2\,x^2+4\,x^3\right )+{\mathrm {e}}^2\,\left (x^5+2\,x^4+x^3\right )-{\mathrm {e}}^x\,\left ({\mathrm {e}}^2\,\left (2\,x^4+2\,x^3\right )+x^2+3\,x^3+x^4-x^5\right )-{\mathrm {e}}^{3\,x}\,\left (x^3+x^2\right )+4\,{\mathrm {e}}^{-{\mathrm {e}}^{-x}\,\left ({\mathrm {e}}^2-x\,{\mathrm {e}}^x\right )}\,{\mathrm {e}}^x}{x^3\,{\mathrm {e}}^{3\,x}-{\mathrm {e}}^{2\,x}\,\left (2\,x^4+2\,x^3\right )+{\mathrm {e}}^x\,\left (x^5+2\,x^4+x^3\right )+{\mathrm {e}}^{-{\mathrm {e}}^{-x}\,\left ({\mathrm {e}}^2-x\,{\mathrm {e}}^x\right )}\,{\mathrm {e}}^x\,\left (2\,x^2+4\,x\right )} \,d x \] Input:

int(-(exp(2*x)*(x^3*exp(2) + 2*x^2 + 4*x^3) + exp(2)*(x^3 + 2*x^4 + x^5) - 
 exp(x)*(exp(2)*(2*x^3 + 2*x^4) + x^2 + 3*x^3 + x^4 - x^5) - exp(3*x)*(x^2 
 + x^3) + 4*exp(-exp(-x)*(exp(2) - x*exp(x)))*exp(x))/(x^3*exp(3*x) - exp( 
2*x)*(2*x^3 + 2*x^4) + exp(x)*(x^3 + 2*x^4 + x^5) + exp(-exp(-x)*(exp(2) - 
 x*exp(x)))*exp(x)*(4*x + 2*x^2)),x)
 

Output:

int(-(exp(2*x)*(x^3*exp(2) + 2*x^2 + 4*x^3) + exp(2)*(x^3 + 2*x^4 + x^5) - 
 exp(x)*(exp(2)*(2*x^3 + 2*x^4) + x^2 + 3*x^3 + x^4 - x^5) - exp(3*x)*(x^2 
 + x^3) + 4*exp(-exp(-x)*(exp(2) - x*exp(x)))*exp(x))/(x^3*exp(3*x) - exp( 
2*x)*(2*x^3 + 2*x^4) + exp(x)*(x^3 + 2*x^4 + x^5) + exp(-exp(-x)*(exp(2) - 
 x*exp(x)))*exp(x)*(4*x + 2*x^2)), x)
 

Reduce [B] (verification not implemented)

Time = 0.51 (sec) , antiderivative size = 133, normalized size of antiderivative = 4.03 \[ \int \frac {-4 e^{x+e^{-x} \left (-e^2+e^x x\right )}+e^{3 x} \left (x^2+x^3\right )+e^{2 x} \left (-2 x^2-4 x^3-e^2 x^3\right )+e^2 \left (-x^3-2 x^4-x^5\right )+e^x \left (x^2+3 x^3+x^4-x^5+e^2 \left (2 x^3+2 x^4\right )\right )}{e^{3 x} x^3+e^{x+e^{-x} \left (-e^2+e^x x\right )} \left (4 x+2 x^2\right )+e^{2 x} \left (-2 x^3-2 x^4\right )+e^x \left (x^3+2 x^4+x^5\right )} \, dx=\mathrm {log}\left (e^{\frac {2 e^{x} x +e^{2}}{e^{x}}} x^{2}-2 e^{\frac {e^{x} x +e^{2}}{e^{x}}} x^{3}-2 e^{\frac {e^{x} x +e^{2}}{e^{x}}} x^{2}+e^{\frac {e^{2}}{e^{x}}} x^{4}+2 e^{\frac {e^{2}}{e^{x}}} x^{3}+e^{\frac {e^{2}}{e^{x}}} x^{2}+2 e^{x} x +4 e^{x}\right )-\mathrm {log}\left (x \right )-x \] Input:

int((-4*exp(x)*exp((exp(x)*x-exp(2))/exp(x))+(x^3+x^2)*exp(x)^3+(-x^3*exp( 
2)-4*x^3-2*x^2)*exp(x)^2+((2*x^4+2*x^3)*exp(2)-x^5+x^4+3*x^3+x^2)*exp(x)+( 
-x^5-2*x^4-x^3)*exp(2))/((2*x^2+4*x)*exp(x)*exp((exp(x)*x-exp(2))/exp(x))+ 
x^3*exp(x)^3+(-2*x^4-2*x^3)*exp(x)^2+(x^5+2*x^4+x^3)*exp(x)),x)
 

Output:

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