Optimal. Leaf size=24 \[ 6+x^2+x \left (-x (2+x+\log (1-x))+\log ^2(x)\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, 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 = {6820, 786,
2442, 45, 2332, 2333} \begin {gather*} -x^3-x^2-x^2 \log (1-x)+x \log ^2(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 786
Rule 2332
Rule 2333
Rule 2442
Rule 6820
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.02, 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]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(52\) vs.
\(2(24)=48\).
time = 0.34, size = 53, normalized size = 2.21
method | result | size |
risch | \(-x^{3}-x^{2} \ln \left (1-x \right )+x \ln \left (x \right )^{2}-x^{2}\) | \(29\) |
default | \(x \ln \left (x \right )^{2}+2 \left (1-x \right ) \ln \left (1-x \right )-\frac {3}{2}-\left (1-x \right )^{2} \ln \left (1-x \right )-x^{2}-x^{3}-\ln \left (x -1\right )\) | \(53\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 52, normalized size = 2.17 \begin {gather*} -x^{3} + x \log \left (x\right )^{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]
________________________________________________________________________________________
Fricas [A]
time = 0.45, size = 28, normalized size = 1.17 \begin {gather*} -x^{3} + x \log \left (x\right )^{2} - x^{2} \log \left (-x + 1\right ) - x^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.23, size = 31, normalized size = 1.29 \begin {gather*} - x^{3} - x^{2} + x \log {\left (x \right )}^{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]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 28, normalized size = 1.17 \begin {gather*} -x^{3} + x \log \left (x\right )^{2} - x^{2} \log \left (-x + 1\right ) - x^{2} \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 \left (x\right )}^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]
________________________________________________________________________________________