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

3.30.65.1 Optimal result
3.30.65.2 Mathematica [B] (verified)
3.30.65.3 Rubi [F]
3.30.65.4 Maple [A] (verified)
3.30.65.5 Fricas [B] (verification not implemented)
3.30.65.6 Sympy [F(-2)]
3.30.65.7 Maxima [A] (verification not implemented)
3.30.65.8 Giac [B] (verification not implemented)
3.30.65.9 Mupad [F(-1)]

3.30.65.1 Optimal result

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

output
ln(1/(x-ln(exp(2-x)+1))/(x-exp(2))-x)-5
 
3.30.65.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(124\) vs. \(2(33)=66\).

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

input
Integrate[(2*x + E^4*x^2 + x^4 + E^2*(-1 - 2*x^3) + E^(2 - x)*(3*x + E^4*x 
^2 + x^4 + E^2*(-2 - 2*x^3)) + (-1 - 2*E^4*x + 4*E^2*x^2 - 2*x^3 + E^(2 - 
x)*(-1 - 2*E^4*x + 4*E^2*x^2 - 2*x^3))*Log[1 + E^(2 - x)] + (E^4 - 2*E^2*x 
 + x^2 + E^(2 - x)*(E^4 - 2*E^2*x + x^2))*Log[1 + E^(2 - x)]^2)/(-x^2 + E^ 
4*x^3 + x^5 + E^2*(x - 2*x^4) + E^(2 - x)*(-x^2 + E^4*x^3 + x^5 + E^2*(x - 
 2*x^4)) + (x - 2*E^4*x^2 - 2*x^4 + E^2*(-1 + 4*x^3) + E^(2 - x)*(x - 2*E^ 
4*x^2 - 2*x^4 + E^2*(-1 + 4*x^3)))*Log[1 + E^(2 - x)] + (E^4*x - 2*E^2*x^2 
 + x^3 + E^(2 - x)*(E^4*x - 2*E^2*x^2 + x^3))*Log[1 + E^(2 - x)]^2),x]
 
output
-Log[E^2 - x] - Log[-x + Log[1 + E^(2 - x)]] + Log[1 + 2*E^2*x^2 - 2*x^3 - 
 E^2*x*(x + Log[1 + E^(2 - x)] - Log[E^2 + E^x]) + x^2*(x + Log[1 + E^(2 - 
 x)] - Log[E^2 + E^x]) - E^2*x*Log[E^2 + E^x] + x^2*Log[E^2 + E^x]]
 
3.30.65.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+e^2 \left (-2 x^3-1\right )+e^4 x^2+\left (x^2+e^{2-x} \left (x^2-2 e^2 x+e^4\right )-2 e^2 x+e^4\right ) \log ^2\left (e^{2-x}+1\right )+\left (-2 x^3+4 e^2 x^2+e^{2-x} \left (-2 x^3+4 e^2 x^2-2 e^4 x-1\right )-2 e^4 x-1\right ) \log \left (e^{2-x}+1\right )+e^{2-x} \left (x^4+e^2 \left (-2 x^3-2\right )+e^4 x^2+3 x\right )+2 x}{x^5+e^2 \left (x-2 x^4\right )+e^4 x^3-x^2+\left (x^3-2 e^2 x^2+e^{2-x} \left (x^3-2 e^2 x^2+e^4 x\right )+e^4 x\right ) \log ^2\left (e^{2-x}+1\right )+\left (-2 x^4+e^2 \left (4 x^3-1\right )-2 e^4 x^2+e^{2-x} \left (-2 x^4+e^2 \left (4 x^3-1\right )-2 e^4 x^2+x\right )+x\right ) \log \left (e^{2-x}+1\right )+e^{2-x} \left (x^5+e^2 \left (x-2 x^4\right )+e^4 x^3-x^2\right )} \, dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 2009

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

