Optimal. Leaf size=22 \[ -10-e^x+x+x \log \left (-\frac {1}{(4+x) \log (x)}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.68, 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 = {6874, 2225,
6820, 2335, 2629, 45} \begin {gather*} x-e^x+x \log \left (-\frac {1}{(x+4) \log (x)}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 2225
Rule 2335
Rule 2629
Rule 6820
Rule 6874
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.10, 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]
________________________________________________________________________________________
Maple [A]
time = 1.08, size = 22, normalized size = 1.00
method | result | size |
default | \(-{\mathrm e}^{x}+\ln \left (\frac {1}{\left (-x -4\right ) \ln \left (x \right )}\right ) x +x\) | \(22\) |
risch | \(-x \ln \left (4+x \right )-x \ln \left (\ln \left (x \right )\right )-\frac {i x \pi \,\mathrm {csgn}\left (\frac {i}{4+x}\right ) \mathrm {csgn}\left (\frac {i}{\ln \left (x \right )}\right ) \mathrm {csgn}\left (\frac {i}{\ln \left (x \right ) \left (4+x \right )}\right )}{2}+\frac {i x \pi \,\mathrm {csgn}\left (\frac {i}{4+x}\right ) \mathrm {csgn}\left (\frac {i}{\ln \left (x \right ) \left (4+x \right )}\right )^{2}}{2}+\frac {i x \pi \,\mathrm {csgn}\left (\frac {i}{\ln \left (x \right )}\right ) \mathrm {csgn}\left (\frac {i}{\ln \left (x \right ) \left (4+x \right )}\right )^{2}}{2}+\frac {i x \pi \mathrm {csgn}\left (\frac {i}{\ln \left (x \right ) \left (4+x \right )}\right )^{3}}{2}-i x \pi \mathrm {csgn}\left (\frac {i}{\ln \left (x \right ) \left (4+x \right )}\right )^{2}+i x \pi +x -{\mathrm e}^{x}\) | \(157\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.33, size = 21, normalized size = 0.95 \begin {gather*} -x \log \left (-x - 4\right ) - x \log \left (\log \left (x\right )\right ) + x - e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 20, normalized size = 0.91 \begin {gather*} x \log \left (-\frac {1}{{\left (x + 4\right )} \log \left (x\right )}\right ) + x - e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.43, size = 37, normalized size = 1.68 \begin {gather*} x + \left (x + \frac {2}{3}\right ) \log {\left (- \frac {1}{\left (x + 4\right ) \log {\left (x \right )}} \right )} - e^{x} + \frac {2 \log {\left (x + 4 \right )}}{3} + \frac {2 \log {\left (\log {\left (x \right )} \right )}}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 79 vs.
\(2 (21) = 42\).
time = 0.43, size = 79, normalized size = 3.59 \begin {gather*} -\frac {1}{2} \, x \log \left (-\frac {1}{2} \, \pi ^{2} x^{2} \mathrm {sgn}\left (x\right ) + \frac {1}{2} \, \pi ^{2} x^{2} + x^{2} \log \left ({\left | x \right |}\right )^{2} - 4 \, \pi ^{2} x \mathrm {sgn}\left (x\right ) + 4 \, \pi ^{2} x + 8 \, x \log \left ({\left | x \right |}\right )^{2} - 8 \, \pi ^{2} \mathrm {sgn}\left (x\right ) + 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]
________________________________________________________________________________________
Mupad [B]
time = 3.28, size = 20, normalized size = 0.91 \begin {gather*} x-{\mathrm {e}}^x+x\,\ln \left (-\frac {1}{\ln \left (x\right )\,\left (x+4\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________