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 ) \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(131\) vs. \(2(26)=52\).
time = 0.15, 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, 2593,
2403, 2332, 2341, 2464, 2436, 2442, 45} \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 45
Rule 2332
Rule 2341
Rule 2403
Rule 2436
Rule 2442
Rule 2464
Rule 2593
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 \text {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.03, 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]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(86\) vs.
\(2(26)=52\).
time = 0.04, size = 87, normalized size = 3.35
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 \left (2\right )+8 x^{2} \ln \left (2\right )+8 x \ln \left (2\right )-4 \ln \left (x \right )\) | \(87\) |
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. 67 vs.
\(2 (25) = 50\).
time = 0.28, 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 \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, 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]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 42 vs.
\(2 (20) = 40\).
time = 0.08, 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]
________________________________________________________________________________________
Giac [A]
time = 0.41, 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 \left (x\right ) \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]
________________________________________________________________________________________