input
Int[(2*x + E^4*x^2 + x^4 + E^2*(-1 - 2*x^3) + E^(2 - x)*(3*x + E^4*x^2 + x 
^4 + E^2*(-2 - 2*x^3)) + (-1 - 2*E^4*x + 4*E^2*x^2 - 2*x^3 + E^(2 - x)*(-1 
 - 2*E^4*x + 4*E^2*x^2 - 2*x^3))*Log[1 + E^(2 - x)] + (E^4 - 2*E^2*x + x^2 
 + E^(2 - x)*(E^4 - 2*E^2*x + x^2))*Log[1 + E^(2 - x)]^2)/(-x^2 + E^4*x^3 
+ x^5 + E^2*(x - 2*x^4) + E^(2 - x)*(-x^2 + E^4*x^3 + x^5 + E^2*(x - 2*x^4 
)) + (x - 2*E^4*x^2 - 2*x^4 + E^2*(-1 + 4*x^3) + E^(2 - x)*(x - 2*E^4*x^2 
- 2*x^4 + E^2*(-1 + 4*x^3)))*Log[1 + E^(2 - x)] + (E^4*x - 2*E^2*x^2 + x^3 
 + E^(2 - x)*(E^4*x - 2*E^2*x^2 + x^3))*Log[1 + E^(2 - x)]^2),x]
 
output
$Aborted
 

3.30.65.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 7239
Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; Simpl 
erIntegrandQ[v, u, x]]
 

rule 7293
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v] 
]
 
3.30.65.4 Maple [A] (verified)

Time = 2.34 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.73

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

input
int((((exp(2)^2-2*exp(2)*x+x^2)*exp(2-x)+exp(2)^2-2*exp(2)*x+x^2)*ln(exp(2 
-x)+1)^2+((-2*x*exp(2)^2+4*x^2*exp(2)-2*x^3-1)*exp(2-x)-2*x*exp(2)^2+4*x^2 
*exp(2)-2*x^3-1)*ln(exp(2-x)+1)+(x^2*exp(2)^2+(-2*x^3-2)*exp(2)+x^4+3*x)*e 
xp(2-x)+x^2*exp(2)^2+(-2*x^3-1)*exp(2)+x^4+2*x)/(((x*exp(2)^2-2*x^2*exp(2) 
+x^3)*exp(2-x)+x*exp(2)^2-2*x^2*exp(2)+x^3)*ln(exp(2-x)+1)^2+((-2*x^2*exp( 
2)^2+(4*x^3-1)*exp(2)-2*x^4+x)*exp(2-x)-2*x^2*exp(2)^2+(4*x^3-1)*exp(2)-2* 
x^4+x)*ln(exp(2-x)+1)+(x^3*exp(2)^2+(-2*x^4+x)*exp(2)+x^5-x^2)*exp(2-x)+x^ 
3*exp(2)^2+(-2*x^4+x)*exp(2)+x^5-x^2),x,method=_RETURNVERBOSE)
 
output
ln(x)+ln(ln(exp(2-x)+1)-(x^2*exp(2)-x^3+1)/x/(exp(2)-x))-ln(-x+ln(exp(2-x) 
+1))
 
3.30.65.5 Fricas [B] (verification not implemented)

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

