Optimal. Leaf size=31 \[ \frac {x^2 (-1+3 x)^2 \left (x+x^2\right )^2}{36 \left (x-e^x x\right )} \]
________________________________________________________________________________________
Rubi [B] time = 3.13, antiderivative size = 81, normalized size of antiderivative = 2.61, number of steps used = 138, number of rules used = 11, integrand size = 78, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.141, Rules used = {6688, 12, 6742, 2185, 2184, 2190, 2531, 6609, 2282, 6589, 2191} \begin {gather*} \frac {x^7}{4 \left (1-e^x\right )}+\frac {x^6}{3 \left (1-e^x\right )}-\frac {x^5}{18 \left (1-e^x\right )}-\frac {x^4}{9 \left (1-e^x\right )}+\frac {x^3}{36 \left (1-e^x\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2184
Rule 2185
Rule 2190
Rule 2191
Rule 2282
Rule 2531
Rule 6589
Rule 6609
Rule 6688
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {x^2 \left (1-2 x-3 x^2\right ) \left (3-10 x-21 x^2-e^x \left (3-11 x-19 x^2+3 x^3\right )\right )}{36 \left (1-e^x\right )^2} \, dx\\ &=\frac {1}{36} \int \frac {x^2 \left (1-2 x-3 x^2\right ) \left (3-10 x-21 x^2-e^x \left (3-11 x-19 x^2+3 x^3\right )\right )}{\left (1-e^x\right )^2} \, dx\\ &=\frac {1}{36} \int \left (\frac {x^3 \left (-1+2 x+3 x^2\right )^2}{\left (-1+e^x\right )^2}+\frac {x^2 \left (-3+17 x+6 x^2-74 x^3-51 x^4+9 x^5\right )}{-1+e^x}\right ) \, dx\\ &=\frac {1}{36} \int \frac {x^3 \left (-1+2 x+3 x^2\right )^2}{\left (-1+e^x\right )^2} \, dx+\frac {1}{36} \int \frac {x^2 \left (-3+17 x+6 x^2-74 x^3-51 x^4+9 x^5\right )}{-1+e^x} \, dx\\ &=\frac {1}{36} \int \left (\frac {x^3}{\left (-1+e^x\right )^2}-\frac {4 x^4}{\left (-1+e^x\right )^2}-\frac {2 x^5}{\left (-1+e^x\right )^2}+\frac {12 x^6}{\left (-1+e^x\right )^2}+\frac {9 x^7}{\left (-1+e^x\right )^2}\right ) \, dx+\frac {1}{36} \int \left (-\frac {3 x^2}{-1+e^x}+\frac {17 x^3}{-1+e^x}+\frac {6 x^4}{-1+e^x}-\frac {74 x^5}{-1+e^x}-\frac {51 x^6}{-1+e^x}+\frac {9 x^7}{-1+e^x}\right ) \, dx\\ &=\frac {1}{36} \int \frac {x^3}{\left (-1+e^x\right )^2} \, dx-\frac {1}{18} \int \frac {x^5}{\left (-1+e^x\right )^2} \, dx-\frac {1}{12} \int \frac {x^2}{-1+e^x} \, dx-\frac {1}{9} \int \frac {x^4}{\left (-1+e^x\right )^2} \, dx+\frac {1}{6} \int \frac {x^4}{-1+e^x} \, dx+\frac {1}{4} \int \frac {x^7}{\left (-1+e^x\right )^2} \, dx+\frac {1}{4} \int \frac {x^7}{-1+e^x} \, dx+\frac {1}{3} \int \frac {x^6}{\left (-1+e^x\right )^2} \, dx+\frac {17}{36} \int \frac {x^3}{-1+e^x} \, dx-\frac {17}{12} \int \frac {x^6}{-1+e^x} \, dx-\frac {37}{18} \int \frac {x^5}{-1+e^x} \, dx\\ &=\frac {x^3}{36}-\frac {17 x^4}{144}-\frac {x^5}{30}+\frac {37 x^6}{108}+\frac {17 x^7}{84}-\frac {x^8}{32}+\frac {1}{36} \int \frac {e^x x^3}{\left (-1+e^x\right )^2} \, dx-\frac {1}{36} \int \frac {x^3}{-1+e^x} \, dx-\frac {1}{18} \int \frac {e^x x^5}{\left (-1+e^x\right )^2} \, dx+\frac {1}{18} \int \frac {x^5}{-1+e^x} \, dx-\frac {1}{12} \int \frac {e^x x^2}{-1+e^x} \, dx-\frac {1}{9} \int \frac {e^x x^4}{\left (-1+e^x\right )^2} \, dx+\frac {1}{9} \int \frac {x^4}{-1+e^x} \, dx+\frac {1}{6} \int \frac {e^x x^4}{-1+e^x} \, dx+\frac {1}{4} \int \frac {e^x x^7}{\left (-1+e^x\right )^2} \, dx-\frac {1}{4} \int \frac {x^7}{-1+e^x} \, dx+\frac {1}{4} \int \frac {e^x x^7}{-1+e^x} \, dx+\frac {1}{3} \int \frac {e^x x^6}{\left (-1+e^x\right )^2} \, dx-\frac {1}{3} \int \frac {x^6}{-1+e^x} \, dx+\frac {17}{36} \int \frac {e^x x^3}{-1+e^x} \, dx-\frac {17}{12} \int \frac {e^x x^6}{-1+e^x} \, dx-\frac {37}{18} \int \frac {e^x x^5}{-1+e^x} \, dx\\ &=\frac {x^3}{36}+\frac {x^3}{36 \left (1-e^x\right )}-\frac {x^4}{9}-\frac {x^4}{9 \left (1-e^x\right )}-\frac {x^5}{18}-\frac {x^5}{18 \left (1-e^x\right )}+\frac {x^6}{3}+\frac {x^6}{3 \left (1-e^x\right )}+\frac {x^7}{4}+\frac {x^7}{4 \left (1-e^x\right )}-\frac {1}{12} x^2 \log \left (1-e^x\right )+\frac {17}{36} x^3 \log \left (1-e^x\right )+\frac {1}{6} x^4 \log \left (1-e^x\right )-\frac {37}{18} x^5 \log \left (1-e^x\right )-\frac {17}{12} x^6 \log \left (1-e^x\right )+\frac {1}{4} x^7 \log \left (1-e^x\right )-\frac {1}{36} \int \frac {e^x x^3}{-1+e^x} \, dx+\frac {1}{18} \int \frac {e^x x^5}{-1+e^x} \, dx+\frac {1}{12} \int \frac {x^2}{-1+e^x} \, dx+\frac {1}{9} \int \frac {e^x x^4}{-1+e^x} \, dx+\frac {1}{6} \int x \log \left (1-e^x\right ) \, dx-\frac {1}{4} \int \frac {e^x x^7}{-1+e^x} \, dx-\frac {5}{18} \int \frac {x^4}{-1+e^x} \, dx-\frac {1}{3} \int \frac {e^x x^6}{-1+e^x} \, dx-\frac {4}{9} \int \frac {x^3}{-1+e^x} \, dx-\frac {2}{3} \int x^3 \log \left (1-e^x\right ) \, dx-\frac {17}{12} \int x^2 \log \left (1-e^x\right ) \, dx+\frac {7}{4} \int \frac {x^6}{-1+e^x} \, dx-\frac {7}{4} \int x^6 \log \left (1-e^x\right ) \, dx+2 \int \frac {x^5}{-1+e^x} \, dx+\frac {17}{2} \int x^5 \log \left (1-e^x\right ) \, dx+\frac {185}{18} \int x^4 \log \left (1-e^x\right ) \, dx\\ &=\frac {x^3}{36 \left (1-e^x\right )}-\frac {x^4}{9 \left (1-e^x\right )}-\frac {x^5}{18 \left (1-e^x\right )}+\frac {x^6}{3 \left (1-e^x\right )}+\frac {x^7}{4 \left (1-e^x\right )}-\frac {1}{12} x^2 \log \left (1-e^x\right )+\frac {4}{9} x^3 \log \left (1-e^x\right )+\frac {5}{18} x^4 \log \left (1-e^x\right )-2 x^5 \log \left (1-e^x\right )-\frac {7}{4} x^6 \log \left (1-e^x\right )-\frac {x \text {Li}_2\left (e^x\right )}{6}+\frac {17}{12} x^2 \text {Li}_2\left (e^x\right )+\frac {2}{3} x^3 \text {Li}_2\left (e^x\right )-\frac {185}{18} x^4 \text {Li}_2\left (e^x\right )-\frac {17}{2} x^5 \text {Li}_2\left (e^x\right )+\frac {7}{4} x^6 \text {Li}_2\left (e^x\right )+\frac {1}{12} \int \frac {e^x x^2}{-1+e^x} \, dx+\frac {1}{12} \int x^2 \log \left (1-e^x\right ) \, dx+\frac {1}{6} \int \text {Li}_2\left (e^x\right ) \, dx-\frac {5}{18} \int \frac {e^x x^4}{-1+e^x} \, dx-\frac {5}{18} \int x^4 \log \left (1-e^x\right ) \, dx-\frac {4}{9} \int \frac {e^x x^3}{-1+e^x} \, dx-\frac {4}{9} \int x^3 \log \left (1-e^x\right ) \, dx+\frac {7}{4} \int \frac {e^x x^6}{-1+e^x} \, dx+\frac {7}{4} \int x^6 \log \left (1-e^x\right ) \, dx+2 \int \frac {e^x x^5}{-1+e^x} \, dx+2 \int x^5 \log \left (1-e^x\right ) \, dx-2 \int x^2 \text {Li}_2\left (e^x\right ) \, dx-\frac {17}{6} \int x \text {Li}_2\left (e^x\right ) \, dx-\frac {21}{2} \int x^5 \text {Li}_2\left (e^x\right ) \, dx+\frac {370}{9} \int x^3 \text {Li}_2\left (e^x\right ) \, dx+\frac {85}{2} \int x^4 \text {Li}_2\left (e^x\right ) \, dx\\ &=\frac {x^3}{36 \left (1-e^x\right )}-\frac {x^4}{9 \left (1-e^x\right )}-\frac {x^5}{18 \left (1-e^x\right )}+\frac {x^6}{3 \left (1-e^x\right )}+\frac {x^7}{4 \left (1-e^x\right )}-\frac {x \text {Li}_2\left (e^x\right )}{6}+\frac {4}{3} x^2 \text {Li}_2\left (e^x\right )+\frac {10}{9} x^3 \text {Li}_2\left (e^x\right )-10 x^4 \text {Li}_2\left (e^x\right )-\frac {21}{2} x^5 \text {Li}_2\left (e^x\right )-\frac {17 x \text {Li}_3\left (e^x\right )}{6}-2 x^2 \text {Li}_3\left (e^x\right )+\frac {370}{9} x^3 \text {Li}_3\left (e^x\right )+\frac {85}{2} x^4 \text {Li}_3\left (e^x\right )-\frac {21}{2} x^5 \text {Li}_3\left (e^x\right )-\frac {1}{6} \int x \log \left (1-e^x\right ) \, dx+\frac {1}{6} \int x \text {Li}_2\left (e^x\right ) \, dx+\frac {1}{6} \operatorname {Subst}\left (\int \frac {\text {Li}_2(x)}{x} \, dx,x,e^x\right )+\frac {10}{9} \int x^3 \log \left (1-e^x\right ) \, dx-\frac {10}{9} \int x^3 \text {Li}_2\left (e^x\right ) \, dx+\frac {4}{3} \int x^2 \log \left (1-e^x\right ) \, dx-\frac {4}{3} \int x^2 \text {Li}_2\left (e^x\right ) \, dx+\frac {17}{6} \int \text {Li}_3\left (e^x\right ) \, dx+4 \int x \text {Li}_3\left (e^x\right ) \, dx-10 \int x^4 \log \left (1-e^x\right ) \, dx+10 \int x^4 \text {Li}_2\left (e^x\right ) \, dx-\frac {21}{2} \int x^5 \log \left (1-e^x\right ) \, dx+\frac {21}{2} \int x^5 \text {Li}_2\left (e^x\right ) \, dx+\frac {105}{2} \int x^4 \text {Li}_3\left (e^x\right ) \, dx-\frac {370}{3} \int x^2 \text {Li}_3\left (e^x\right ) \, dx-170 \int x^3 \text {Li}_3\left (e^x\right ) \, dx\\ &=\frac {x^3}{36 \left (1-e^x\right )}-\frac {x^4}{9 \left (1-e^x\right )}-\frac {x^5}{18 \left (1-e^x\right )}+\frac {x^6}{3 \left (1-e^x\right )}+\frac {x^7}{4 \left (1-e^x\right )}+\frac {\text {Li}_3\left (e^x\right )}{6}-\frac {8 x \text {Li}_3\left (e^x\right )}{3}-\frac {10}{3} x^2 \text {Li}_3\left (e^x\right )+40 x^3 \text {Li}_3\left (e^x\right )+\frac {105}{2} x^4 \text {Li}_3\left (e^x\right )+4 x \text {Li}_4\left (e^x\right )-\frac {370}{3} x^2 \text {Li}_4\left (e^x\right )-170 x^3 \text {Li}_4\left (e^x\right )+\frac {105}{2} x^4 \text {Li}_4\left (e^x\right )-\frac {1}{6} \int \text {Li}_2\left (e^x\right ) \, dx-\frac {1}{6} \int \text {Li}_3\left (e^x\right ) \, dx+\frac {8}{3} \int x \text {Li}_2\left (e^x\right ) \, dx+\frac {8}{3} \int x \text {Li}_3\left (e^x\right ) \, dx+\frac {17}{6} \operatorname {Subst}\left (\int \frac {\text {Li}_3(x)}{x} \, dx,x,e^x\right )+\frac {10}{3} \int x^2 \text {Li}_2\left (e^x\right ) \, dx+\frac {10}{3} \int x^2 \text {Li}_3\left (e^x\right ) \, dx-4 \int \text {Li}_4\left (e^x\right ) \, dx-40 \int x^3 \text {Li}_2\left (e^x\right ) \, dx-40 \int x^3 \text {Li}_3\left (e^x\right ) \, dx-\frac {105}{2} \int x^4 \text {Li}_2\left (e^x\right ) \, dx-\frac {105}{2} \int x^4 \text {Li}_3\left (e^x\right ) \, dx-210 \int x^3 \text {Li}_4\left (e^x\right ) \, dx+\frac {740}{3} \int x \text {Li}_4\left (e^x\right ) \, dx+510 \int x^2 \text {Li}_4\left (e^x\right ) \, dx\\ &=\frac {x^3}{36 \left (1-e^x\right )}-\frac {x^4}{9 \left (1-e^x\right )}-\frac {x^5}{18 \left (1-e^x\right )}+\frac {x^6}{3 \left (1-e^x\right )}+\frac {x^7}{4 \left (1-e^x\right )}+\frac {\text {Li}_3\left (e^x\right )}{6}+\frac {17 \text {Li}_4\left (e^x\right )}{6}+\frac {20 x \text {Li}_4\left (e^x\right )}{3}-120 x^2 \text {Li}_4\left (e^x\right )-210 x^3 \text {Li}_4\left (e^x\right )+\frac {740 x \text {Li}_5\left (e^x\right )}{3}+510 x^2 \text {Li}_5\left (e^x\right )-210 x^3 \text {Li}_5\left (e^x\right )-\frac {1}{6} \operatorname {Subst}\left (\int \frac {\text {Li}_2(x)}{x} \, dx,x,e^x\right )-\frac {1}{6} \operatorname {Subst}\left (\int \frac {\text {Li}_3(x)}{x} \, dx,x,e^x\right )-\frac {8}{3} \int \text {Li}_3\left (e^x\right ) \, dx-\frac {8}{3} \int \text {Li}_4\left (e^x\right ) \, dx-4 \operatorname {Subst}\left (\int \frac {\text {Li}_4(x)}{x} \, dx,x,e^x\right )-\frac {20}{3} \int x \text {Li}_3\left (e^x\right ) \, dx-\frac {20}{3} \int x \text {Li}_4\left (e^x\right ) \, dx+120 \int x^2 \text {Li}_3\left (e^x\right ) \, dx+120 \int x^2 \text {Li}_4\left (e^x\right ) \, dx+210 \int x^3 \text {Li}_3\left (e^x\right ) \, dx+210 \int x^3 \text {Li}_4\left (e^x\right ) \, dx-\frac {740}{3} \int \text {Li}_5\left (e^x\right ) \, dx+630 \int x^2 \text {Li}_5\left (e^x\right ) \, dx-1020 \int x \text {Li}_5\left (e^x\right ) \, dx\\ &=\frac {x^3}{36 \left (1-e^x\right )}-\frac {x^4}{9 \left (1-e^x\right )}-\frac {x^5}{18 \left (1-e^x\right )}+\frac {x^6}{3 \left (1-e^x\right )}+\frac {x^7}{4 \left (1-e^x\right )}+\frac {8 \text {Li}_4\left (e^x\right )}{3}-4 \text {Li}_5\left (e^x\right )+240 x \text {Li}_5\left (e^x\right )+630 x^2 \text {Li}_5\left (e^x\right )-1020 x \text {Li}_6\left (e^x\right )+630 x^2 \text {Li}_6\left (e^x\right )-\frac {8}{3} \operatorname {Subst}\left (\int \frac {\text {Li}_3(x)}{x} \, dx,x,e^x\right )-\frac {8}{3} \operatorname {Subst}\left (\int \frac {\text {Li}_4(x)}{x} \, dx,x,e^x\right )+\frac {20}{3} \int \text {Li}_4\left (e^x\right ) \, dx+\frac {20}{3} \int \text {Li}_5\left (e^x\right ) \, dx-240 \int x \text {Li}_4\left (e^x\right ) \, dx-240 \int x \text {Li}_5\left (e^x\right ) \, dx-\frac {740}{3} \operatorname {Subst}\left (\int \frac {\text {Li}_5(x)}{x} \, dx,x,e^x\right )-630 \int x^2 \text {Li}_4\left (e^x\right ) \, dx-630 \int x^2 \text {Li}_5\left (e^x\right ) \, dx+1020 \int \text {Li}_6\left (e^x\right ) \, dx-1260 \int x \text {Li}_6\left (e^x\right ) \, dx\\ &=\frac {x^3}{36 \left (1-e^x\right )}-\frac {x^4}{9 \left (1-e^x\right )}-\frac {x^5}{18 \left (1-e^x\right )}+\frac {x^6}{3 \left (1-e^x\right )}+\frac {x^7}{4 \left (1-e^x\right )}-\frac {20 \text {Li}_5\left (e^x\right )}{3}-\frac {740 \text {Li}_6\left (e^x\right )}{3}-1260 x \text {Li}_6\left (e^x\right )-1260 x \text {Li}_7\left (e^x\right )+\frac {20}{3} \operatorname {Subst}\left (\int \frac {\text {Li}_4(x)}{x} \, dx,x,e^x\right )+\frac {20}{3} \operatorname {Subst}\left (\int \frac {\text {Li}_5(x)}{x} \, dx,x,e^x\right )+240 \int \text {Li}_5\left (e^x\right ) \, dx+240 \int \text {Li}_6\left (e^x\right ) \, dx+1020 \operatorname {Subst}\left (\int \frac {\text {Li}_6(x)}{x} \, dx,x,e^x\right )+1260 \int x \text {Li}_5\left (e^x\right ) \, dx+1260 \int x \text {Li}_6\left (e^x\right ) \, dx+1260 \int \text {Li}_7\left (e^x\right ) \, dx\\ &=\frac {x^3}{36 \left (1-e^x\right )}-\frac {x^4}{9 \left (1-e^x\right )}-\frac {x^5}{18 \left (1-e^x\right )}+\frac {x^6}{3 \left (1-e^x\right )}+\frac {x^7}{4 \left (1-e^x\right )}-240 \text {Li}_6\left (e^x\right )+1020 \text {Li}_7\left (e^x\right )+240 \operatorname {Subst}\left (\int \frac {\text {Li}_5(x)}{x} \, dx,x,e^x\right )+240 \operatorname {Subst}\left (\int \frac {\text {Li}_6(x)}{x} \, dx,x,e^x\right )-1260 \int \text {Li}_6\left (e^x\right ) \, dx-1260 \int \text {Li}_7\left (e^x\right ) \, dx+1260 \operatorname {Subst}\left (\int \frac {\text {Li}_7(x)}{x} \, dx,x,e^x\right )\\ &=\frac {x^3}{36 \left (1-e^x\right )}-\frac {x^4}{9 \left (1-e^x\right )}-\frac {x^5}{18 \left (1-e^x\right )}+\frac {x^6}{3 \left (1-e^x\right )}+\frac {x^7}{4 \left (1-e^x\right )}+1260 \text {Li}_7\left (e^x\right )+1260 \text {Li}_8\left (e^x\right )-1260 \operatorname {Subst}\left (\int \frac {\text {Li}_6(x)}{x} \, dx,x,e^x\right )-1260 \operatorname {Subst}\left (\int \frac {\text {Li}_7(x)}{x} \, dx,x,e^x\right )\\ &=\frac {x^3}{36 \left (1-e^x\right )}-\frac {x^4}{9 \left (1-e^x\right )}-\frac {x^5}{18 \left (1-e^x\right )}+\frac {x^6}{3 \left (1-e^x\right )}+\frac {x^7}{4 \left (1-e^x\right )}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.31, size = 26, normalized size = 0.84 \begin {gather*} -\frac {x^3 \left (-1+2 x+3 x^2\right )^2}{36 \left (-1+e^x\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 32, normalized size = 1.03 \begin {gather*} -\frac {9 \, x^{7} + 12 \, x^{6} - 2 \, x^{5} - 4 \, x^{4} + x^{3}}{36 \, {\left (e^{x} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.22, size = 32, normalized size = 1.03 \begin {gather*} -\frac {9 \, x^{7} + 12 \, x^{6} - 2 \, x^{5} - 4 \, x^{4} + x^{3}}{36 \, {\left (e^{x} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.14, size = 32, normalized size = 1.03
method | result | size |
risch | \(-\frac {x^{3} \left (9 x^{4}+12 x^{3}-2 x^{2}-4 x +1\right )}{36 \left ({\mathrm e}^{x}-1\right )}\) | \(32\) |
norman | \(\frac {-\frac {1}{36} x^{3}+\frac {1}{9} x^{4}+\frac {1}{18} x^{5}-\frac {1}{3} x^{6}-\frac {1}{4} x^{7}}{{\mathrm e}^{x}-1}\) | \(34\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.40, size = 32, normalized size = 1.03 \begin {gather*} -\frac {9 \, x^{7} + 12 \, x^{6} - 2 \, x^{5} - 4 \, x^{4} + x^{3}}{36 \, {\left (e^{x} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.13, size = 25, normalized size = 0.81 \begin {gather*} -\frac {x^3\,{\left (3\,x^2+2\,x-1\right )}^2}{36\,\left ({\mathrm {e}}^x-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.12, size = 29, normalized size = 0.94 \begin {gather*} \frac {- 9 x^{7} - 12 x^{6} + 2 x^{5} + 4 x^{4} - x^{3}}{36 e^{x} - 36} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________