Optimal. Leaf size=17 \[ 3+\left (4+x^2\right ) (\log (-1-x)+\log (x)) \]
________________________________________________________________________________________
Rubi [A] time = 0.46, antiderivative size = 27, normalized size of antiderivative = 1.59, number of steps used = 11, number of rules used = 6, integrand size = 53, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.113, Rules used = {1593, 6742, 1620, 2395, 43, 2304} \begin {gather*} x^2 \log (-x-1)+x^2 \log (x)+4 \log (x)+4 \log (x+1) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 1593
Rule 1620
Rule 2304
Rule 2395
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {4+8 x+x^2+2 x^3+\left (2 x^2+2 x^3\right ) \log (-1-x)+\left (2 x^2+2 x^3\right ) \log (x)}{x (1+x)} \, dx\\ &=\int \left (\frac {4+8 x+x^2+2 x^3+2 x^2 \log (-1-x)+2 x^3 \log (-1-x)}{x (1+x)}+2 x \log (x)\right ) \, dx\\ &=2 \int x \log (x) \, dx+\int \frac {4+8 x+x^2+2 x^3+2 x^2 \log (-1-x)+2 x^3 \log (-1-x)}{x (1+x)} \, dx\\ &=-\frac {x^2}{2}+x^2 \log (x)+\int \left (\frac {4+8 x+x^2+2 x^3}{x (1+x)}+2 x \log (-1-x)\right ) \, dx\\ &=-\frac {x^2}{2}+x^2 \log (x)+2 \int x \log (-1-x) \, dx+\int \frac {4+8 x+x^2+2 x^3}{x (1+x)} \, dx\\ &=-\frac {x^2}{2}+x^2 \log (-1-x)+x^2 \log (x)+\int \frac {x^2}{-1-x} \, dx+\int \left (-1+\frac {4}{x}+2 x+\frac {5}{1+x}\right ) \, dx\\ &=-x+\frac {x^2}{2}+x^2 \log (-1-x)+4 \log (x)+x^2 \log (x)+5 \log (1+x)+\int \left (1+\frac {1}{-1-x}-x\right ) \, dx\\ &=x^2 \log (-1-x)+4 \log (x)+x^2 \log (x)+4 \log (1+x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 27, normalized size = 1.59 \begin {gather*} x^2 \log (-1-x)+4 \log (x)+x^2 \log (x)+4 \log (1+x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.55, size = 21, normalized size = 1.24 \begin {gather*} {\left (x^{2} + 4\right )} \log \relax (x) + {\left (x^{2} + 4\right )} \log \left (-x - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.64, size = 27, normalized size = 1.59 \begin {gather*} x^{2} \log \relax (x) + x^{2} \log \left (-x - 1\right ) + 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.21, size = 26, normalized size = 1.53
method | result | size |
risch | \(x^{2} \ln \left (-x -1\right )+x^{2} \ln \relax (x )+4 \ln \left (x^{2}+x \right )\) | \(26\) |
default | \(5 \ln \left (x +1\right )+4 \ln \relax (x )+x^{2} \ln \relax (x )+\left (-x -1\right )^{2} \ln \left (-x -1\right )+\frac {3}{2}+2 \left (-x -1\right ) \ln \left (-x -1\right )\) | \(46\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.53, size = 53, normalized size = 3.12 \begin {gather*} x^{2} \log \relax (x) + {\left (x^{2} - 2 \, x + 2 \, \log \left (x + 1\right )\right )} \log \left (-x - 1\right ) + 2 \, {\left (x - \log \left (x + 1\right )\right )} \log \left (-x - 1\right ) + 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 = 1.10, size = 25, normalized size = 1.47 \begin {gather*} 4\,\ln \left (x\,\left (x+1\right )\right )+x^2\,\ln \relax (x)+x^2\,\ln \left (-x-1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.51, size = 32, normalized size = 1.88 \begin {gather*} x^{2} \log {\relax (x )} + \left (x^{2} - \frac {1}{3}\right ) \log {\left (- x - 1 \right )} + 4 \log {\relax (x )} + \frac {13 \log {\left (x + 1 \right )}}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________