Optimal. Leaf size=27 \[ \frac {2 \left (2-x \left (-1+x-\left (6+\frac {\log (x)}{x}\right )^4\right )\right )}{2+x} \]
________________________________________________________________________________________
Rubi [B] time = 1.43, antiderivative size = 140, normalized size of antiderivative = 5.19, number of steps used = 72, number of rules used = 19, integrand size = 101, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {1594, 27, 6742, 44, 43, 2357, 2304, 2301, 2314, 31, 2317, 2391, 2305, 2302, 30, 2318, 2374, 6589, 2383} \begin {gather*} \frac {\log ^4(x)}{x^3}-\frac {\log ^4(x)}{2 x^2}+\frac {24 \log ^3(x)}{x^2}-2 x-\frac {5192}{x+2}+\frac {\log ^4(x)}{4 x}+\frac {x \log ^4(x)}{8 (x+2)}-\frac {\log ^4(x)}{8}-\frac {12 \log ^3(x)}{x}-\frac {6 x \log ^3(x)}{x+2}+6 \log ^3(x)+\frac {216 \log ^2(x)}{x}+\frac {108 x \log ^2(x)}{x+2}-108 \log ^2(x)-\frac {864 x \log (x)}{x+2}+864 \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 30
Rule 31
Rule 43
Rule 44
Rule 1594
Rule 2301
Rule 2302
Rule 2304
Rule 2305
Rule 2314
Rule 2317
Rule 2318
Rule 2357
Rule 2374
Rule 2383
Rule 2391
Rule 6589
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {3456 x^3+6912 x^4-8 x^5-2 x^6+\left (1728 x^2+864 x^3-1728 x^4\right ) \log (x)+\left (288 x-720 x^2-864 x^3\right ) \log ^2(x)+\left (16-184 x-144 x^2\right ) \log ^3(x)+(-12-8 x) \log ^4(x)}{x^4 \left (4+4 x+x^2\right )} \, dx\\ &=\int \frac {3456 x^3+6912 x^4-8 x^5-2 x^6+\left (1728 x^2+864 x^3-1728 x^4\right ) \log (x)+\left (288 x-720 x^2-864 x^3\right ) \log ^2(x)+\left (16-184 x-144 x^2\right ) \log ^3(x)+(-12-8 x) \log ^4(x)}{x^4 (2+x)^2} \, dx\\ &=\int \left (\frac {6912}{(2+x)^2}+\frac {3456}{x (2+x)^2}-\frac {8 x}{(2+x)^2}-\frac {2 x^2}{(2+x)^2}-\frac {864 \left (-2-x+2 x^2\right ) \log (x)}{x^2 (2+x)^2}-\frac {144 \left (-2+5 x+6 x^2\right ) \log ^2(x)}{x^3 (2+x)^2}-\frac {8 \left (-2+23 x+18 x^2\right ) \log ^3(x)}{x^4 (2+x)^2}-\frac {4 (3+2 x) \log ^4(x)}{x^4 (2+x)^2}\right ) \, dx\\ &=-\frac {6912}{2+x}-2 \int \frac {x^2}{(2+x)^2} \, dx-4 \int \frac {(3+2 x) \log ^4(x)}{x^4 (2+x)^2} \, dx-8 \int \frac {x}{(2+x)^2} \, dx-8 \int \frac {\left (-2+23 x+18 x^2\right ) \log ^3(x)}{x^4 (2+x)^2} \, dx-144 \int \frac {\left (-2+5 x+6 x^2\right ) \log ^2(x)}{x^3 (2+x)^2} \, dx-864 \int \frac {\left (-2-x+2 x^2\right ) \log (x)}{x^2 (2+x)^2} \, dx+3456 \int \frac {1}{x (2+x)^2} \, dx\\ &=-\frac {6912}{2+x}-2 \int \left (1+\frac {4}{(2+x)^2}-\frac {4}{2+x}\right ) \, dx-4 \int \left (\frac {3 \log ^4(x)}{4 x^4}-\frac {\log ^4(x)}{4 x^3}+\frac {\log ^4(x)}{16 x^2}-\frac {\log ^4(x)}{16 (2+x)^2}\right ) \, dx-8 \int \left (-\frac {2}{(2+x)^2}+\frac {1}{2+x}\right ) \, dx-8 \int \left (-\frac {\log ^3(x)}{2 x^4}+\frac {25 \log ^3(x)}{4 x^3}-\frac {13 \log ^3(x)}{8 x^2}+\frac {\log ^3(x)}{16 x}+\frac {3 \log ^3(x)}{2 (2+x)^2}-\frac {\log ^3(x)}{16 (2+x)}\right ) \, dx-144 \int \left (-\frac {\log ^2(x)}{2 x^3}+\frac {7 \log ^2(x)}{4 x^2}-\frac {\log ^2(x)}{8 x}-\frac {3 \log ^2(x)}{2 (2+x)^2}+\frac {\log ^2(x)}{8 (2+x)}\right ) \, dx-864 \int \left (-\frac {\log (x)}{2 x^2}+\frac {\log (x)}{4 x}+\frac {2 \log (x)}{(2+x)^2}-\frac {\log (x)}{4 (2+x)}\right ) \, dx+3456 \int \left (\frac {1}{4 x}-\frac {1}{2 (2+x)^2}-\frac {1}{4 (2+x)}\right ) \, dx\\ &=-2 x-\frac {5192}{2+x}+864 \log (x)-864 \log (2+x)-\frac {1}{4} \int \frac {\log ^4(x)}{x^2} \, dx+\frac {1}{4} \int \frac {\log ^4(x)}{(2+x)^2} \, dx-\frac {1}{2} \int \frac {\log ^3(x)}{x} \, dx+\frac {1}{2} \int \frac {\log ^3(x)}{2+x} \, dx-3 \int \frac {\log ^4(x)}{x^4} \, dx+4 \int \frac {\log ^3(x)}{x^4} \, dx-12 \int \frac {\log ^3(x)}{(2+x)^2} \, dx+13 \int \frac {\log ^3(x)}{x^2} \, dx+18 \int \frac {\log ^2(x)}{x} \, dx-18 \int \frac {\log ^2(x)}{2+x} \, dx-50 \int \frac {\log ^3(x)}{x^3} \, dx+72 \int \frac {\log ^2(x)}{x^3} \, dx-216 \int \frac {\log (x)}{x} \, dx+216 \int \frac {\log (x)}{2+x} \, dx+216 \int \frac {\log ^2(x)}{(2+x)^2} \, dx-252 \int \frac {\log ^2(x)}{x^2} \, dx+432 \int \frac {\log (x)}{x^2} \, dx-1728 \int \frac {\log (x)}{(2+x)^2} \, dx+\int \frac {\log ^4(x)}{x^3} \, dx\\ &=-\frac {432}{x}-2 x-\frac {5192}{2+x}+864 \log (x)-\frac {432 \log (x)}{x}-\frac {864 x \log (x)}{2+x}+216 \log \left (1+\frac {x}{2}\right ) \log (x)-108 \log ^2(x)-\frac {36 \log ^2(x)}{x^2}+\frac {252 \log ^2(x)}{x}+\frac {108 x \log ^2(x)}{2+x}-18 \log \left (1+\frac {x}{2}\right ) \log ^2(x)-\frac {4 \log ^3(x)}{3 x^3}+\frac {25 \log ^3(x)}{x^2}-\frac {13 \log ^3(x)}{x}-\frac {6 x \log ^3(x)}{2+x}+\frac {1}{2} \log \left (1+\frac {x}{2}\right ) \log ^3(x)+\frac {\log ^4(x)}{x^3}-\frac {\log ^4(x)}{2 x^2}+\frac {\log ^4(x)}{4 x}+\frac {x \log ^4(x)}{8 (2+x)}-864 \log (2+x)-\frac {1}{2} \int \frac {\log ^3(x)}{2+x} \, dx-\frac {1}{2} \operatorname {Subst}\left (\int x^3 \, dx,x,\log (x)\right )-\frac {3}{2} \int \frac {\log \left (1+\frac {x}{2}\right ) \log ^2(x)}{x} \, dx+2 \int \frac {\log ^3(x)}{x^3} \, dx+4 \int \frac {\log ^2(x)}{x^4} \, dx-4 \int \frac {\log ^3(x)}{x^4} \, dx+18 \int \frac {\log ^2(x)}{2+x} \, dx+18 \operatorname {Subst}\left (\int x^2 \, dx,x,\log (x)\right )+36 \int \frac {\log \left (1+\frac {x}{2}\right ) \log (x)}{x} \, dx+39 \int \frac {\log ^2(x)}{x^2} \, dx+72 \int \frac {\log (x)}{x^3} \, dx-75 \int \frac {\log ^2(x)}{x^3} \, dx-216 \int \frac {\log \left (1+\frac {x}{2}\right )}{x} \, dx-216 \int \frac {\log (x)}{2+x} \, dx-504 \int \frac {\log (x)}{x^2} \, dx+864 \int \frac {1}{2+x} \, dx-\int \frac {\log ^3(x)}{x^2} \, dx\\ &=-\frac {18}{x^2}+\frac {72}{x}-2 x-\frac {5192}{2+x}+864 \log (x)-\frac {36 \log (x)}{x^2}+\frac {72 \log (x)}{x}-\frac {864 x \log (x)}{2+x}-108 \log ^2(x)-\frac {4 \log ^2(x)}{3 x^3}+\frac {3 \log ^2(x)}{2 x^2}+\frac {213 \log ^2(x)}{x}+\frac {108 x \log ^2(x)}{2+x}+6 \log ^3(x)+\frac {24 \log ^3(x)}{x^2}-\frac {12 \log ^3(x)}{x}-\frac {6 x \log ^3(x)}{2+x}-\frac {\log ^4(x)}{8}+\frac {\log ^4(x)}{x^3}-\frac {\log ^4(x)}{2 x^2}+\frac {\log ^4(x)}{4 x}+\frac {x \log ^4(x)}{8 (2+x)}+216 \text {Li}_2\left (-\frac {x}{2}\right )-36 \log (x) \text {Li}_2\left (-\frac {x}{2}\right )+\frac {3}{2} \log ^2(x) \text {Li}_2\left (-\frac {x}{2}\right )+\frac {3}{2} \int \frac {\log \left (1+\frac {x}{2}\right ) \log ^2(x)}{x} \, dx+\frac {8}{3} \int \frac {\log (x)}{x^4} \, dx+3 \int \frac {\log ^2(x)}{x^3} \, dx-3 \int \frac {\log ^2(x)}{x^2} \, dx-3 \int \frac {\log (x) \text {Li}_2\left (-\frac {x}{2}\right )}{x} \, dx-4 \int \frac {\log ^2(x)}{x^4} \, dx-36 \int \frac {\log \left (1+\frac {x}{2}\right ) \log (x)}{x} \, dx+36 \int \frac {\text {Li}_2\left (-\frac {x}{2}\right )}{x} \, dx-75 \int \frac {\log (x)}{x^3} \, dx+78 \int \frac {\log (x)}{x^2} \, dx+216 \int \frac {\log \left (1+\frac {x}{2}\right )}{x} \, dx\\ &=-\frac {8}{27 x^3}+\frac {3}{4 x^2}-\frac {6}{x}-2 x-\frac {5192}{2+x}+864 \log (x)-\frac {8 \log (x)}{9 x^3}+\frac {3 \log (x)}{2 x^2}-\frac {6 \log (x)}{x}-\frac {864 x \log (x)}{2+x}-108 \log ^2(x)+\frac {216 \log ^2(x)}{x}+\frac {108 x \log ^2(x)}{2+x}+6 \log ^3(x)+\frac {24 \log ^3(x)}{x^2}-\frac {12 \log ^3(x)}{x}-\frac {6 x \log ^3(x)}{2+x}-\frac {\log ^4(x)}{8}+\frac {\log ^4(x)}{x^3}-\frac {\log ^4(x)}{2 x^2}+\frac {\log ^4(x)}{4 x}+\frac {x \log ^4(x)}{8 (2+x)}+36 \text {Li}_3\left (-\frac {x}{2}\right )-3 \log (x) \text {Li}_3\left (-\frac {x}{2}\right )-\frac {8}{3} \int \frac {\log (x)}{x^4} \, dx+3 \int \frac {\log (x)}{x^3} \, dx+3 \int \frac {\log (x) \text {Li}_2\left (-\frac {x}{2}\right )}{x} \, dx+3 \int \frac {\text {Li}_3\left (-\frac {x}{2}\right )}{x} \, dx-6 \int \frac {\log (x)}{x^2} \, dx-36 \int \frac {\text {Li}_2\left (-\frac {x}{2}\right )}{x} \, dx\\ &=-2 x-\frac {5192}{2+x}+864 \log (x)-\frac {864 x \log (x)}{2+x}-108 \log ^2(x)+\frac {216 \log ^2(x)}{x}+\frac {108 x \log ^2(x)}{2+x}+6 \log ^3(x)+\frac {24 \log ^3(x)}{x^2}-\frac {12 \log ^3(x)}{x}-\frac {6 x \log ^3(x)}{2+x}-\frac {\log ^4(x)}{8}+\frac {\log ^4(x)}{x^3}-\frac {\log ^4(x)}{2 x^2}+\frac {\log ^4(x)}{4 x}+\frac {x \log ^4(x)}{8 (2+x)}+3 \text {Li}_4\left (-\frac {x}{2}\right )-3 \int \frac {\text {Li}_3\left (-\frac {x}{2}\right )}{x} \, dx\\ &=-2 x-\frac {5192}{2+x}+864 \log (x)-\frac {864 x \log (x)}{2+x}-108 \log ^2(x)+\frac {216 \log ^2(x)}{x}+\frac {108 x \log ^2(x)}{2+x}+6 \log ^3(x)+\frac {24 \log ^3(x)}{x^2}-\frac {12 \log ^3(x)}{x}-\frac {6 x \log ^3(x)}{2+x}-\frac {\log ^4(x)}{8}+\frac {\log ^4(x)}{x^3}-\frac {\log ^4(x)}{2 x^2}+\frac {\log ^4(x)}{4 x}+\frac {x \log ^4(x)}{8 (2+x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 51, normalized size = 1.89 \begin {gather*} \frac {2 \left (-x^3 \left (2596+2 x+x^2\right )+864 x^3 \log (x)+216 x^2 \log ^2(x)+24 x \log ^3(x)+\log ^4(x)\right )}{x^3 (2+x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.60, size = 56, normalized size = 2.07 \begin {gather*} -\frac {2 \, {\left (x^{5} + 2 \, x^{4} - 864 \, x^{3} \log \relax (x) - 216 \, x^{2} \log \relax (x)^{2} - 24 \, x \log \relax (x)^{3} - \log \relax (x)^{4} + 2596 \, x^{3}\right )}}{x^{4} + 2 \, x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.17, size = 82, normalized size = 3.04 \begin {gather*} -\frac {1}{4} \, {\left (\frac {1}{x + 2} - \frac {x^{2} - 2 \, x + 4}{x^{3}}\right )} \log \relax (x)^{4} + 12 \, {\left (\frac {1}{x + 2} - \frac {x - 2}{x^{2}}\right )} \log \relax (x)^{3} - 216 \, {\left (\frac {1}{x + 2} - \frac {1}{x}\right )} \log \relax (x)^{2} - 2 \, x + \frac {1728 \, \log \relax (x)}{x + 2} - \frac {5192}{x + 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.06, size = 68, normalized size = 2.52
method | result | size |
risch | \(\frac {2 \ln \relax (x )^{4}}{x^{3} \left (2+x \right )}+\frac {48 \ln \relax (x )^{3}}{x^{2} \left (2+x \right )}+\frac {432 \ln \relax (x )^{2}}{x \left (2+x \right )}+\frac {1728 \ln \relax (x )}{2+x}-\frac {2 \left (x^{2}+2 x +2596\right )}{2+x}\) | \(68\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.39, size = 52, normalized size = 1.93 \begin {gather*} -2 \, x + \frac {2 \, {\left (864 \, x^{3} \log \relax (x) + 216 \, x^{2} \log \relax (x)^{2} + 24 \, x \log \relax (x)^{3} + \log \relax (x)^{4}\right )}}{x^{4} + 2 \, x^{3}} - \frac {5192}{x + 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.92, size = 48, normalized size = 1.78 \begin {gather*} \frac {2\,\left (-x^5+1296\,x^4+864\,x^3\,\ln \relax (x)+216\,x^2\,{\ln \relax (x)}^2+24\,x\,{\ln \relax (x)}^3+{\ln \relax (x)}^4\right )}{x^3\,\left (x+2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.30, size = 60, normalized size = 2.22 \begin {gather*} - 2 x + \frac {2 \log {\relax (x )}^{4}}{x^{4} + 2 x^{3}} + \frac {48 \log {\relax (x )}^{3}}{x^{3} + 2 x^{2}} + \frac {432 \log {\relax (x )}^{2}}{x^{2} + 2 x} + \frac {1728 \log {\relax (x )}}{x + 2} - \frac {5192}{x + 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________