Optimal. Leaf size=25 \[ \frac {x^2}{2}-\frac {1}{x}-2 \log (1-x)+2 \log (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {1593, 1620} \[ \frac {x^2}{2}-\frac {1}{x}-2 \log (1-x)+2 \log (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1593
Rule 1620
Rubi steps
\begin {align*} \int \frac {-1-x-x^3+x^4}{-x^2+x^3} \, dx &=\int \frac {-1-x-x^3+x^4}{(-1+x) x^2} \, dx\\ &=\int \left (-\frac {2}{-1+x}+\frac {1}{x^2}+\frac {2}{x}+x\right ) \, dx\\ &=-\frac {1}{x}+\frac {x^2}{2}-2 \log (1-x)+2 \log (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 25, normalized size = 1.00 \[ \frac {x^2}{2}-\frac {1}{x}-2 \log (1-x)+2 \log (x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.87, size = 22, normalized size = 0.88 \[ \frac {x^{3} - 4 \, x \log \left (x - 1\right ) + 4 \, x \log \relax (x) - 2}{2 \, x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.27, size = 23, normalized size = 0.92 \[ \frac {1}{2} \, x^{2} - \frac {1}{x} - 2 \, \log \left ({\left | x - 1 \right |}\right ) + 2 \, \log \left ({\left | x \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 22, normalized size = 0.88 \[ \frac {x^{2}}{2}+2 \ln \relax (x )-2 \ln \left (x -1\right )-\frac {1}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.13, size = 21, normalized size = 0.84 \[ \frac {1}{2} \, x^{2} - \frac {1}{x} - 2 \, \log \left (x - 1\right ) + 2 \, \log \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.14, size = 19, normalized size = 0.76 \[ 4\,\mathrm {atanh}\left (2\,x-1\right )-\frac {1}{x}+\frac {x^2}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.10, size = 19, normalized size = 0.76 \[ \frac {x^{2}}{2} + 2 \log {\relax (x )} - 2 \log {\left (x - 1 \right )} - \frac {1}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________