Optimal. Leaf size=19 \[ 4 x^2 (1-x \log (x)-x \log (2+x)) \]
________________________________________________________________________________________
Rubi [A] time = 0.36, 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 = {6688, 12, 6742, 14, 772, 2304, 2395, 43} \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 43
Rule 772
Rule 2304
Rule 2395
Rule 6688
Rule 6742
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]
________________________________________________________________________________________
fricas [A] time = 0.65, size = 22, normalized size = 1.16 \begin {gather*} -4 \, x^{3} \log \left (x + 2\right ) - 4 \, x^{3} \log \relax (x) + 4 \, x^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 22, normalized size = 1.16 \begin {gather*} -4 \, x^{3} \log \left (x + 2\right ) - 4 \, x^{3} \log \relax (x) + 4 \, x^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.53, size = 23, normalized size = 1.21
method | result | size |
risch | \(-4 x^{3} \ln \relax (x )-4 \ln \left (2+x \right ) x^{3}+4 x^{2}\) | \(23\) |
default | \(-4 x^{3} \ln \relax (x )-4 \left (2+x \right )^{3} \ln \left (2+x \right )+4 x^{2}+\frac {176}{3}+24 \ln \left (2+x \right ) \left (2+x \right )^{2}-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.41, size = 30, normalized size = 1.58 \begin {gather*} -4 \, x^{3} \log \relax (x) + 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]
________________________________________________________________________________________
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 \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.59, size = 32, normalized size = 1.68 \begin {gather*} - 4 x^{3} \log {\relax (x )} + 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]
________________________________________________________________________________________