Optimal. Leaf size=33 \[ 5+2 x-x^2+\frac {4 (2+x)}{4-e^{-x} \left (1-e^x\right )} \]
________________________________________________________________________________________
Rubi [B] time = 0.38, antiderivative size = 93, normalized size of antiderivative = 2.82, number of steps used = 17, number of rules used = 12, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {6741, 6742, 2184, 2190, 2279, 2391, 2185, 2191, 2282, 36, 29, 31} \begin {gather*} -\frac {1}{25} (7-5 x)^2+\frac {2}{5} (x+1)^2-\frac {2}{5} (x+2)^2+\frac {4 x}{5}-\frac {4 (x+2)}{5 \left (1-5 e^x\right )}-\frac {4}{5} (x+1) \log \left (1-5 e^x\right )+\frac {4}{5} (x+2) \log \left (1-5 e^x\right )-\frac {4}{5} \log \left (1-5 e^x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 2184
Rule 2185
Rule 2190
Rule 2191
Rule 2279
Rule 2282
Rule 2391
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {2+e^{2 x} (70-50 x)-2 x+e^x (-32+16 x)}{\left (1-5 e^x\right )^2} \, dx\\ &=\int \left (-\frac {4 (1+x)}{5 \left (-1+5 e^x\right )}-\frac {4 (2+x)}{5 \left (-1+5 e^x\right )^2}-\frac {2}{5} (-7+5 x)\right ) \, dx\\ &=-\frac {1}{25} (7-5 x)^2-\frac {4}{5} \int \frac {1+x}{-1+5 e^x} \, dx-\frac {4}{5} \int \frac {2+x}{\left (-1+5 e^x\right )^2} \, dx\\ &=-\frac {1}{25} (7-5 x)^2+\frac {2}{5} (1+x)^2+\frac {4}{5} \int \frac {2+x}{-1+5 e^x} \, dx-4 \int \frac {e^x (1+x)}{-1+5 e^x} \, dx-4 \int \frac {e^x (2+x)}{\left (-1+5 e^x\right )^2} \, dx\\ &=-\frac {1}{25} (7-5 x)^2+\frac {2}{5} (1+x)^2-\frac {4 (2+x)}{5 \left (1-5 e^x\right )}-\frac {2}{5} (2+x)^2-\frac {4}{5} (1+x) \log \left (1-5 e^x\right )-\frac {4}{5} \int \frac {1}{-1+5 e^x} \, dx+\frac {4}{5} \int \log \left (1-5 e^x\right ) \, dx+4 \int \frac {e^x (2+x)}{-1+5 e^x} \, dx\\ &=-\frac {1}{25} (7-5 x)^2+\frac {2}{5} (1+x)^2-\frac {4 (2+x)}{5 \left (1-5 e^x\right )}-\frac {2}{5} (2+x)^2-\frac {4}{5} (1+x) \log \left (1-5 e^x\right )+\frac {4}{5} (2+x) \log \left (1-5 e^x\right )-\frac {4}{5} \int \log \left (1-5 e^x\right ) \, dx-\frac {4}{5} \operatorname {Subst}\left (\int \frac {1}{x (-1+5 x)} \, dx,x,e^x\right )+\frac {4}{5} \operatorname {Subst}\left (\int \frac {\log (1-5 x)}{x} \, dx,x,e^x\right )\\ &=-\frac {1}{25} (7-5 x)^2+\frac {2}{5} (1+x)^2-\frac {4 (2+x)}{5 \left (1-5 e^x\right )}-\frac {2}{5} (2+x)^2-\frac {4}{5} (1+x) \log \left (1-5 e^x\right )+\frac {4}{5} (2+x) \log \left (1-5 e^x\right )-\frac {4 \text {Li}_2\left (5 e^x\right )}{5}+\frac {4}{5} \operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,e^x\right )-\frac {4}{5} \operatorname {Subst}\left (\int \frac {\log (1-5 x)}{x} \, dx,x,e^x\right )-4 \operatorname {Subst}\left (\int \frac {1}{-1+5 x} \, dx,x,e^x\right )\\ &=-\frac {1}{25} (7-5 x)^2+\frac {4 x}{5}+\frac {2}{5} (1+x)^2-\frac {4 (2+x)}{5 \left (1-5 e^x\right )}-\frac {2}{5} (2+x)^2-\frac {4}{5} \log \left (1-5 e^x\right )-\frac {4}{5} (1+x) \log \left (1-5 e^x\right )+\frac {4}{5} (2+x) \log \left (1-5 e^x\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.12, size = 31, normalized size = 0.94 \begin {gather*} -2 \left (-\frac {7 x}{5}+\frac {x^2}{2}-\frac {2 (2+x)}{5 \left (-1+5 e^x\right )}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.92, size = 33, normalized size = 1.00 \begin {gather*} \frac {5 \, x^{2} - 5 \, {\left (5 \, x^{2} - 14 \, x\right )} e^{x} - 10 \, x + 8}{5 \, {\left (5 \, e^{x} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.18, size = 32, normalized size = 0.97 \begin {gather*} -\frac {25 \, x^{2} e^{x} - 5 \, x^{2} - 70 \, x e^{x} + 10 \, x - 8}{5 \, {\left (5 \, e^{x} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.07, size = 23, normalized size = 0.70
method | result | size |
risch | \(-x^{2}+\frac {14 x}{5}+\frac {\frac {4 x}{5}+\frac {8}{5}}{5 \,{\mathrm e}^{x}-1}\) | \(23\) |
norman | \(\frac {x^{2}+8 \,{\mathrm e}^{x}-2 x +14 \,{\mathrm e}^{x} x -5 \,{\mathrm e}^{x} x^{2}}{5 \,{\mathrm e}^{x}-1}\) | \(33\) |
default | \(2 \ln \left ({\mathrm e}^{x}\right )+\frac {8}{5 \left (5 \,{\mathrm e}^{x}-1\right )}-x^{2}+\frac {4 x \,{\mathrm e}^{x}}{5 \,{\mathrm e}^{x}-1}\) | \(35\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.84, size = 60, normalized size = 1.82 \begin {gather*} 2 \, x + \frac {5 \, x^{2} - 5 \, {\left (5 \, x^{2} - 4 \, x\right )} e^{x} + 18}{5 \, {\left (5 \, e^{x} - 1\right )}} - \frac {2}{5 \, e^{x} - 1} - 2 \, \log \left (5 \, e^{x} - 1\right ) + 2 \, \log \left (e^{x} - \frac {1}{5}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.79, size = 23, normalized size = 0.70 \begin {gather*} \frac {14\,x}{5}+\frac {\frac {4\,x}{5}+\frac {8}{5}}{5\,{\mathrm {e}}^x-1}-x^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.11, size = 19, normalized size = 0.58 \begin {gather*} - x^{2} + \frac {14 x}{5} + \frac {4 x + 8}{25 e^{x} - 5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________