Optimal. Leaf size=27 \[ \frac {2}{x}-x-x \left (-7-x+\log \left (4 \left (-x+x^2\right )\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.27, antiderivative size = 39, normalized size of antiderivative = 1.44, number of steps used = 8, number of rules used = 6, integrand size = 52, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {1593, 6742, 1620, 2487, 29, 8} \begin {gather*} x^2+6 x+\frac {2}{x}-\log (1-x)-\log (x)+(1-x) \log (-4 (1-x) x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 29
Rule 1593
Rule 1620
Rule 2487
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {2-2 x-5 x^2+2 x^3+2 x^4+\left (x^2-x^3\right ) \log \left (-4 x+4 x^2\right )}{(-1+x) x^2} \, dx\\ &=\int \left (\frac {2-2 x-5 x^2+2 x^3+2 x^4}{(-1+x) x^2}-\log (4 (-1+x) x)\right ) \, dx\\ &=\int \frac {2-2 x-5 x^2+2 x^3+2 x^4}{(-1+x) x^2} \, dx-\int \log (4 (-1+x) x) \, dx\\ &=(1-x) \log (-4 (1-x) x)+2 \int 1 \, dx-\int \frac {1}{x} \, dx+\int \left (4+\frac {1}{1-x}-\frac {2}{x^2}+2 x\right ) \, dx\\ &=\frac {2}{x}+6 x+x^2-\log (1-x)-\log (x)+(1-x) \log (-4 (1-x) x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 22, normalized size = 0.81 \begin {gather*} \frac {2}{x}+6 x+x^2-x \log (4 (-1+x) x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.02, size = 29, normalized size = 1.07 \begin {gather*} \frac {x^{3} - x^{2} \log \left (4 \, x^{2} - 4 \, x\right ) + 6 \, x^{2} + 2}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.66, size = 25, normalized size = 0.93 \begin {gather*} x^{2} - x \log \left (4 \, x^{2} - 4 \, x\right ) + 6 \, x + \frac {2}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.21, size = 29, normalized size = 1.07
method | result | size |
default | \(x^{2}+6 x +\frac {2}{x}-2 x \ln \relax (2)-x \ln \left (x^{2}-x \right )\) | \(29\) |
risch | \(-x \ln \left (4 x^{2}-4 x \right )+\frac {x^{3}+6 x^{2}+2}{x}\) | \(29\) |
norman | \(\frac {2+x^{3}+6 x^{2}-x^{2} \ln \left (4 x^{2}-4 x \right )}{x}\) | \(30\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.59, size = 39, normalized size = 1.44 \begin {gather*} x^{2} - 2 \, x {\left (\log \relax (2) - 1\right )} - {\left (x - 1\right )} \log \left (x - 1\right ) - x \log \relax (x) + 4 \, x + \frac {2}{x} - \log \left (x - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.74, size = 25, normalized size = 0.93 \begin {gather*} 6\,x-x\,\ln \left (4\,x^2-4\,x\right )+\frac {2}{x}+x^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.15, size = 20, normalized size = 0.74 \begin {gather*} x^{2} - x \log {\left (4 x^{2} - 4 x \right )} + 6 x + \frac {2}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________