Time = 0.27 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.94 \[ \int \frac {2 x+e^4 x^2+x^4+e^2 \left (-1-2 x^3\right )+e^{2-x} \left (3 x+e^4 x^2+x^4+e^2 \left (-2-2 x^3\right )\right )+\left (-1-2 e^4 x+4 e^2 x^2-2 x^3+e^{2-x} \left (-1-2 e^4 x+4 e^2 x^2-2 x^3\right )\right ) \log \left (1+e^{2-x}\right )+\left (e^4-2 e^2 x+x^2+e^{2-x} \left (e^4-2 e^2 x+x^2\right )\right ) \log ^2\left (1+e^{2-x}\right )}{-x^2+e^4 x^3+x^5+e^2 \left (x-2 x^4\right )+e^{2-x} \left (-x^2+e^4 x^3+x^5+e^2 \left (x-2 x^4\right )\right )+\left (x-2 e^4 x^2-2 x^4+e^2 \left (-1+4 x^3\right )+e^{2-x} \left (x-2 e^4 x^2-2 x^4+e^2 \left (-1+4 x^3\right )\right )\right ) \log \left (1+e^{2-x}\right )+\left (e^4 x-2 e^2 x^2+x^3+e^{2-x} \left (e^4 x-2 e^2 x^2+x^3\right )\right ) \log ^2\left (1+e^{2-x}\right )} \, dx=\log \left (x\right ) - \log \left (-x + \log \left (e^{\left (-x + 2\right )} + 1\right )\right ) + \log \left (\frac {x^{3} - x^{2} e^{2} - {\left (x^{2} - x e^{2}\right )} \log \left (e^{\left (-x + 2\right )} + 1\right ) - 1}{x^{2} - x e^{2}}\right ) \]

