Optimal. Leaf size=22 \[ -10-e^x+x+x \log \left (-\frac {1}{(4+x) \log (x)}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.63, antiderivative size = 21, normalized size of antiderivative = 0.95, number of steps used = 15, number of rules used = 6, integrand size = 47, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.128, Rules used = {6742, 2194, 6688, 2298, 2549, 43} \begin {gather*} x-e^x+x \log \left (-\frac {1}{(x+4) \log (x)}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 2194
Rule 2298
Rule 2549
Rule 6688
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-e^x+\frac {-4-x+4 \log (x)+4 \log (x) \log \left (-\frac {1}{(4+x) \log (x)}\right )+x \log (x) \log \left (-\frac {1}{(4+x) \log (x)}\right )}{(4+x) \log (x)}\right ) \, dx\\ &=-\int e^x \, dx+\int \frac {-4-x+4 \log (x)+4 \log (x) \log \left (-\frac {1}{(4+x) \log (x)}\right )+x \log (x) \log \left (-\frac {1}{(4+x) \log (x)}\right )}{(4+x) \log (x)} \, dx\\ &=-e^x+\int \frac {-4-x+\log (x) \left (4+(4+x) \log \left (-\frac {1}{(4+x) \log (x)}\right )\right )}{(4+x) \log (x)} \, dx\\ &=-e^x+\int \left (\frac {-4-x+4 \log (x)}{(4+x) \log (x)}+\log \left (-\frac {1}{(4+x) \log (x)}\right )\right ) \, dx\\ &=-e^x+\int \frac {-4-x+4 \log (x)}{(4+x) \log (x)} \, dx+\int \log \left (-\frac {1}{(4+x) \log (x)}\right ) \, dx\\ &=-e^x+x \log \left (-\frac {1}{(4+x) \log (x)}\right )+\int \left (\frac {4}{4+x}-\frac {1}{\log (x)}\right ) \, dx-\int \frac {-4-x-x \log (x)}{(4+x) \log (x)} \, dx\\ &=-e^x+4 \log (4+x)+x \log \left (-\frac {1}{(4+x) \log (x)}\right )-\int \left (-\frac {x}{4+x}-\frac {1}{\log (x)}\right ) \, dx-\int \frac {1}{\log (x)} \, dx\\ &=-e^x+4 \log (4+x)+x \log \left (-\frac {1}{(4+x) \log (x)}\right )-\text {li}(x)+\int \frac {x}{4+x} \, dx+\int \frac {1}{\log (x)} \, dx\\ &=-e^x+4 \log (4+x)+x \log \left (-\frac {1}{(4+x) \log (x)}\right )+\int \left (1-\frac {4}{4+x}\right ) \, dx\\ &=-e^x+x+x \log \left (-\frac {1}{(4+x) \log (x)}\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.18, size = 21, normalized size = 0.95 \begin {gather*} -e^x+x+x \log \left (-\frac {1}{(4+x) \log (x)}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.70, size = 20, normalized size = 0.91 \begin {gather*} x \log \left (-\frac {1}{{\left (x + 4\right )} \log \relax (x)}\right ) + x - e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.39, size = 79, normalized size = 3.59 \begin {gather*} -\frac {1}{2} \, x \log \left (-\frac {1}{2} \, \pi ^{2} x^{2} \mathrm {sgn}\relax (x) + \frac {1}{2} \, \pi ^{2} x^{2} + x^{2} \log \left ({\left | x \right |}\right )^{2} - 4 \, \pi ^{2} x \mathrm {sgn}\relax (x) + 4 \, \pi ^{2} x + 8 \, x \log \left ({\left | x \right |}\right )^{2} - 8 \, \pi ^{2} \mathrm {sgn}\relax (x) + 8 \, \pi ^{2} + 16 \, \log \left ({\left | x \right |}\right )^{2}\right ) + x - e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.20, size = 22, normalized size = 1.00
method | result | size |
default | \(-{\mathrm e}^{x}+\ln \left (\frac {1}{\left (-x -4\right ) \ln \relax (x )}\right ) x +x\) | \(22\) |
risch | \(-x \ln \left (4+x \right )-x \ln \left (\ln \relax (x )\right )-i x \pi \mathrm {csgn}\left (\frac {i}{\ln \relax (x ) \left (4+x \right )}\right )^{2}-\frac {i x \pi \,\mathrm {csgn}\left (\frac {i}{\ln \relax (x )}\right ) \mathrm {csgn}\left (\frac {i}{4+x}\right ) \mathrm {csgn}\left (\frac {i}{\ln \relax (x ) \left (4+x \right )}\right )}{2}+\frac {i x \pi \,\mathrm {csgn}\left (\frac {i}{\ln \relax (x )}\right ) \mathrm {csgn}\left (\frac {i}{\ln \relax (x ) \left (4+x \right )}\right )^{2}}{2}+\frac {i x \pi \,\mathrm {csgn}\left (\frac {i}{4+x}\right ) \mathrm {csgn}\left (\frac {i}{\ln \relax (x ) \left (4+x \right )}\right )^{2}}{2}+\frac {i x \pi \mathrm {csgn}\left (\frac {i}{\ln \relax (x ) \left (4+x \right )}\right )^{3}}{2}+i \pi x +x -{\mathrm e}^{x}\) | \(157\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.57, size = 21, normalized size = 0.95 \begin {gather*} -x \log \left (-x - 4\right ) - x \log \left (\log \relax (x)\right ) + x - e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.28, size = 20, normalized size = 0.91 \begin {gather*} x-{\mathrm {e}}^x+x\,\ln \left (-\frac {1}{\ln \relax (x)\,\left (x+4\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.86, size = 37, normalized size = 1.68 \begin {gather*} x + \left (x + \frac {2}{3}\right ) \log {\left (- \frac {1}{\left (x + 4\right ) \log {\relax (x )}} \right )} - e^{x} + \frac {2 \log {\left (x + 4 \right )}}{3} + \frac {2 \log {\left (\log {\relax (x )} \right )}}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________