Optimal. Leaf size=27 \[ 5 \left (9-x^2+\frac {4 \left (1+x^2\right )^2 \log (4)}{-2+e^x}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 1.56, antiderivative size = 51, normalized size of antiderivative = 1.89, number of steps used = 62, number of rules used = 16, integrand size = 70, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.229, Rules used = {6741, 6742, 2282, 44, 2185, 2184, 2190, 2531, 6589, 2191, 2279, 2391, 6609, 36, 31, 29} \begin {gather*} -\frac {20 x^4 \log (4)}{2-e^x}-5 x^2-\frac {40 x^2 \log (4)}{2-e^x}-\frac {20 \log (4)}{2-e^x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 44
Rule 2184
Rule 2185
Rule 2190
Rule 2191
Rule 2279
Rule 2282
Rule 2391
Rule 2531
Rule 6589
Rule 6609
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-40 x-10 e^{2 x} x+\left (-160 x-160 x^3\right ) \log (4)+e^x \left (40 x+\left (-20+80 x-40 x^2+80 x^3-20 x^4\right ) \log (4)\right )}{\left (2-e^x\right )^2} \, dx\\ &=\int \left (-10 x-\frac {40 \left (1+x^2\right )^2 \log (4)}{\left (-2+e^x\right )^2}-\frac {20 \left (1-4 x+2 x^2-4 x^3+x^4\right ) \log (4)}{-2+e^x}\right ) \, dx\\ &=-5 x^2-(20 \log (4)) \int \frac {1-4 x+2 x^2-4 x^3+x^4}{-2+e^x} \, dx-(40 \log (4)) \int \frac {\left (1+x^2\right )^2}{\left (-2+e^x\right )^2} \, dx\\ &=-5 x^2-(20 \log (4)) \int \left (\frac {1}{-2+e^x}-\frac {4 x}{-2+e^x}+\frac {2 x^2}{-2+e^x}-\frac {4 x^3}{-2+e^x}+\frac {x^4}{-2+e^x}\right ) \, dx-(40 \log (4)) \int \left (\frac {1}{\left (-2+e^x\right )^2}+\frac {2 x^2}{\left (-2+e^x\right )^2}+\frac {x^4}{\left (-2+e^x\right )^2}\right ) \, dx\\ &=-5 x^2-(20 \log (4)) \int \frac {1}{-2+e^x} \, dx-(20 \log (4)) \int \frac {x^4}{-2+e^x} \, dx-(40 \log (4)) \int \frac {1}{\left (-2+e^x\right )^2} \, dx-(40 \log (4)) \int \frac {x^2}{-2+e^x} \, dx-(40 \log (4)) \int \frac {x^4}{\left (-2+e^x\right )^2} \, dx+(80 \log (4)) \int \frac {x}{-2+e^x} \, dx-(80 \log (4)) \int \frac {x^2}{\left (-2+e^x\right )^2} \, dx+(80 \log (4)) \int \frac {x^3}{-2+e^x} \, dx\\ &=-5 x^2-20 x^2 \log (4)+\frac {20}{3} x^3 \log (4)-10 x^4 \log (4)+2 x^5 \log (4)-(10 \log (4)) \int \frac {e^x x^4}{-2+e^x} \, dx-(20 \log (4)) \int \frac {e^x x^2}{-2+e^x} \, dx-(20 \log (4)) \int \frac {e^x x^4}{\left (-2+e^x\right )^2} \, dx+(20 \log (4)) \int \frac {x^4}{-2+e^x} \, dx-(20 \log (4)) \operatorname {Subst}\left (\int \frac {1}{(-2+x) x} \, dx,x,e^x\right )+(40 \log (4)) \int \frac {e^x x}{-2+e^x} \, dx-(40 \log (4)) \int \frac {e^x x^2}{\left (-2+e^x\right )^2} \, dx+(40 \log (4)) \int \frac {x^2}{-2+e^x} \, dx+(40 \log (4)) \int \frac {e^x x^3}{-2+e^x} \, dx-(40 \log (4)) \operatorname {Subst}\left (\int \frac {1}{(-2+x)^2 x} \, dx,x,e^x\right )\\ &=-5 x^2-20 x^2 \log (4)-\frac {40 x^2 \log (4)}{2-e^x}-10 x^4 \log (4)-\frac {20 x^4 \log (4)}{2-e^x}+40 x \log (4) \log \left (1-\frac {e^x}{2}\right )-20 x^2 \log (4) \log \left (1-\frac {e^x}{2}\right )+40 x^3 \log (4) \log \left (1-\frac {e^x}{2}\right )-10 x^4 \log (4) \log \left (1-\frac {e^x}{2}\right )+(10 \log (4)) \int \frac {e^x x^4}{-2+e^x} \, dx-(10 \log (4)) \operatorname {Subst}\left (\int \frac {1}{-2+x} \, dx,x,e^x\right )+(10 \log (4)) \operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,e^x\right )+(20 \log (4)) \int \frac {e^x x^2}{-2+e^x} \, dx-(40 \log (4)) \int \log \left (1-\frac {e^x}{2}\right ) \, dx+(40 \log (4)) \int x \log \left (1-\frac {e^x}{2}\right ) \, dx+(40 \log (4)) \int x^3 \log \left (1-\frac {e^x}{2}\right ) \, dx-(40 \log (4)) \operatorname {Subst}\left (\int \left (\frac {1}{2 (-2+x)^2}-\frac {1}{4 (-2+x)}+\frac {1}{4 x}\right ) \, dx,x,e^x\right )-(80 \log (4)) \int \frac {x}{-2+e^x} \, dx-(80 \log (4)) \int \frac {x^3}{-2+e^x} \, dx-(120 \log (4)) \int x^2 \log \left (1-\frac {e^x}{2}\right ) \, dx\\ &=-5 x^2-\frac {20 \log (4)}{2-e^x}-\frac {40 x^2 \log (4)}{2-e^x}-\frac {20 x^4 \log (4)}{2-e^x}+40 x \log (4) \log \left (1-\frac {e^x}{2}\right )+40 x^3 \log (4) \log \left (1-\frac {e^x}{2}\right )-40 x \log (4) \text {Li}_2\left (\frac {e^x}{2}\right )+120 x^2 \log (4) \text {Li}_2\left (\frac {e^x}{2}\right )-40 x^3 \log (4) \text {Li}_2\left (\frac {e^x}{2}\right )-(40 \log (4)) \int \frac {e^x x}{-2+e^x} \, dx-(40 \log (4)) \int \frac {e^x x^3}{-2+e^x} \, dx-(40 \log (4)) \int x \log \left (1-\frac {e^x}{2}\right ) \, dx-(40 \log (4)) \int x^3 \log \left (1-\frac {e^x}{2}\right ) \, dx+(40 \log (4)) \int \text {Li}_2\left (\frac {e^x}{2}\right ) \, dx-(40 \log (4)) \operatorname {Subst}\left (\int \frac {\log \left (1-\frac {x}{2}\right )}{x} \, dx,x,e^x\right )+(120 \log (4)) \int x^2 \text {Li}_2\left (\frac {e^x}{2}\right ) \, dx-(240 \log (4)) \int x \text {Li}_2\left (\frac {e^x}{2}\right ) \, dx\\ &=-5 x^2-\frac {20 \log (4)}{2-e^x}-\frac {40 x^2 \log (4)}{2-e^x}-\frac {20 x^4 \log (4)}{2-e^x}+40 \log (4) \text {Li}_2\left (\frac {e^x}{2}\right )+120 x^2 \log (4) \text {Li}_2\left (\frac {e^x}{2}\right )-240 x \log (4) \text {Li}_3\left (\frac {e^x}{2}\right )+120 x^2 \log (4) \text {Li}_3\left (\frac {e^x}{2}\right )+(40 \log (4)) \int \log \left (1-\frac {e^x}{2}\right ) \, dx-(40 \log (4)) \int \text {Li}_2\left (\frac {e^x}{2}\right ) \, dx+(40 \log (4)) \operatorname {Subst}\left (\int \frac {\text {Li}_2\left (\frac {x}{2}\right )}{x} \, dx,x,e^x\right )+(120 \log (4)) \int x^2 \log \left (1-\frac {e^x}{2}\right ) \, dx-(120 \log (4)) \int x^2 \text {Li}_2\left (\frac {e^x}{2}\right ) \, dx+(240 \log (4)) \int \text {Li}_3\left (\frac {e^x}{2}\right ) \, dx-(240 \log (4)) \int x \text {Li}_3\left (\frac {e^x}{2}\right ) \, dx\\ &=-5 x^2-\frac {20 \log (4)}{2-e^x}-\frac {40 x^2 \log (4)}{2-e^x}-\frac {20 x^4 \log (4)}{2-e^x}+40 \log (4) \text {Li}_2\left (\frac {e^x}{2}\right )+40 \log (4) \text {Li}_3\left (\frac {e^x}{2}\right )-240 x \log (4) \text {Li}_3\left (\frac {e^x}{2}\right )-240 x \log (4) \text {Li}_4\left (\frac {e^x}{2}\right )+(40 \log (4)) \operatorname {Subst}\left (\int \frac {\log \left (1-\frac {x}{2}\right )}{x} \, dx,x,e^x\right )-(40 \log (4)) \operatorname {Subst}\left (\int \frac {\text {Li}_2\left (\frac {x}{2}\right )}{x} \, dx,x,e^x\right )+(240 \log (4)) \int x \text {Li}_2\left (\frac {e^x}{2}\right ) \, dx+(240 \log (4)) \int x \text {Li}_3\left (\frac {e^x}{2}\right ) \, dx+(240 \log (4)) \int \text {Li}_4\left (\frac {e^x}{2}\right ) \, dx+(240 \log (4)) \operatorname {Subst}\left (\int \frac {\text {Li}_3\left (\frac {x}{2}\right )}{x} \, dx,x,e^x\right )\\ &=-5 x^2-\frac {20 \log (4)}{2-e^x}-\frac {40 x^2 \log (4)}{2-e^x}-\frac {20 x^4 \log (4)}{2-e^x}+240 \log (4) \text {Li}_4\left (\frac {e^x}{2}\right )-(240 \log (4)) \int \text {Li}_3\left (\frac {e^x}{2}\right ) \, dx-(240 \log (4)) \int \text {Li}_4\left (\frac {e^x}{2}\right ) \, dx+(240 \log (4)) \operatorname {Subst}\left (\int \frac {\text {Li}_4\left (\frac {x}{2}\right )}{x} \, dx,x,e^x\right )\\ &=-5 x^2-\frac {20 \log (4)}{2-e^x}-\frac {40 x^2 \log (4)}{2-e^x}-\frac {20 x^4 \log (4)}{2-e^x}+240 \log (4) \text {Li}_4\left (\frac {e^x}{2}\right )+240 \log (4) \text {Li}_5\left (\frac {e^x}{2}\right )-(240 \log (4)) \operatorname {Subst}\left (\int \frac {\text {Li}_3\left (\frac {x}{2}\right )}{x} \, dx,x,e^x\right )-(240 \log (4)) \operatorname {Subst}\left (\int \frac {\text {Li}_4\left (\frac {x}{2}\right )}{x} \, dx,x,e^x\right )\\ &=-5 x^2-\frac {20 \log (4)}{2-e^x}-\frac {40 x^2 \log (4)}{2-e^x}-\frac {20 x^4 \log (4)}{2-e^x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.27, size = 37, normalized size = 1.37 \begin {gather*} -10 \left (\frac {x^2}{2}+\frac {-4 x^2 \log (4)-\log (16)-x^4 \log (16)}{-2+e^x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.09, size = 34, normalized size = 1.26 \begin {gather*} -\frac {5 \, {\left (x^{2} e^{x} - 2 \, x^{2} - 8 \, {\left (x^{4} + 2 \, x^{2} + 1\right )} \log \relax (2)\right )}}{e^{x} - 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.38, size = 39, normalized size = 1.44 \begin {gather*} \frac {5 \, {\left (8 \, x^{4} \log \relax (2) - x^{2} e^{x} + 16 \, x^{2} \log \relax (2) + 2 \, x^{2} + 8 \, \log \relax (2)\right )}}{e^{x} - 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.26, size = 27, normalized size = 1.00
method | result | size |
risch | \(-5 x^{2}+\frac {40 \ln \relax (2) \left (x^{4}+2 x^{2}+1\right )}{{\mathrm e}^{x}-2}\) | \(27\) |
norman | \(\frac {\left (10+80 \ln \relax (2)\right ) x^{2}+40 x^{4} \ln \relax (2)-5 \,{\mathrm e}^{x} x^{2}+40 \ln \relax (2)}{{\mathrm e}^{x}-2}\) | \(37\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.59, size = 38, normalized size = 1.41 \begin {gather*} \frac {5 \, {\left (8 \, x^{4} \log \relax (2) + 2 \, x^{2} {\left (8 \, \log \relax (2) + 1\right )} - x^{2} e^{x} + 8 \, \log \relax (2)\right )}}{e^{x} - 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.12, size = 32, normalized size = 1.19 \begin {gather*} \frac {40\,\ln \relax (2)\,x^4+80\,\ln \relax (2)\,x^2+40\,\ln \relax (2)}{{\mathrm {e}}^x-2}-5\,x^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.12, size = 31, normalized size = 1.15 \begin {gather*} - 5 x^{2} + \frac {40 x^{4} \log {\relax (2 )} + 80 x^{2} \log {\relax (2 )} + 40 \log {\relax (2 )}}{e^{x} - 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________