Optimal. Leaf size=16 \[ x \log \left (\frac {1}{-1-\frac {2 \log (2+x)}{x}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.58, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 3, integrand size = 66, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.045, Rules used = {6820, 6874,
2629} \begin {gather*} x \log \left (-\frac {x}{x+2 \log (x+2)}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2629
Rule 6820
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {2 x}{(2+x) (x+2 \log (2+x))}+\frac {2 \log (2+x)}{x+2 \log (2+x)}+\log \left (-\frac {x}{x+2 \log (2+x)}\right )\right ) \, dx\\ &=-\left (2 \int \frac {x}{(2+x) (x+2 \log (2+x))} \, dx\right )+2 \int \frac {\log (2+x)}{x+2 \log (2+x)} \, dx+\int \log \left (-\frac {x}{x+2 \log (2+x)}\right ) \, dx\\ &=x \log \left (-\frac {x}{x+2 \log (2+x)}\right )+2 \int \left (\frac {1}{2}-\frac {x}{2 (x+2 \log (2+x))}\right ) \, dx-2 \int \left (\frac {1}{x+2 \log (2+x)}-\frac {2}{(2+x) (x+2 \log (2+x))}\right ) \, dx-\int \frac {-2 x+2 (2+x) \log (2+x)}{(2+x) (x+2 \log (2+x))} \, dx\\ &=x+x \log \left (-\frac {x}{x+2 \log (2+x)}\right )-2 \int \frac {1}{x+2 \log (2+x)} \, dx+4 \int \frac {1}{(2+x) (x+2 \log (2+x))} \, dx-\int \frac {x}{x+2 \log (2+x)} \, dx-\int \left (1-\frac {x (4+x)}{(2+x) (x+2 \log (2+x))}\right ) \, dx\\ &=x \log \left (-\frac {x}{x+2 \log (2+x)}\right )-2 \int \frac {1}{x+2 \log (2+x)} \, dx+4 \int \frac {1}{(2+x) (x+2 \log (2+x))} \, dx-\int \frac {x}{x+2 \log (2+x)} \, dx+\int \frac {x (4+x)}{(2+x) (x+2 \log (2+x))} \, dx\\ &=x \log \left (-\frac {x}{x+2 \log (2+x)}\right )-2 \int \frac {1}{x+2 \log (2+x)} \, dx+4 \int \frac {1}{(2+x) (x+2 \log (2+x))} \, dx-\int \frac {x}{x+2 \log (2+x)} \, dx+\int \left (\frac {2}{x+2 \log (2+x)}+\frac {x}{x+2 \log (2+x)}-\frac {4}{(2+x) (x+2 \log (2+x))}\right ) \, dx\\ &=x \log \left (-\frac {x}{x+2 \log (2+x)}\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.22, size = 16, normalized size = 1.00 \begin {gather*} x \log \left (-\frac {x}{x+2 \log (2+x)}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 5.19, size = 17, normalized size = 1.06
method | result | size |
norman | \(\ln \left (-\frac {x}{2 \ln \left (2+x \right )+x}\right ) x\) | \(17\) |
risch | \(-x \ln \left (2 \ln \left (2+x \right )+x \right )+x \ln \left (x \right )-\frac {i \pi x \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (\frac {i}{2 \ln \left (2+x \right )+x}\right ) \mathrm {csgn}\left (\frac {i x}{2 \ln \left (2+x \right )+x}\right )}{2}+\frac {i \pi x \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (\frac {i x}{2 \ln \left (2+x \right )+x}\right )^{2}}{2}+\frac {i \pi x \,\mathrm {csgn}\left (\frac {i}{2 \ln \left (2+x \right )+x}\right ) \mathrm {csgn}\left (\frac {i x}{2 \ln \left (2+x \right )+x}\right )^{2}}{2}+\frac {i \pi x \mathrm {csgn}\left (\frac {i x}{2 \ln \left (2+x \right )+x}\right )^{3}}{2}-i \pi x \mathrm {csgn}\left (\frac {i x}{2 \ln \left (2+x \right )+x}\right )^{2}+i x \pi \) | \(169\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 19, normalized size = 1.19 \begin {gather*} x \log \left (x\right ) - x \log \left (-x - 2 \, \log \left (x + 2\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.48, size = 16, normalized size = 1.00 \begin {gather*} x \log \left (-\frac {x}{x + 2 \, \log \left (x + 2\right )}\right ) \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. 34 vs.
\(2 (15) = 30\).
time = 0.35, size = 34, normalized size = 2.12 \begin {gather*} \left (x + \frac {1}{3}\right ) \log {\left (- \frac {x}{x + 2 \log {\left (x + 2 \right )}} \right )} - \frac {\log {\left (x \right )}}{3} + \frac {\log {\left (\frac {x}{2} + \log {\left (x + 2 \right )} \right )}}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 19, normalized size = 1.19 \begin {gather*} x \log \left (-x\right ) - x \log \left (x + 2 \, \log \left (x + 2\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.18, size = 16, normalized size = 1.00 \begin {gather*} x\,\ln \left (-\frac {x}{x+2\,\ln \left (x+2\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________