Optimal. Leaf size=19 \[ 4 x^2 (1-x \log (x)-x \log (2+x)) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.38, antiderivative size = 22, normalized size of antiderivative = 1.16, number of steps
used = 13, number of rules used = 8, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.178, Rules used = {6820, 12,
6874, 14, 786, 2341, 2442, 45} \begin {gather*} -4 x^3 \log (x)-4 x^3 \log (x+2)+4 x^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 45
Rule 786
Rule 2341
Rule 2442
Rule 6820
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {4 x \left (-2 \left (-2+x^2\right )-3 x (2+x) \log (x)-3 x (2+x) \log (2+x)\right )}{2+x} \, dx\\ &=4 \int \frac {x \left (-2 \left (-2+x^2\right )-3 x (2+x) \log (x)-3 x (2+x) \log (2+x)\right )}{2+x} \, dx\\ &=4 \int \left (-\frac {x \left (-4+2 x^2+6 x \log (x)+3 x^2 \log (x)\right )}{2+x}-3 x^2 \log (2+x)\right ) \, dx\\ &=-\left (4 \int \frac {x \left (-4+2 x^2+6 x \log (x)+3 x^2 \log (x)\right )}{2+x} \, dx\right )-12 \int x^2 \log (2+x) \, dx\\ &=-4 x^3 \log (2+x)+4 \int \frac {x^3}{2+x} \, dx-4 \int x \left (\frac {2 \left (-2+x^2\right )}{2+x}+3 x \log (x)\right ) \, dx\\ &=-4 x^3 \log (2+x)+4 \int \left (4-2 x+x^2-\frac {8}{2+x}\right ) \, dx-4 \int \left (\frac {2 x \left (-2+x^2\right )}{2+x}+3 x^2 \log (x)\right ) \, dx\\ &=16 x-4 x^2+\frac {4 x^3}{3}-32 \log (2+x)-4 x^3 \log (2+x)-8 \int \frac {x \left (-2+x^2\right )}{2+x} \, dx-12 \int x^2 \log (x) \, dx\\ &=16 x-4 x^2+\frac {8 x^3}{3}-4 x^3 \log (x)-32 \log (2+x)-4 x^3 \log (2+x)-8 \int \left (2-2 x+x^2-\frac {4}{2+x}\right ) \, dx\\ &=4 x^2-4 x^3 \log (x)-4 x^3 \log (2+x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 22, normalized size = 1.16 \begin {gather*} -4 \left (-x^2+x^3 \log (x)+x^3 \log (2+x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(51\) vs.
\(2(19)=38\).
time = 1.18, size = 52, normalized size = 2.74
method | result | size |
risch | \(-4 x^{3} \ln \left (x \right )-4 \ln \left (2+x \right ) x^{3}+4 x^{2}\) | \(23\) |
default | \(-4 x^{3} \ln \left (x \right )-4 \left (2+x \right )^{3} \ln \left (2+x \right )+4 x^{2}+\frac {176}{3}+24 \left (2+x \right )^{2} \ln \left (2+x \right )-48 \left (2+x \right ) \ln \left (2+x \right )+32 \ln \left (2+x \right )\) | \(52\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 30, normalized size = 1.58 \begin {gather*} -4 \, x^{3} \log \left (x\right ) + 4 \, x^{2} - 4 \, {\left (x^{3} + 8\right )} \log \left (x + 2\right ) + 32 \, \log \left (x + 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 22, normalized size = 1.16 \begin {gather*} -4 \, x^{3} \log \left (x + 2\right ) - 4 \, x^{3} \log \left (x\right ) + 4 \, x^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.23, size = 32, normalized size = 1.68 \begin {gather*} - 4 x^{3} \log {\left (x \right )} + 4 x^{2} + \left (- 4 x^{3} - 8\right ) \log {\left (x + 2 \right )} + 8 \log {\left (x + 2 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 22, normalized size = 1.16 \begin {gather*} -4 \, x^{3} \log \left (x + 2\right ) - 4 \, x^{3} \log \left (x\right ) + 4 \, x^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 7.70, size = 22, normalized size = 1.16 \begin {gather*} 4\,x^2-4\,x^3\,\ln \left (x+2\right )-4\,x^3\,\ln \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________