Optimal. Leaf size=34 \[ x \left (-e^5+\frac {e^{4 \left (-2+\frac {1}{\log (x)}\right )^2}}{x}+x \log \left (2-e^x\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 1.60, antiderivative size = 35, normalized size of antiderivative = 1.03, number of steps used = 16, number of rules used = 10, integrand size = 107, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.093, Rules used = {6688, 14, 6742, 2184, 2190, 2531, 2282, 6589, 2532, 6706} \begin {gather*} x^2 \log \left (2-e^x\right )-e^5 x+e^{\frac {4 (1-2 \log (x))^2}{\log ^2(x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2184
Rule 2190
Rule 2282
Rule 2531
Rule 2532
Rule 6589
Rule 6688
Rule 6706
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {\frac {2 e^5 x+e^x \left (-e^5 x+x^3\right )}{-2+e^x}+2 x^2 \log \left (2-e^x\right )+\frac {8 e^{\frac {4 (1-2 \log (x))^2}{\log ^2(x)}} (-1+2 \log (x))}{\log ^3(x)}}{x} \, dx\\ &=\int \left (-\frac {-2 e^5+e^{5+x}-e^x x^2+4 x \log \left (2-e^x\right )-2 e^x x \log \left (2-e^x\right )}{-2+e^x}+\frac {8 e^{\frac {4 (1-2 \log (x))^2}{\log ^2(x)}} (-1+2 \log (x))}{x \log ^3(x)}\right ) \, dx\\ &=8 \int \frac {e^{\frac {4 (1-2 \log (x))^2}{\log ^2(x)}} (-1+2 \log (x))}{x \log ^3(x)} \, dx-\int \frac {-2 e^5+e^{5+x}-e^x x^2+4 x \log \left (2-e^x\right )-2 e^x x \log \left (2-e^x\right )}{-2+e^x} \, dx\\ &=8 \operatorname {Subst}\left (\int \frac {e^{\frac {4 (1-2 x)^2}{x^2}} (-1+2 x)}{x^3} \, dx,x,\log (x)\right )-\int \left (e^5-x^2-\frac {2 x^2}{-2+e^x}-2 x \log \left (2-e^x\right )\right ) \, dx\\ &=e^{\frac {4 (1-2 \log (x))^2}{\log ^2(x)}}-e^5 x+\frac {x^3}{3}+2 \int \frac {x^2}{-2+e^x} \, dx+2 \int x \log \left (2-e^x\right ) \, dx\\ &=e^{\frac {4 (1-2 \log (x))^2}{\log ^2(x)}}-e^5 x+x^2 \log \left (2-e^x\right )-x^2 \log \left (1-\frac {e^x}{2}\right )+2 \int x \log \left (1-\frac {e^x}{2}\right ) \, dx+\int \frac {e^x x^2}{-2+e^x} \, dx\\ &=e^{\frac {4 (1-2 \log (x))^2}{\log ^2(x)}}-e^5 x+x^2 \log \left (2-e^x\right )-2 x \text {Li}_2\left (\frac {e^x}{2}\right )-2 \int x \log \left (1-\frac {e^x}{2}\right ) \, dx+2 \int \text {Li}_2\left (\frac {e^x}{2}\right ) \, dx\\ &=e^{\frac {4 (1-2 \log (x))^2}{\log ^2(x)}}-e^5 x+x^2 \log \left (2-e^x\right )-2 \int \text {Li}_2\left (\frac {e^x}{2}\right ) \, dx+2 \operatorname {Subst}\left (\int \frac {\text {Li}_2\left (\frac {x}{2}\right )}{x} \, dx,x,e^x\right )\\ &=e^{\frac {4 (1-2 \log (x))^2}{\log ^2(x)}}-e^5 x+x^2 \log \left (2-e^x\right )+2 \text {Li}_3\left (\frac {e^x}{2}\right )-2 \operatorname {Subst}\left (\int \frac {\text {Li}_2\left (\frac {x}{2}\right )}{x} \, dx,x,e^x\right )\\ &=e^{\frac {4 (1-2 \log (x))^2}{\log ^2(x)}}-e^5 x+x^2 \log \left (2-e^x\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.50, size = 35, normalized size = 1.03 \begin {gather*} e^{16+\frac {4}{\log ^2(x)}-\frac {16}{\log (x)}}-e^5 x+x^2 \log \left (2-e^x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.89, size = 36, normalized size = 1.06 \begin {gather*} x^{2} \log \left (-e^{x} + 2\right ) - x e^{5} + e^{\left (\frac {4 \, {\left (4 \, \log \relax (x)^{2} - 4 \, \log \relax (x) + 1\right )}}{\log \relax (x)^{2}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \mathit {undef} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 33, normalized size = 0.97
method | result | size |
risch | \(\ln \left (-{\mathrm e}^{x}+2\right ) x^{2}-x \,{\mathrm e}^{5}+{\mathrm e}^{\frac {4 \left (2 \ln \relax (x )-1\right )^{2}}{\ln \relax (x )^{2}}}\) | \(33\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.65, size = 48, normalized size = 1.41 \begin {gather*} {\left (x^{2} e^{\frac {16}{\log \relax (x)}} \log \left (-e^{x} + 2\right ) - x e^{\left (\frac {16}{\log \relax (x)} + 5\right )} + e^{\left (\frac {4}{\log \relax (x)^{2}} + 16\right )}\right )} e^{\left (-\frac {16}{\log \relax (x)}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.62, size = 34, normalized size = 1.00 \begin {gather*} x^2\,\ln \left (2-{\mathrm {e}}^x\right )-x\,{\mathrm {e}}^5+{\mathrm {e}}^{\frac {4}{{\ln \relax (x)}^2}}\,{\mathrm {e}}^{-\frac {16}{\ln \relax (x)}}\,{\mathrm {e}}^{16} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 2.10, size = 34, normalized size = 1.00 \begin {gather*} x^{2} \log {\left (2 - e^{x} \right )} - x e^{5} + e^{\frac {16 \log {\relax (x )}^{2} - 16 \log {\relax (x )} + 4}{\log {\relax (x )}^{2}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________