Optimal. Leaf size=24 \[ 3+\frac {x \log (5)}{(1+x)^2}-\log ^2\left (\frac {9 (2+x)}{x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in
optimal.
time = 0.23, antiderivative size = 60, normalized size of antiderivative = 2.50, number of steps
used = 17, number of rules used = 13, integrand size = 69, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {6820, 6874,
24, 34, 2516, 2504, 2439, 2438, 2512, 266, 2463, 2437, 2338} \begin {gather*} 2 \text {PolyLog}\left (2,-\frac {2}{x}\right )+2 \text {PolyLog}\left (2,-\frac {x}{2}\right )+\log ^2(x+2)-2 \log \left (\frac {18}{x}+9\right ) \log (x+2)+2 \log (9) \log (x)-2 \log (2) \log (x)+\frac {x \log (5)}{(x+1)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 24
Rule 34
Rule 266
Rule 2338
Rule 2437
Rule 2438
Rule 2439
Rule 2463
Rule 2504
Rule 2512
Rule 2516
Rule 6820
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {\frac {-x \log (5)-x^2 \log (5)+\log (25)}{(1+x)^3}+\frac {4 \log \left (\frac {9 (2+x)}{x}\right )}{x}}{2+x} \, dx\\ &=\int \left (\frac {-x \log (5)-x^2 \log (5)+\log (25)}{(1+x)^3 (2+x)}+\frac {4 \log \left (9+\frac {18}{x}\right )}{x (2+x)}\right ) \, dx\\ &=4 \int \frac {\log \left (9+\frac {18}{x}\right )}{x (2+x)} \, dx+\int \frac {-x \log (5)-x^2 \log (5)+\log (25)}{(1+x)^3 (2+x)} \, dx\\ &=4 \int \left (\frac {\log \left (9+\frac {18}{x}\right )}{2 x}-\frac {\log \left (9+\frac {18}{x}\right )}{2 (2+x)}\right ) \, dx+\int \frac {\log (5)-x \log (5)}{(1+x)^3} \, dx\\ &=\frac {x \log (5)}{(1+x)^2}+2 \int \frac {\log \left (9+\frac {18}{x}\right )}{x} \, dx-2 \int \frac {\log \left (9+\frac {18}{x}\right )}{2+x} \, dx\\ &=\frac {x \log (5)}{(1+x)^2}-2 \log \left (9+\frac {18}{x}\right ) \log (2+x)-2 \text {Subst}\left (\int \frac {\log (9+18 x)}{x} \, dx,x,\frac {1}{x}\right )-36 \int \frac {\log (2+x)}{\left (9+\frac {18}{x}\right ) x^2} \, dx\\ &=\frac {x \log (5)}{(1+x)^2}+2 \log (9) \log (x)-2 \log \left (9+\frac {18}{x}\right ) \log (2+x)-2 \text {Subst}\left (\int \frac {\log (1+2 x)}{x} \, dx,x,\frac {1}{x}\right )-36 \int \left (\frac {\log (2+x)}{18 x}-\frac {\log (2+x)}{18 (2+x)}\right ) \, dx\\ &=\frac {x \log (5)}{(1+x)^2}+2 \log (9) \log (x)-2 \log \left (9+\frac {18}{x}\right ) \log (2+x)+2 \text {Li}_2\left (-\frac {2}{x}\right )-2 \int \frac {\log (2+x)}{x} \, dx+2 \int \frac {\log (2+x)}{2+x} \, dx\\ &=\frac {x \log (5)}{(1+x)^2}-2 \log (2) \log (x)+2 \log (9) \log (x)-2 \log \left (9+\frac {18}{x}\right ) \log (2+x)+2 \text {Li}_2\left (-\frac {2}{x}\right )-2 \int \frac {\log \left (1+\frac {x}{2}\right )}{x} \, dx+2 \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,2+x\right )\\ &=\frac {x \log (5)}{(1+x)^2}-2 \log (2) \log (x)+2 \log (9) \log (x)-2 \log \left (9+\frac {18}{x}\right ) \log (2+x)+\log ^2(2+x)+2 \text {Li}_2\left (-\frac {2}{x}\right )+2 \text {Li}_2\left (-\frac {x}{2}\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 31, normalized size = 1.29 \begin {gather*} -\frac {\log (5)}{(1+x)^2}+\frac {\log (5)}{1+x}-\log ^2\left (\frac {9 (2+x)}{x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.28, size = 40, normalized size = 1.67
method | result | size |
risch | \(\frac {\ln \left (5\right )}{x +1}-\frac {\ln \left (5\right )}{\left (x +1\right )^{2}}-\ln \left (9+\frac {18}{x}\right )^{2}\) | \(31\) |
derivativedivides | \(-\frac {324 \ln \left (5\right )}{\left (\frac {18}{x}+18\right )^{2}}+\frac {18 \ln \left (5\right )}{\frac {18}{x}+18}-\ln \left (9+\frac {18}{x}\right )^{2}\) | \(40\) |
default | \(-\frac {324 \ln \left (5\right )}{\left (\frac {18}{x}+18\right )^{2}}+\frac {18 \ln \left (5\right )}{\frac {18}{x}+18}-\ln \left (9+\frac {18}{x}\right )^{2}\) | \(40\) |
norman | \(\frac {x \ln \left (5\right )-\ln \left (\frac {9 x +18}{x}\right )^{2}-2 x \ln \left (\frac {9 x +18}{x}\right )^{2}-x^{2} \ln \left (\frac {9 x +18}{x}\right )^{2}}{\left (x +1\right )^{2}}\) | \(58\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 99 vs.
\(2 (24) = 48\).
time = 0.65, size = 99, normalized size = 4.12 \begin {gather*} -\frac {{\left (x^{2} + 2 \, x + 1\right )} \log \left (x + 2\right )^{2} + {\left (x^{2} + 2 \, x + 1\right )} \log \left (x\right )^{2} - x \log \left (5\right ) + 2 \, {\left (2 \, x^{2} \log \left (3\right ) + 4 \, x \log \left (3\right ) - {\left (x^{2} + 2 \, x + 1\right )} \log \left (x\right ) + 2 \, \log \left (3\right )\right )} \log \left (x + 2\right ) - 4 \, {\left (x^{2} \log \left (3\right ) + 2 \, x \log \left (3\right ) + \log \left (3\right )\right )} \log \left (x\right )}{x^{2} + 2 \, x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 38, normalized size = 1.58 \begin {gather*} -\frac {{\left (x^{2} + 2 \, x + 1\right )} \log \left (\frac {9 \, {\left (x + 2\right )}}{x}\right )^{2} - x \log \left (5\right )}{x^{2} + 2 \, x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.10, size = 22, normalized size = 0.92 \begin {gather*} \frac {x \log {\left (5 \right )}}{x^{2} + 2 x + 1} - \log {\left (\frac {9 x + 18}{x} \right )}^{2} \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. 51 vs.
\(2 (24) = 48\).
time = 0.40, size = 51, normalized size = 2.12 \begin {gather*} -\log \left (\frac {9 \, {\left (x + 2\right )}}{x}\right )^{2} + \frac {2 \, {\left (\frac {{\left (x + 2\right )} \log \left (5\right )}{x} - \log \left (5\right )\right )}}{\frac {{\left (x + 2\right )}^{2}}{x^{2}} + \frac {2 \, {\left (x + 2\right )}}{x} + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.28, size = 24, normalized size = 1.00 \begin {gather*} \frac {x\,\ln \left (5\right )}{{\left (x+1\right )}^2}-{\ln \left (\frac {9\,x+18}{x}\right )}^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________