Optimal. Leaf size=22 \[ x \left (1+x-\log \left (\left (-5+e^x\right ) (20-x) (3+x)\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 1.63, antiderivative size = 28, normalized size of antiderivative = 1.27, number of steps used = 28, number of rules used = 13, integrand size = 107, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {6741, 6728, 2184, 2190, 2279, 2391, 6688, 6742, 36, 31, 72, 2548, 1612} \begin {gather*} x^2-x \log \left (-\left (\left (5-e^x\right ) \left (-x^2+17 x+60\right )\right )\right )+x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 36
Rule 72
Rule 1612
Rule 2184
Rule 2190
Rule 2279
Rule 2391
Rule 2548
Rule 6688
Rule 6728
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {300+600 x+175 x^2-10 x^3+e^x \left (-60-60 x-18 x^2+x^3\right )+\left (-300-85 x+5 x^2+e^x \left (60+17 x-x^2\right )\right ) \log \left (-300-85 x+5 x^2+e^x \left (60+17 x-x^2\right )\right )}{\left (5-e^x\right ) \left (60+17 x-x^2\right )} \, dx\\ &=\int \left (-\frac {5 x}{-5+e^x}+\frac {-60-60 x-18 x^2+x^3+60 \log \left (-\left (\left (-5+e^x\right ) \left (-60-17 x+x^2\right )\right )\right )+17 x \log \left (-\left (\left (-5+e^x\right ) \left (-60-17 x+x^2\right )\right )\right )-x^2 \log \left (-\left (\left (-5+e^x\right ) \left (-60-17 x+x^2\right )\right )\right )}{(-20+x) (3+x)}\right ) \, dx\\ &=-\left (5 \int \frac {x}{-5+e^x} \, dx\right )+\int \frac {-60-60 x-18 x^2+x^3+60 \log \left (-\left (\left (-5+e^x\right ) \left (-60-17 x+x^2\right )\right )\right )+17 x \log \left (-\left (\left (-5+e^x\right ) \left (-60-17 x+x^2\right )\right )\right )-x^2 \log \left (-\left (\left (-5+e^x\right ) \left (-60-17 x+x^2\right )\right )\right )}{(-20+x) (3+x)} \, dx\\ &=\frac {x^2}{2}-\int \frac {e^x x}{-5+e^x} \, dx+\int \frac {60+60 x+18 x^2-x^3-\left (60+17 x-x^2\right ) \log \left (-\left (\left (-5+e^x\right ) \left (-60-17 x+x^2\right )\right )\right )}{(20-x) (3+x)} \, dx\\ &=\frac {x^2}{2}-x \log \left (1-\frac {e^x}{5}\right )+\int \log \left (1-\frac {e^x}{5}\right ) \, dx+\int \left (-\frac {60}{(-20+x) (3+x)}-\frac {60 x}{(-20+x) (3+x)}-\frac {18 x^2}{(-20+x) (3+x)}+\frac {x^3}{(-20+x) (3+x)}-\log \left (-\left (\left (-5+e^x\right ) \left (-60-17 x+x^2\right )\right )\right )\right ) \, dx\\ &=\frac {x^2}{2}-x \log \left (1-\frac {e^x}{5}\right )-18 \int \frac {x^2}{(-20+x) (3+x)} \, dx-60 \int \frac {1}{(-20+x) (3+x)} \, dx-60 \int \frac {x}{(-20+x) (3+x)} \, dx+\int \frac {x^3}{(-20+x) (3+x)} \, dx-\int \log \left (-\left (\left (-5+e^x\right ) \left (-60-17 x+x^2\right )\right )\right ) \, dx+\operatorname {Subst}\left (\int \frac {\log \left (1-\frac {x}{5}\right )}{x} \, dx,x,e^x\right )\\ &=\frac {x^2}{2}-x \log \left (1-\frac {e^x}{5}\right )-x \log \left (-\left (\left (5-e^x\right ) \left (60+17 x-x^2\right )\right )\right )-\text {Li}_2\left (\frac {e^x}{5}\right )-\frac {60}{23} \int \frac {1}{-20+x} \, dx+\frac {60}{23} \int \frac {1}{3+x} \, dx-18 \int \left (1+\frac {400}{23 (-20+x)}-\frac {9}{23 (3+x)}\right ) \, dx-60 \int \left (\frac {20}{23 (-20+x)}+\frac {3}{23 (3+x)}\right ) \, dx+\int \left (17+\frac {8000}{23 (-20+x)}+x+\frac {27}{23 (3+x)}\right ) \, dx+\int \frac {x \left (85-10 x+e^x \left (-77-15 x+x^2\right )\right )}{\left (5-e^x\right ) \left (60+17 x-x^2\right )} \, dx\\ &=-x+x^2-x \log \left (1-\frac {e^x}{5}\right )-20 \log (20-x)+3 \log (3+x)-x \log \left (-\left (\left (5-e^x\right ) \left (60+17 x-x^2\right )\right )\right )-\text {Li}_2\left (\frac {e^x}{5}\right )+\int \left (\frac {5 x}{-5+e^x}+\frac {x \left (-77-15 x+x^2\right )}{(-20+x) (3+x)}\right ) \, dx\\ &=-x+x^2-x \log \left (1-\frac {e^x}{5}\right )-20 \log (20-x)+3 \log (3+x)-x \log \left (-\left (\left (5-e^x\right ) \left (60+17 x-x^2\right )\right )\right )-\text {Li}_2\left (\frac {e^x}{5}\right )+5 \int \frac {x}{-5+e^x} \, dx+\int \frac {x \left (-77-15 x+x^2\right )}{(-20+x) (3+x)} \, dx\\ &=-x+\frac {x^2}{2}-x \log \left (1-\frac {e^x}{5}\right )-20 \log (20-x)+3 \log (3+x)-x \log \left (-\left (\left (5-e^x\right ) \left (60+17 x-x^2\right )\right )\right )-\text {Li}_2\left (\frac {e^x}{5}\right )+\int \frac {e^x x}{-5+e^x} \, dx+\int \left (2+\frac {20}{-20+x}+x-\frac {3}{3+x}\right ) \, dx\\ &=x+x^2-x \log \left (-\left (\left (5-e^x\right ) \left (60+17 x-x^2\right )\right )\right )-\text {Li}_2\left (\frac {e^x}{5}\right )-\int \log \left (1-\frac {e^x}{5}\right ) \, dx\\ &=x+x^2-x \log \left (-\left (\left (5-e^x\right ) \left (60+17 x-x^2\right )\right )\right )-\text {Li}_2\left (\frac {e^x}{5}\right )-\operatorname {Subst}\left (\int \frac {\log \left (1-\frac {x}{5}\right )}{x} \, dx,x,e^x\right )\\ &=x+x^2-x \log \left (-\left (\left (5-e^x\right ) \left (60+17 x-x^2\right )\right )\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 24, normalized size = 1.09 \begin {gather*} x+x^2-x \log \left (-\left (\left (-5+e^x\right ) \left (-60-17 x+x^2\right )\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.77, size = 31, normalized size = 1.41 \begin {gather*} x^{2} - x \log \left (5 \, x^{2} - {\left (x^{2} - 17 \, x - 60\right )} e^{x} - 85 \, x - 300\right ) + x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.30, size = 35, normalized size = 1.59 \begin {gather*} x^{2} - x \log \left (-x^{2} e^{x} + 5 \, x^{2} + 17 \, x e^{x} - 85 \, x + 60 \, e^{x} - 300\right ) + x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.22, size = 33, normalized size = 1.50
method | result | size |
norman | \(x +x^{2}-x \ln \left (\left (-x^{2}+17 x +60\right ) {\mathrm e}^{x}+5 x^{2}-85 x -300\right )\) | \(33\) |
risch | \(-x \ln \left (x^{2}-17 x -60\right )-x \ln \left ({\mathrm e}^{x}-5\right )+\frac {i \pi x \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}-5\right )\right ) \mathrm {csgn}\left (i \left (x^{2}-17 x -60\right )\right ) \mathrm {csgn}\left (i \left ({\mathrm e}^{x}-5\right ) \left (x^{2}-17 x -60\right )\right )}{2}-\frac {i \pi x \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}-5\right )\right ) \mathrm {csgn}\left (i \left ({\mathrm e}^{x}-5\right ) \left (x^{2}-17 x -60\right )\right )^{2}}{2}-\frac {i \pi x \,\mathrm {csgn}\left (i \left (x^{2}-17 x -60\right )\right ) \mathrm {csgn}\left (i \left ({\mathrm e}^{x}-5\right ) \left (x^{2}-17 x -60\right )\right )^{2}}{2}-\frac {i \pi x \mathrm {csgn}\left (i \left ({\mathrm e}^{x}-5\right ) \left (x^{2}-17 x -60\right )\right )^{3}}{2}+i \pi x \mathrm {csgn}\left (i \left ({\mathrm e}^{x}-5\right ) \left (x^{2}-17 x -60\right )\right )^{2}-i x \pi +x^{2}+x\) | \(184\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.45, size = 29, normalized size = 1.32 \begin {gather*} x^{2} - x \log \left (x + 3\right ) - x \log \left (x - 20\right ) - x \log \left (-e^{x} + 5\right ) + x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.58, size = 31, normalized size = 1.41 \begin {gather*} x\,\left (x-\ln \left ({\mathrm {e}}^x\,\left (-x^2+17\,x+60\right )-85\,x+5\,x^2-300\right )+1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.77, size = 56, normalized size = 2.55 \begin {gather*} x^{2} + x + \left (\frac {17}{6} - x\right ) \log {\left (5 x^{2} - 85 x + \left (- x^{2} + 17 x + 60\right ) e^{x} - 300 \right )} - \frac {17 \log {\left (e^{x} - 5 \right )}}{6} - \frac {17 \log {\left (x^{2} - 17 x - 60 \right )}}{6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________