Optimal. Leaf size=27 \[ x-\log (4-x)+\log (x) \left (-e^{7+x}+\log (x)+\log (1+x)\right ) \]
________________________________________________________________________________________
Rubi [A] time = 1.24, antiderivative size = 48, normalized size of antiderivative = 1.78, number of steps used = 32, number of rules used = 13, integrand size = 89, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.146, Rules used = {1594, 6728, 72, 616, 31, 632, 2357, 2316, 2315, 2317, 2391, 2301, 2288} \begin {gather*} x+\log ^2(x)-e^{x+7} \log (x)+\log (x+1) \log (x)-2 \log (4) \log (8-2 x)-\log (4-x)+2 \log (4) \log (x-4) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 72
Rule 616
Rule 632
Rule 1594
Rule 2288
Rule 2301
Rule 2315
Rule 2316
Rule 2317
Rule 2357
Rule 2391
Rule 6728
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-5 x-4 x^2+x^3+e^{7+x} \left (4+3 x-x^2\right )+\left (-8-10 x+3 x^2+e^{7+x} \left (4 x+3 x^2-x^3\right )\right ) \log (x)+\left (-4-3 x+x^2\right ) \log (1+x)}{x \left (-4-3 x+x^2\right )} \, dx\\ &=\int \left (\frac {x^2}{(-4+x) (1+x)}-\frac {5}{-4-3 x+x^2}-\frac {4 x}{-4-3 x+x^2}+\frac {3 x \log (x)}{(-4+x) (1+x)}-\frac {10 \log (x)}{-4-3 x+x^2}-\frac {8 \log (x)}{x \left (-4-3 x+x^2\right )}-\frac {e^{7+x} (1+x \log (x))}{x}+\frac {\log (1+x)}{x}\right ) \, dx\\ &=3 \int \frac {x \log (x)}{(-4+x) (1+x)} \, dx-4 \int \frac {x}{-4-3 x+x^2} \, dx-5 \int \frac {1}{-4-3 x+x^2} \, dx-8 \int \frac {\log (x)}{x \left (-4-3 x+x^2\right )} \, dx-10 \int \frac {\log (x)}{-4-3 x+x^2} \, dx+\int \frac {x^2}{(-4+x) (1+x)} \, dx-\int \frac {e^{7+x} (1+x \log (x))}{x} \, dx+\int \frac {\log (1+x)}{x} \, dx\\ &=-e^{7+x} \log (x)-\text {Li}_2(-x)-\frac {4}{5} \int \frac {1}{1+x} \, dx+3 \int \left (\frac {4 \log (x)}{5 (-4+x)}+\frac {\log (x)}{5 (1+x)}\right ) \, dx-\frac {16}{5} \int \frac {1}{-4+x} \, dx-8 \int \left (\frac {\log (x)}{20 (-4+x)}-\frac {\log (x)}{4 x}+\frac {\log (x)}{5 (1+x)}\right ) \, dx-10 \int \left (-\frac {2 \log (x)}{5 (8-2 x)}-\frac {2 \log (x)}{5 (2+2 x)}\right ) \, dx-\int \frac {1}{-4+x} \, dx+\int \frac {1}{1+x} \, dx+\int \left (1+\frac {16}{5 (-4+x)}-\frac {1}{5 (1+x)}\right ) \, dx\\ &=x-\log (4-x)-e^{7+x} \log (x)-\text {Li}_2(-x)-\frac {2}{5} \int \frac {\log (x)}{-4+x} \, dx+\frac {3}{5} \int \frac {\log (x)}{1+x} \, dx-\frac {8}{5} \int \frac {\log (x)}{1+x} \, dx+2 \int \frac {\log (x)}{x} \, dx+\frac {12}{5} \int \frac {\log (x)}{-4+x} \, dx+4 \int \frac {\log (x)}{8-2 x} \, dx+4 \int \frac {\log (x)}{2+2 x} \, dx\\ &=x-2 \log (4) \log (8-2 x)-\log (4-x)+2 \log (4) \log (-4+x)-e^{7+x} \log (x)+\log ^2(x)+\log (x) \log (1+x)-\text {Li}_2(-x)-\frac {2}{5} \int \frac {\log \left (\frac {x}{4}\right )}{-4+x} \, dx-\frac {3}{5} \int \frac {\log (1+x)}{x} \, dx+\frac {8}{5} \int \frac {\log (1+x)}{x} \, dx-2 \int \frac {\log (1+x)}{x} \, dx+\frac {12}{5} \int \frac {\log \left (\frac {x}{4}\right )}{-4+x} \, dx+4 \int \frac {\log \left (\frac {x}{4}\right )}{8-2 x} \, dx\\ &=x-2 \log (4) \log (8-2 x)-\log (4-x)+2 \log (4) \log (-4+x)-e^{7+x} \log (x)+\log ^2(x)+\log (x) \log (1+x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.28, size = 30, normalized size = 1.11 \begin {gather*} x-\log (4-x)-e^{7+x} \log (x)+\log ^2(x)+\log (x) \log (1+x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 27, normalized size = 1.00 \begin {gather*} -e^{\left (x + 7\right )} \log \relax (x) + \log \left (x + 1\right ) \log \relax (x) + \log \relax (x)^{2} + x - \log \left (x - 4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.20, size = 27, normalized size = 1.00 \begin {gather*} -e^{\left (x + 7\right )} \log \relax (x) + \log \left (x + 1\right ) \log \relax (x) + \log \relax (x)^{2} + x - \log \left (x - 4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.07, size = 28, normalized size = 1.04
method | result | size |
default | \(x -\ln \left (x -4\right )-\ln \relax (x ) {\mathrm e}^{x +7}+\ln \relax (x )^{2}+\ln \relax (x ) \ln \left (x +1\right )\) | \(28\) |
risch | \(x -\ln \left (x -4\right )-\ln \relax (x ) {\mathrm e}^{x +7}+\ln \relax (x )^{2}+\ln \relax (x ) \ln \left (x +1\right )\) | \(28\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.40, size = 27, normalized size = 1.00 \begin {gather*} -e^{\left (x + 7\right )} \log \relax (x) + \log \left (x + 1\right ) \log \relax (x) + \log \relax (x)^{2} + x - \log \left (x - 4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.07, size = 27, normalized size = 1.00 \begin {gather*} x-\ln \left (x-4\right )+{\ln \relax (x)}^2-{\mathrm {e}}^{x+7}\,\ln \relax (x)+\ln \left (x+1\right )\,\ln \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.56, size = 27, normalized size = 1.00 \begin {gather*} x - e^{x + 7} \log {\relax (x )} + \log {\relax (x )}^{2} + \log {\relax (x )} \log {\left (x + 1 \right )} - \log {\left (x - 4 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________