Optimal. Leaf size=26 \[ \left (1+x+x \left (x+x^2\right )\right ) \left (-4+4 \log \left (\frac {4}{x (1+x)}\right )\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.20, antiderivative size = 131, normalized size of antiderivative = 5.04, number of steps used = 21, number of rules used = 9, integrand size = 44, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.204, Rules used = {14, 2513, 2356, 2295, 2304, 2417, 2389, 2395, 43} \begin {gather*} -4 x^3-4 x^3 \log (x)-4 x^3 \log (x+1)+4 x^3 \left (\log (x)+\log \left (\frac {4}{x (x+1)}\right )+\log (x+1)\right )-4 x^2-4 x^2 \log (x)-4 x^2 \log (x+1)+4 x^2 \left (\log (x)+\log \left (\frac {4}{x (x+1)}\right )+\log (x+1)\right )-4 x-4 x \log (x)+4 x \left (\log (x)+\log \left (\frac {4}{x (x+1)}\right )+\log (x+1)\right )-4 \log (x)-4 (x+1) \log (x+1) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 43
Rule 2295
Rule 2304
Rule 2356
Rule 2389
Rule 2395
Rule 2417
Rule 2513
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {4 \left (1+3 x+3 x^2+5 x^3\right )}{x}+4 \left (1+2 x+3 x^2\right ) \log \left (\frac {4}{x (1+x)}\right )\right ) \, dx\\ &=-\left (4 \int \frac {1+3 x+3 x^2+5 x^3}{x} \, dx\right )+4 \int \left (1+2 x+3 x^2\right ) \log \left (\frac {4}{x (1+x)}\right ) \, dx\\ &=-\left (4 \int \left (3+\frac {1}{x}+3 x+5 x^2\right ) \, dx\right )-4 \int \left (1+2 x+3 x^2\right ) \log (x) \, dx-4 \int \left (1+2 x+3 x^2\right ) \log (1+x) \, dx-\left (4 \left (-\log (x)-\log \left (\frac {4}{x (1+x)}\right )-\log (1+x)\right )\right ) \int \left (1+2 x+3 x^2\right ) \, dx\\ &=-12 x-6 x^2-\frac {20 x^3}{3}-4 \log (x)+4 x \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^2 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^3 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )-4 \int \left (\log (x)+2 x \log (x)+3 x^2 \log (x)\right ) \, dx-4 \int \left (\log (1+x)+2 x \log (1+x)+3 x^2 \log (1+x)\right ) \, dx\\ &=-12 x-6 x^2-\frac {20 x^3}{3}-4 \log (x)+4 x \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^2 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^3 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )-4 \int \log (x) \, dx-4 \int \log (1+x) \, dx-8 \int x \log (x) \, dx-8 \int x \log (1+x) \, dx-12 \int x^2 \log (x) \, dx-12 \int x^2 \log (1+x) \, dx\\ &=-8 x-4 x^2-\frac {16 x^3}{3}-4 \log (x)-4 x \log (x)-4 x^2 \log (x)-4 x^3 \log (x)-4 x^2 \log (1+x)-4 x^3 \log (1+x)+4 x \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^2 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^3 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 \int \frac {x^2}{1+x} \, dx+4 \int \frac {x^3}{1+x} \, dx-4 \operatorname {Subst}(\int \log (x) \, dx,x,1+x)\\ &=-4 x-4 x^2-\frac {16 x^3}{3}-4 \log (x)-4 x \log (x)-4 x^2 \log (x)-4 x^3 \log (x)-4 x^2 \log (1+x)-4 x^3 \log (1+x)-4 (1+x) \log (1+x)+4 x \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^2 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^3 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 \int \left (1+\frac {1}{-1-x}-x+x^2\right ) \, dx+4 \int \left (-1+x+\frac {1}{1+x}\right ) \, dx\\ &=-4 x-4 x^2-4 x^3-4 \log (x)-4 x \log (x)-4 x^2 \log (x)-4 x^3 \log (x)-4 x^2 \log (1+x)-4 x^3 \log (1+x)-4 (1+x) \log (1+x)+4 x \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^2 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^3 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 32, normalized size = 1.23 \begin {gather*} -4 \log (x)-4 \log (1+x)+4 x \left (1+x+x^2\right ) \left (-1+\log \left (\frac {4}{x+x^2}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.58, size = 35, normalized size = 1.35 \begin {gather*} -4 \, x^{3} - 4 \, x^{2} + 4 \, {\left (x^{3} + x^{2} + x + 1\right )} \log \left (\frac {4}{x^{2} + x}\right ) - 4 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 44, normalized size = 1.69 \begin {gather*} -4 \, x^{3} - 4 \, x^{2} + 4 \, {\left (x^{3} + x^{2} + x\right )} \log \left (\frac {4}{x^{2} + x}\right ) - 4 \, x - 4 \, \log \left (x + 1\right ) - 4 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.07, size = 48, normalized size = 1.85
method | result | size |
risch | \(\left (4 x^{3}+4 x^{2}+4 x \right ) \ln \left (\frac {4}{x^{2}+x}\right )-4 x^{3}-4 x^{2}-4 x -4 \ln \left (x^{2}+x \right )\) | \(48\) |
norman | \(-4 x -4 x^{2}-4 x^{3}+4 x \ln \left (\frac {4}{x^{2}+x}\right )+4 x^{2} \ln \left (\frac {4}{x^{2}+x}\right )+4 x^{3} \ln \left (\frac {4}{x^{2}+x}\right )+4 \ln \left (\frac {4}{x^{2}+x}\right )\) | \(70\) |
default | \(4 x^{2} \ln \left (\frac {1}{x \left (x +1\right )}\right )-4 x^{2}+4 x^{3} \ln \left (\frac {1}{x \left (x +1\right )}\right )-4 x^{3}+4 x \ln \left (\frac {1}{x \left (x +1\right )}\right )-4 x -4 \ln \left (x +1\right )+8 x^{3} \ln \relax (2)+8 x^{2} \ln \relax (2)+8 x \ln \relax (2)-4 \ln \relax (x )\) | \(87\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.35, size = 67, normalized size = 2.58 \begin {gather*} 4 \, x^{3} \log \left (\frac {4}{x^{2} + x}\right ) - 4 \, x^{3} + 4 \, x^{2} \log \left (\frac {4}{x^{2} + x}\right ) - 4 \, x^{2} + 4 \, x \log \left (\frac {4}{x^{2} + x}\right ) - 4 \, x - 4 \, \log \left (x + 1\right ) - 4 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.77, size = 63, normalized size = 2.42 \begin {gather*} 4\,\ln \left (\frac {1}{x^2+x}\right )+x\,\left (4\,\ln \left (\frac {4}{x^2+x}\right )-4\right )+x^2\,\left (4\,\ln \left (\frac {4}{x^2+x}\right )-4\right )+x^3\,\left (4\,\ln \left (\frac {4}{x^2+x}\right )-4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.21, size = 42, normalized size = 1.62 \begin {gather*} - 4 x^{3} - 4 x^{2} - 4 x + \left (4 x^{3} + 4 x^{2} + 4 x\right ) \log {\left (\frac {4}{x^{2} + x} \right )} - 4 \log {\left (x^{2} + x \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________