Optimal. Leaf size=20 \[ -\log ^2\left (x+x^2\right )+\log \left (4 e^x x \log (x)\right ) \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(47\) vs. \(2(20)=40\).
time = 0.31, antiderivative size = 47, normalized size of antiderivative = 2.35, number of steps
used = 19, number of rules used = 11, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.275, Rules used = {1607, 6874,
45, 2339, 29, 2594, 2580, 2338, 2354, 2438, 2437} \begin {gather*} x+\log ^2(x)+\log ^2(x+1)+2 \log (x+1) \log (x)-2 \log (x (x+1)) \log (x)+\log (x)-2 \log (x+1) \log (x (x+1))+\log (\log (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 45
Rule 1607
Rule 2338
Rule 2339
Rule 2354
Rule 2437
Rule 2438
Rule 2580
Rule 2594
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {1+x+\left (1+2 x+x^2\right ) \log (x)+(-2-4 x) \log (x) \log \left (x+x^2\right )}{x (1+x) \log (x)} \, dx\\ &=\int \left (\frac {1+\log (x)+x \log (x)}{x \log (x)}-\frac {2 (1+2 x) \log (x (1+x))}{x (1+x)}\right ) \, dx\\ &=-\left (2 \int \frac {(1+2 x) \log (x (1+x))}{x (1+x)} \, dx\right )+\int \frac {1+\log (x)+x \log (x)}{x \log (x)} \, dx\\ &=-\left (2 \int \left (\frac {\log (x (1+x))}{x}+\frac {\log (x (1+x))}{1+x}\right ) \, dx\right )+\int \left (\frac {1+x}{x}+\frac {1}{x \log (x)}\right ) \, dx\\ &=-\left (2 \int \frac {\log (x (1+x))}{x} \, dx\right )-2 \int \frac {\log (x (1+x))}{1+x} \, dx+\int \frac {1+x}{x} \, dx+\int \frac {1}{x \log (x)} \, dx\\ &=-2 \log (x) \log (x (1+x))-2 \log (1+x) \log (x (1+x))+2 \int \frac {\log (x)}{x} \, dx+2 \int \frac {\log (x)}{1+x} \, dx+2 \int \frac {\log (1+x)}{x} \, dx+2 \int \frac {\log (1+x)}{1+x} \, dx+\int \left (1+\frac {1}{x}\right ) \, dx+\text {Subst}\left (\int \frac {1}{x} \, dx,x,\log (x)\right )\\ &=x+\log (x)+\log ^2(x)+2 \log (x) \log (1+x)-2 \log (x) \log (x (1+x))-2 \log (1+x) \log (x (1+x))+\log (\log (x))-2 \text {Li}_2(-x)-2 \int \frac {\log (1+x)}{x} \, dx+2 \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,1+x\right )\\ &=x+\log (x)+\log ^2(x)+2 \log (x) \log (1+x)+\log ^2(1+x)-2 \log (x) \log (x (1+x))-2 \log (1+x) \log (x (1+x))+\log (\log (x))\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 17, normalized size = 0.85 \begin {gather*} x+\log (x)-\log ^2(x (1+x))+\log (\log (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(47\) vs.
\(2(19)=38\).
time = 0.18, size = 48, normalized size = 2.40
method | result | size |
norman | \(x +\ln \left (x^{2}+x \right )-\ln \left (x^{2}+x \right )^{2}-\ln \left (x +1\right )+\ln \left (\ln \left (x \right )\right )\) | \(28\) |
default | \(\ln \left (\ln \left (x \right )\right )+x +\ln \left (x \right )-2 \ln \left (x \right ) \ln \left (x^{2}+x \right )+\ln \left (x \right )^{2}+2 \ln \left (x \right ) \ln \left (x +1\right )-2 \ln \left (x +1\right ) \ln \left (x^{2}+x \right )+\ln \left (x +1\right )^{2}\) | \(48\) |
risch | \(\ln \left (\ln \left (x \right )\right )+x +i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i \left (x +1\right )\right ) \mathrm {csgn}\left (i x \left (x +1\right )\right ) \ln \left (x \right )-i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x \left (x +1\right )\right )^{2} \ln \left (x \right )-i \pi \,\mathrm {csgn}\left (i \left (x +1\right )\right ) \mathrm {csgn}\left (i x \left (x +1\right )\right )^{2} \ln \left (x \right )+i \pi \mathrm {csgn}\left (i x \left (x +1\right )\right )^{3} \ln \left (x \right )+\ln \left (x \right )+i \pi \ln \left (x +1\right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i \left (x +1\right )\right ) \mathrm {csgn}\left (i x \left (x +1\right )\right )-i \pi \ln \left (x +1\right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x \left (x +1\right )\right )^{2}-i \pi \ln \left (x +1\right ) \mathrm {csgn}\left (i \left (x +1\right )\right ) \mathrm {csgn}\left (i x \left (x +1\right )\right )^{2}+i \pi \ln \left (x +1\right ) \mathrm {csgn}\left (i x \left (x +1\right )\right )^{3}-\ln \left (x \right )^{2}-2 \ln \left (x \right ) \ln \left (x +1\right )-\ln \left (x +1\right )^{2}\) | \(210\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.34, size = 29, normalized size = 1.45 \begin {gather*} -\log \left (x + 1\right )^{2} - 2 \, \log \left (x + 1\right ) \log \left (x\right ) - \log \left (x\right )^{2} + x + \log \left (x\right ) + \log \left (\log \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.31, size = 17, normalized size = 0.85 \begin {gather*} -\log \left (x^{2} + x\right )^{2} + x + \log \left (x\right ) + \log \left (\log \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.12, size = 17, normalized size = 0.85 \begin {gather*} x + \log {\left (x \right )} - \log {\left (x^{2} + x \right )}^{2} + \log {\left (\log {\left (x \right )} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 32, normalized size = 1.60 \begin {gather*} -2 \, {\left (\log \left (x + 1\right ) + \log \left (x\right )\right )} \log \left (x + 1\right ) + \log \left (x + 1\right )^{2} - \log \left (x\right )^{2} + x + \log \left (x\right ) + \log \left (\log \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.66, size = 17, normalized size = 0.85 \begin {gather*} -{\ln \left (x^2+x\right )}^2+x+\ln \left (\ln \left (x\right )\right )+\ln \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________