Optimal. Leaf size=24 \[ 6+x^2+x \left (-x (2+x+\log (1-x))+\log ^2(x)\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 28, normalized size of antiderivative = 1.17, number of steps used = 10, number of rules used = 6, integrand size = 47, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.128, Rules used = {6688, 772, 2395, 43, 2295, 2296} \begin {gather*} -x^3-x^2-x^2 \log (1-x)+x \log ^2(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 772
Rule 2295
Rule 2296
Rule 2395
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {x \left (2-3 x^2\right )}{-1+x}-2 x \log (1-x)+2 \log (x)+\log ^2(x)\right ) \, dx\\ &=-(2 \int x \log (1-x) \, dx)+2 \int \log (x) \, dx+\int \frac {x \left (2-3 x^2\right )}{-1+x} \, dx+\int \log ^2(x) \, dx\\ &=-2 x-x^2 \log (1-x)+2 x \log (x)+x \log ^2(x)-2 \int \log (x) \, dx-\int \frac {x^2}{1-x} \, dx+\int \left (-1+\frac {1}{1-x}-3 x-3 x^2\right ) \, dx\\ &=-x-\frac {3 x^2}{2}-x^3-\log (1-x)-x^2 \log (1-x)+x \log ^2(x)-\int \left (-1+\frac {1}{1-x}-x\right ) \, dx\\ &=-x^2-x^3-x^2 \log (1-x)+x \log ^2(x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 39, normalized size = 1.62 \begin {gather*} \frac {7}{2}-x^2-x^3-\left (-1+x^2\right ) \log (1-x)-\log (-1+x)+x \log ^2(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.80, size = 28, normalized size = 1.17 \begin {gather*} -x^{3} + x \log \relax (x)^{2} - x^{2} \log \left (-x + 1\right ) - x^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.23, size = 28, normalized size = 1.17 \begin {gather*} -x^{3} + x \log \relax (x)^{2} - x^{2} \log \left (-x + 1\right ) - x^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.43, size = 29, normalized size = 1.21
method | result | size |
risch | \(-x^{3}-x^{2} \ln \left (1-x \right )+x \ln \relax (x )^{2}-x^{2}\) | \(29\) |
default | \(x \ln \relax (x )^{2}-\ln \left (1-x \right ) \left (1-x \right )^{2}-x^{2}-\frac {3}{2}+2 \left (1-x \right ) \ln \left (1-x \right )-x^{3}-\ln \left (x -1\right )\) | \(53\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.58, size = 52, normalized size = 2.17 \begin {gather*} -x^{3} + x \log \relax (x)^{2} - x^{2} - {\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 ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.94, size = 25, normalized size = 1.04 \begin {gather*} x\,{\ln \relax (x)}^2-x^2\,\left (\ln \left (1-x\right )+1\right )-x^3 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.48, size = 31, normalized size = 1.29 \begin {gather*} - x^{3} - x^{2} + x \log {\relax (x )}^{2} + \left (\frac {1}{3} - x^{2}\right ) \log {\left (1 - x \right )} - \frac {\log {\left (x - 1 \right )}}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________