Optimal. Leaf size=22 \[ x \left (1+x-\log \left (\left (-5+e^x\right ) (20-x) (3+x)\right )\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 1.06, antiderivative size = 28, normalized size of antiderivative = 1.27, number of
steps used = 28, number of rules used = 14, integrand size = 107, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.131, Rules
used = {6873, 6860, 2215, 2221, 2317, 2438, 6820, 6874, 36, 31, 78, 84, 2628, 1626}
\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 78
Rule 84
Rule 1626
Rule 2215
Rule 2221
Rule 2317
Rule 2438
Rule 2628
Rule 6820
Rule 6860
Rule 6873
Rule 6874
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+\text {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 )-\text {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.04, 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]
________________________________________________________________________________________
Maple [A]
time = 0.63, 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.32, 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]
________________________________________________________________________________________
Fricas [A]
time = 0.37, 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]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 56 vs.
\(2 (17) = 34\).
time = 0.36, 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]
________________________________________________________________________________________
Giac [A]
time = 0.44, 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]
________________________________________________________________________________________
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]
________________________________________________________________________________________