Optimal. Leaf size=28 \[ x^2 \left (2-\frac {\log (x)}{5 (2+x)}+\log \left (\frac {4 (-2+2 x)}{x}\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.27, antiderivative size = 37, normalized size of antiderivative = 1.32, number of steps used = 19, number of rules used = 10, integrand size = 76, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.132, Rules used = {6742, 77, 88, 2455, 193, 43, 2357, 2295, 2314, 31} \begin {gather*} 2 x^2+x^2 \log \left (8-\frac {8}{x}\right )+\frac {2 x \log (x)}{5 (x+2)}-\frac {1}{5} x \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 43
Rule 77
Rule 88
Rule 193
Rule 2295
Rule 2314
Rule 2357
Rule 2455
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {58 x}{5 (-1+x) (2+x)^2}+\frac {19 x^2}{5 (-1+x) (2+x)^2}+\frac {64 x^3}{5 (-1+x) (2+x)^2}+\frac {4 x^4}{(-1+x) (2+x)^2}+2 x \log \left (8-\frac {8}{x}\right )-\frac {x (4+x) \log (x)}{5 (2+x)^2}\right ) \, dx\\ &=-\left (\frac {1}{5} \int \frac {x (4+x) \log (x)}{(2+x)^2} \, dx\right )+2 \int x \log \left (8-\frac {8}{x}\right ) \, dx+\frac {19}{5} \int \frac {x^2}{(-1+x) (2+x)^2} \, dx+4 \int \frac {x^4}{(-1+x) (2+x)^2} \, dx-\frac {58}{5} \int \frac {x}{(-1+x) (2+x)^2} \, dx+\frac {64}{5} \int \frac {x^3}{(-1+x) (2+x)^2} \, dx\\ &=x^2 \log \left (8-\frac {8}{x}\right )-\frac {1}{5} \int \left (\log (x)-\frac {4 \log (x)}{(2+x)^2}\right ) \, dx+\frac {19}{5} \int \left (\frac {1}{9 (-1+x)}-\frac {4}{3 (2+x)^2}+\frac {8}{9 (2+x)}\right ) \, dx+4 \int \left (-3+\frac {1}{9 (-1+x)}+x-\frac {16}{3 (2+x)^2}+\frac {80}{9 (2+x)}\right ) \, dx-8 \int \frac {1}{8-\frac {8}{x}} \, dx-\frac {58}{5} \int \left (\frac {1}{9 (-1+x)}+\frac {2}{3 (2+x)^2}-\frac {1}{9 (2+x)}\right ) \, dx+\frac {64}{5} \int \left (1+\frac {1}{9 (-1+x)}+\frac {8}{3 (2+x)^2}-\frac {28}{9 (2+x)}\right ) \, dx\\ &=\frac {4 x}{5}+2 x^2+x^2 \log \left (8-\frac {8}{x}\right )+\log (1-x)+\frac {2}{5} \log (2+x)-\frac {1}{5} \int \log (x) \, dx+\frac {4}{5} \int \frac {\log (x)}{(2+x)^2} \, dx-8 \int \frac {x}{-8+8 x} \, dx\\ &=x+2 x^2+x^2 \log \left (8-\frac {8}{x}\right )+\log (1-x)-\frac {1}{5} x \log (x)+\frac {2 x \log (x)}{5 (2+x)}+\frac {2}{5} \log (2+x)-\frac {2}{5} \int \frac {1}{2+x} \, dx-8 \int \left (\frac {1}{8}+\frac {1}{8 (-1+x)}\right ) \, dx\\ &=2 x^2+x^2 \log \left (8-\frac {8}{x}\right )-\frac {1}{5} x \log (x)+\frac {2 x \log (x)}{5 (2+x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 28, normalized size = 1.00 \begin {gather*} \frac {1}{5} x^2 \left (10+5 \log \left (8-\frac {8}{x}\right )-\frac {\log (x)}{2+x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 45, normalized size = 1.61 \begin {gather*} \frac {10 \, x^{3} - x^{2} \log \relax (x) + 20 \, x^{2} + 5 \, {\left (x^{3} + 2 \, x^{2}\right )} \log \left (\frac {8 \, {\left (x - 1\right )}}{x}\right )}{5 \, {\left (x + 2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 38, normalized size = 1.36 \begin {gather*} x^{2} \log \left (8 \, x - 8\right ) + 2 \, x^{2} - \frac {1}{5} \, {\left (5 \, x^{2} + x + \frac {4}{x + 2}\right )} \log \relax (x) + \frac {2}{5} \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.10, size = 66, normalized size = 2.36
method | result | size |
default | \(2 x^{2}+\ln \left (x -1\right )+3 x^{2} \ln \relax (2)+\ln \left (-\frac {1}{x}\right )-\ln \left (1-\frac {1}{x}\right ) \left (1-\frac {1}{x}\right ) \left (-\frac {1}{x}-1\right ) x^{2}-\frac {x \ln \relax (x )}{5}+\frac {2 \ln \relax (x ) x}{5 \left (2+x \right )}\) | \(66\) |
risch | \(x^{2} \ln \left (x -1\right )+\frac {-22 x^{2} \ln \relax (x )+20 x^{3}+40 x^{2}-10 x^{3} \ln \relax (x )+60 x^{2} \ln \relax (2)+30 x^{3} \ln \relax (2)+5 i \pi \,x^{3} \mathrm {csgn}\left (i \left (x -1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right )^{2}+5 i \pi \,x^{3} \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right )^{2}-10 i \pi \,x^{2} \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (x -1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right )-5 i \pi \,x^{3} \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (x -1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right )-5 i \pi \,x^{3} \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right )^{3}-10 i \pi \,x^{2} \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right )^{3}+10 i \pi \,x^{2} \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right )^{2}+10 i \pi \,x^{2} \mathrm {csgn}\left (i \left (x -1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right )^{2}}{10 x +20}\) | \(260\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.72, size = 80, normalized size = 2.86 \begin {gather*} \frac {45 \, x^{3} {\left (3 \, \log \relax (2) + 2\right )} + 90 \, x^{2} {\left (3 \, \log \relax (2) + 2\right )} + {\left (45 \, x^{3} + 90 \, x^{2} + 58 \, x + 116\right )} \log \left (x - 1\right ) - 9 \, {\left (5 \, x^{3} + 11 \, x^{2}\right )} \log \relax (x) - 348}{45 \, {\left (x + 2\right )}} + \frac {116}{15 \, {\left (x + 2\right )}} - \frac {58}{45} \, \log \left (x - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.36, size = 34, normalized size = 1.21 \begin {gather*} x^2\,\ln \left (\frac {8\,x-8}{x}\right )+2\,x^2-\frac {x^2\,\ln \relax (x)}{5\,\left (x+2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.65, size = 51, normalized size = 1.82 \begin {gather*} 2 x^{2} + \left (x^{2} - \frac {1}{6}\right ) \log {\left (\frac {8 x - 8}{x} \right )} + \frac {7 \log {\relax (x )}}{30} + \frac {\log {\left (x - 1 \right )}}{6} + \frac {\left (- x^{2} - 2 x - 4\right ) \log {\relax (x )}}{5 x + 10} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________