Optimal. Leaf size=22 \[ -1+(2+x) \left (-5+x \left (1+\log \left (\frac {x}{6-6 x}\right )\right )\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 36, normalized size of antiderivative = 1.64, number of steps
used = 7, number of rules used = 4, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {6874, 712,
2547, 84} \begin {gather*} x^2-3 x+\log (1-x)-\log (x)+(x+1)^2 \log \left (\frac {x}{6 (1-x)}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 84
Rule 712
Rule 2547
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {1-6 x+2 x^2}{-1+x}+2 (1+x) \log \left (\frac {x}{6-6 x}\right )\right ) \, dx\\ &=2 \int (1+x) \log \left (\frac {x}{6-6 x}\right ) \, dx+\int \frac {1-6 x+2 x^2}{-1+x} \, dx\\ &=(1+x)^2 \log \left (\frac {x}{6 (1-x)}\right )-6 \int \frac {(1+x)^2}{(6-6 x) x} \, dx+\int \left (-4-\frac {3}{-1+x}+2 x\right ) \, dx\\ &=-4 x+x^2-3 \log (1-x)+(1+x)^2 \log \left (\frac {x}{6 (1-x)}\right )-6 \int \left (-\frac {1}{6}-\frac {2}{3 (-1+x)}+\frac {1}{6 x}\right ) \, dx\\ &=-3 x+x^2+\log (1-x)-\log (x)+(1+x)^2 \log \left (\frac {x}{6 (1-x)}\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 19, normalized size = 0.86 \begin {gather*} x \left (-3+x+(2+x) \log \left (\frac {x}{6-6 x}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(69\) vs.
\(2(22)=44\).
time = 0.33, size = 70, normalized size = 3.18
method | result | size |
risch | \(\left (x^{2}+2 x \right ) \ln \left (-\frac {x}{6 x -6}\right )+x^{2}-3 x\) | \(27\) |
norman | \(x^{2}+x^{2} \ln \left (-\frac {x}{6 x -6}\right )-3 x +2 x \ln \left (-\frac {x}{6 x -6}\right )\) | \(37\) |
derivativedivides | \(-x +1+\left (x -1\right )^{2}-24 \ln \left (-\frac {1}{6}-\frac {1}{6 \left (x -1\right )}\right ) \left (-\frac {1}{6}-\frac {1}{6 \left (x -1\right )}\right ) \left (x -1\right )-12 \ln \left (-\frac {1}{6}-\frac {1}{6 \left (x -1\right )}\right ) \left (-\frac {1}{6}-\frac {1}{6 \left (x -1\right )}\right ) \left (-\frac {1}{2 \left (x -1\right )}+\frac {1}{2}\right ) \left (x -1\right )^{2}\) | \(70\) |
default | \(-x +1+\left (x -1\right )^{2}-24 \ln \left (-\frac {1}{6}-\frac {1}{6 \left (x -1\right )}\right ) \left (-\frac {1}{6}-\frac {1}{6 \left (x -1\right )}\right ) \left (x -1\right )-12 \ln \left (-\frac {1}{6}-\frac {1}{6 \left (x -1\right )}\right ) \left (-\frac {1}{6}-\frac {1}{6 \left (x -1\right )}\right ) \left (-\frac {1}{2 \left (x -1\right )}+\frac {1}{2}\right ) \left (x -1\right )^{2}\) | \(70\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 62 vs.
\(2 (21) = 42\).
time = 0.51, size = 62, normalized size = 2.82 \begin {gather*} -x^{2} {\left (\log \left (3\right ) + \log \left (2\right )\right )} + x^{2} - x {\left (2 \, \log \left (3\right ) + 2 \, \log \left (2\right ) - 1\right )} + {\left (x^{2} + 2 \, x\right )} \log \left (x\right ) - {\left (x^{2} + 2 \, x - 3\right )} \log \left (-x + 1\right ) - 4 \, x - 3 \, \log \left (x - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 24, normalized size = 1.09 \begin {gather*} x^{2} + {\left (x^{2} + 2 \, x\right )} \log \left (-\frac {x}{6 \, {\left (x - 1\right )}}\right ) - 3 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.05, size = 22, normalized size = 1.00 \begin {gather*} x^{2} - 3 x + \left (x^{2} + 2 x\right ) \log {\left (- \frac {x}{6 x - 6} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 87 vs.
\(2 (21) = 42\).
time = 0.40, size = 87, normalized size = 3.95 \begin {gather*} -\frac {{\left (\frac {4 \, x}{x - 1} - 3\right )} \log \left (-\frac {x}{6 \, {\left (x - 1\right )}}\right )}{\frac {2 \, x}{x - 1} - \frac {x^{2}}{{\left (x - 1\right )}^{2}} - 1} + \frac {\frac {x}{x - 1} - 2}{\frac {2 \, x}{x - 1} - \frac {x^{2}}{{\left (x - 1\right )}^{2}} - 1} + 3 \, \log \left (-\frac {x}{6 \, {\left (x - 1\right )}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.20, size = 35, normalized size = 1.59 \begin {gather*} x\,\left (2\,\ln \left (-\frac {x}{6\,x-6}\right )-3\right )+x^2\,\left (\ln \left (-\frac {x}{6\,x-6}\right )+1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________