input
integrate((((exp(2)^2-2*exp(2)*x+x^2)*exp(2-x)+exp(2)^2-2*exp(2)*x+x^2)*lo 
g(exp(2-x)+1)^2+((-2*x*exp(2)^2+4*x^2*exp(2)-2*x^3-1)*exp(2-x)-2*x*exp(2)^ 
2+4*x^2*exp(2)-2*x^3-1)*log(exp(2-x)+1)+(x^2*exp(2)^2+(-2*x^3-2)*exp(2)+x^ 
4+3*x)*exp(2-x)+x^2*exp(2)^2+(-2*x^3-1)*exp(2)+x^4+2*x)/(((x*exp(2)^2-2*x^ 
2*exp(2)+x^3)*exp(2-x)+x*exp(2)^2-2*x^2*exp(2)+x^3)*log(exp(2-x)+1)^2+((-2 
*x^2*exp(2)^2+(4*x^3-1)*exp(2)-2*x^4+x)*exp(2-x)-2*x^2*exp(2)^2+(4*x^3-1)* 
exp(2)-2*x^4+x)*log(exp(2-x)+1)+(x^3*exp(2)^2+(-2*x^4+x)*exp(2)+x^5-x^2)*e 
xp(2-x)+x^3*exp(2)^2+(-2*x^4+x)*exp(2)+x^5-x^2),x, algorithm=\
 
output
log(x) - log(-x + log(e^(-x + 2) + 1)) + log((x^3 - x^2*e^2 - (x^2 - x*e^2 
)*log(e^(-x + 2) + 1) - 1)/(x^2 - x*e^2))
 
3.30.65.6 Sympy [F(-2)]

Exception generated. \[ \int \frac {2 x+e^4 x^2+x^4+e^2 \left (-1-2 x^3\right )+e^{2-x} \left (3 x+e^4 x^2+x^4+e^2 \left (-2-2 x^3\right )\right )+\left (-1-2 e^4 x+4 e^2 x^2-2 x^3+e^{2-x} \left (-1-2 e^4 x+4 e^2 x^2-2 x^3\right )\right ) \log \left (1+e^{2-x}\right )+\left (e^4-2 e^2 x+x^2+e^{2-x} \left (e^4-2 e^2 x+x^2\right )\right ) \log ^2\left (1+e^{2-x}\right )}{-x^2+e^4 x^3+x^5+e^2 \left (x-2 x^4\right )+e^{2-x} \left (-x^2+e^4 x^3+x^5+e^2 \left (x-2 x^4\right )\right )+\left (x-2 e^4 x^2-2 x^4+e^2 \left (-1+4 x^3\right )+e^{2-x} \left (x-2 e^4 x^2-2 x^4+e^2 \left (-1+4 x^3\right )\right )\right ) \log \left (1+e^{2-x}\right )+\left (e^4 x-2 e^2 x^2+x^3+e^{2-x} \left (e^4 x-2 e^2 x^2+x^3\right )\right ) \log ^2\left (1+e^{2-x}\right )} \, dx=\text {Exception raised: PolynomialError} \]

input
integrate((((exp(2)**2-2*exp(2)*x+x**2)*exp(2-x)+exp(2)**2-2*exp(2)*x+x**2 
)*ln(exp(2-x)+1)**2+((-2*x*exp(2)**2+4*x**2*exp(2)-2*x**3-1)*exp(2-x)-2*x* 
exp(2)**2+4*x**2*exp(2)-2*x**3-1)*ln(exp(2-x)+1)+(x**2*exp(2)**2+(-2*x**3- 
2)*exp(2)+x**4+3*x)*exp(2-x)+x**2*exp(2)**2+(-2*x**3-1)*exp(2)+x**4+2*x)/( 
((x*exp(2)**2-2*x**2*exp(2)+x**3)*exp(2-x)+x*exp(2)**2-2*x**2*exp(2)+x**3) 
*ln(exp(2-x)+1)**2+((-2*x**2*exp(2)**2+(4*x**3-1)*exp(2)-2*x**4+x)*exp(2-x 
)-2*x**2*exp(2)**2+(4*x**3-1)*exp(2)-2*x**4+x)*ln(exp(2-x)+1)+(x**3*exp(2) 
**2+(-2*x**4+x)*exp(2)+x**5-x**2)*exp(2-x)+x**3*exp(2)**2+(-2*x**4+x)*exp( 
2)+x**5-x**2),x)
 
output
Exception raised: PolynomialError >> 1/(_t0*x**4 - 2*_t0*x**3*exp(2) + _t0 
*x**2*exp(4) + x**4 - 2*x**3*exp(2) + x**2*exp(4)) contains an element of 
the set of generators.
 
3.30.65.7 Maxima [A] (verification not implemented)

Time = 0.68 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.85 \[ \int \frac {2 x+e^4 x^2+x^4+e^2 \left (-1-2 x^3\right )+e^{2-x} \left (3 x+e^4 x^2+x^4+e^2 \left (-2-2 x^3\right )\right )+\left (-1-2 e^4 x+4 e^2 x^2-2 x^3+e^{2-x} \left (-1-2 e^4 x+4 e^2 x^2-2 x^3\right )\right ) \log \left (1+e^{2-x}\right )+\left (e^4-2 e^2 x+x^2+e^{2-x} \left (e^4-2 e^2 x+x^2\right )\right ) \log ^2\left (1+e^{2-x}\right )}{-x^2+e^4 x^3+x^5+e^2 \left (x-2 x^4\right )+e^{2-x} \left (-x^2+e^4 x^3+x^5+e^2 \left (x-2 x^4\right )\right )+\left (x-2 e^4 x^2-2 x^4+e^2 \left (-1+4 x^3\right )+e^{2-x} \left (x-2 e^4 x^2-2 x^4+e^2 \left (-1+4 x^3\right )\right )\right ) \log \left (1+e^{2-x}\right )+\left (e^4 x-2 e^2 x^2+x^3+e^{2-x} \left (e^4 x-2 e^2 x^2+x^3\right )\right ) \log ^2\left (1+e^{2-x}\right )} \, dx=\log \left (x\right ) - \log \left (-2 \, x + \log \left (e^{2} + e^{x}\right )\right ) + \log \left (-\frac {2 \, x^{3} - 2 \, x^{2} e^{2} - {\left (x^{2} - x e^{2}\right )} \log \left (e^{2} + e^{x}\right ) - 1}{x^{2} - x e^{2}}\right ) \]

input
integrate((((exp(2)^2-2*exp(2)*x+x^2)*exp(2-x)+exp(2)^2-2*exp(2)*x+x^2)*lo 
g(exp(2-x)+1)^2+((-2*x*exp(2)^2+4*x^2*exp(2)-2*x^3-1)*exp(2-x)-2*x*exp(2)^ 
2+4*x^2*exp(2)-2*x^3-1)*log(exp(2-x)+1)+(x^2*exp(2)^2+(-2*x^3-2)*exp(2)+x^ 
4+3*x)*exp(2-x)+x^2*exp(2)^2+(-2*x^3-1)*exp(2)+x^4+2*x)/(((x*exp(2)^2-2*x^ 
2*exp(2)+x^3)*exp(2-x)+x*exp(2)^2-2*x^2*exp(2)+x^3)*log(exp(2-x)+1)^2+((-2 
*x^2*exp(2)^2+(4*x^3-1)*exp(2)-2*x^4+x)*exp(2-x)-2*x^2*exp(2)^2+(4*x^3-1)* 
exp(2)-2*x^4+x)*log(exp(2-x)+1)+(x^3*exp(2)^2+(-2*x^4+x)*exp(2)+x^5-x^2)*e 
xp(2-x)+x^3*exp(2)^2+(-2*x^4+x)*exp(2)+x^5-x^2),x, algorithm=\
 
output
log(x) - log(-2*x + log(e^2 + e^x)) + log(-(2*x^3 - 2*x^2*e^2 - (x^2 - x*e 
^2)*log(e^2 + e^x) - 1)/(x^2 - x*e^2))
 
3.30.65.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 67 vs. \(2 (31) = 62\).

Time = 0.72 (sec) , antiderivative size = 67, normalized size of antiderivative = 2.03 \[ \int \frac {2 x+e^4 x^2+x^4+e^2 \left (-1-2 x^3\right )+e^{2-x} \left (3 x+e^4 x^2+x^4+e^2 \left (-2-2 x^3\right )\right )+\left (-1-2 e^4 x+4 e^2 x^2-2 x^3+e^{2-x} \left (-1-2 e^4 x+4 e^2 x^2-2 x^3\right )\right ) \log \left (1+e^{2-x}\right )+\left (e^4-2 e^2 x+x^2+e^{2-x} \left (e^4-2 e^2 x+x^2\right )\right ) \log ^2\left (1+e^{2-x}\right )}{-x^2+e^4 x^3+x^5+e^2 \left (x-2 x^4\right )+e^{2-x} \left (-x^2+e^4 x^3+x^5+e^2 \left (x-2 x^4\right )\right )+\left (x-2 e^4 x^2-2 x^4+e^2 \left (-1+4 x^3\right )+e^{2-x} \left (x-2 e^4 x^2-2 x^4+e^2 \left (-1+4 x^3\right )\right )\right ) \log \left (1+e^{2-x}\right )+\left (e^4 x-2 e^2 x^2+x^3+e^{2-x} \left (e^4 x-2 e^2 x^2+x^3\right )\right ) \log ^2\left (1+e^{2-x}\right )} \, dx=\log \left (-x^{3} + x^{2} e^{2} + x^{2} \log \left (e^{\left (-x + 2\right )} + 1\right ) - x e^{2} \log \left (e^{\left (-x + 2\right )} + 1\right ) + 1\right ) - \log \left (x - e^{2}\right ) - \log \left (x - \log \left (e^{\left (-x + 2\right )} + 1\right )\right ) \]

input
integrate((((exp(2)^2-2*exp(2)*x+x^2)*exp(2-x)+exp(2)^2-2*exp(2)*x+x^2)*lo 
g(exp(2-x)+1)^2+((-2*x*exp(2)^2+4*x^2*exp(2)-2*x^3-1)*exp(2-x)-2*x*exp(2)^ 
2+4*x^2*exp(2)-2*x^3-1)*log(exp(2-x)+1)+(x^2*exp(2)^2+(-2*x^3-2)*exp(2)+x^ 
4+3*x)*exp(2-x)+x^2*exp(2)^2+(-2*x^3-1)*exp(2)+x^4+2*x)/(((x*exp(2)^2-2*x^ 
2*exp(2)+x^3)*exp(2-x)+x*exp(2)^2-2*x^2*exp(2)+x^3)*log(exp(2-x)+1)^2+((-2 
*x^2*exp(2)^2+(4*x^3-1)*exp(2)-2*x^4+x)*exp(2-x)-2*x^2*exp(2)^2+(4*x^3-1)* 
exp(2)-2*x^4+x)*log(exp(2-x)+1)+(x^3*exp(2)^2+(-2*x^4+x)*exp(2)+x^5-x^2)*e 
xp(2-x)+x^3*exp(2)^2+(-2*x^4+x)*exp(2)+x^5-x^2),x, algorithm=\
 
output
log(-x^3 + x^2*e^2 + x^2*log(e^(-x + 2) + 1) - x*e^2*log(e^(-x + 2) + 1) + 
 1) - log(x - e^2) - log(x - log(e^(-x + 2) + 1))
 
3.30.65.9 Mupad [F(-1)]

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

input
int((2*x + exp(2 - x)*(3*x - exp(2)*(2*x^3 + 2) + x^2*exp(4) + x^4) - exp( 
2)*(2*x^3 + 1) + x^2*exp(4) - log(exp(2 - x) + 1)*(2*x*exp(4) + exp(2 - x) 
*(2*x*exp(4) - 4*x^2*exp(2) + 2*x^3 + 1) - 4*x^2*exp(2) + 2*x^3 + 1) + log 
(exp(2 - x) + 1)^2*(exp(4) - 2*x*exp(2) + exp(2 - x)*(exp(4) - 2*x*exp(2) 
+ x^2) + x^2) + x^4)/(log(exp(2 - x) + 1)^2*(exp(2 - x)*(x*exp(4) - 2*x^2* 
exp(2) + x^3) + x*exp(4) - 2*x^2*exp(2) + x^3) + x^3*exp(4) + log(exp(2 - 
x) + 1)*(x + exp(2 - x)*(x + exp(2)*(4*x^3 - 1) - 2*x^2*exp(4) - 2*x^4) + 
exp(2)*(4*x^3 - 1) - 2*x^2*exp(4) - 2*x^4) + exp(2)*(x - 2*x^4) - x^2 + x^ 
5 + exp(2 - x)*(x^3*exp(4) + exp(2)*(x - 2*x^4) - x^2 + x^5)),x)
 
output
int((2*x + exp(2 - x)*(3*x - exp(2)*(2*x^3 + 2) + x^2*exp(4) + x^4) - exp( 
2)*(2*x^3 + 1) + x^2*exp(4) - log(exp(2 - x) + 1)*(2*x*exp(4) + exp(2 - x) 
*(2*x*exp(4) - 4*x^2*exp(2) + 2*x^3 + 1) - 4*x^2*exp(2) + 2*x^3 + 1) + log 
(exp(2 - x) + 1)^2*(exp(4) - 2*x*exp(2) + exp(2 - x)*(exp(4) - 2*x*exp(2) 
+ x^2) + x^2) + x^4)/(log(exp(2 - x) + 1)^2*(exp(2 - x)*(x*exp(4) - 2*x^2* 
exp(2) + x^3) + x*exp(4) - 2*x^2*exp(2) + x^3) + x^3*exp(4) + log(exp(2 - 
x) + 1)*(x + exp(2 - x)*(x + exp(2)*(4*x^3 - 1) - 2*x^2*exp(4) - 2*x^4) + 
exp(2)*(4*x^3 - 1) - 2*x^2*exp(4) - 2*x^4) + exp(2)*(x - 2*x^4) - x^2 + x^ 
5 + exp(2 - x)*(x^3*exp(4) + exp(2)*(x - 2*x^4) - x^2 + x^5)), x)