Optimal. Leaf size=25 \[ -\frac {1}{x}+\frac {x^2}{2}-2 \log (1-x)+2 \log (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, 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 = {1607, 1634}
\begin {gather*} \frac {x^2}{2}-\frac {1}{x}-2 \log (1-x)+2 \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 1607
Rule 1634
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.00, size = 25, normalized size = 1.00 \begin {gather*} -\frac {1}{x}+\frac {x^2}{2}-2 \log (1-x)+2 \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.23, size = 22, normalized size = 0.88
method | result | size |
default | \(\frac {x^{2}}{2}-2 \ln \left (-1+x \right )-\frac {1}{x}+2 \ln \left (x \right )\) | \(22\) |
risch | \(\frac {x^{2}}{2}-2 \ln \left (-1+x \right )-\frac {1}{x}+2 \ln \left (x \right )\) | \(22\) |
norman | \(\frac {-1+\frac {x^{3}}{2}}{x}+2 \ln \left (x \right )-2 \ln \left (-1+x \right )\) | \(23\) |
meijerg | \(2 \ln \left (x \right )+2 i \pi -\frac {1}{x}+\frac {x \left (3 x +6\right )}{6}-x -2 \ln \left (1-x \right )\) | \(34\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 21, normalized size = 0.84 \begin {gather*} \frac {1}{2} \, x^{2} - \frac {1}{x} - 2 \, \log \left (x - 1\right ) + 2 \, \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 22, normalized size = 0.88 \begin {gather*} \frac {x^{3} - 4 \, x \log \left (x - 1\right ) + 4 \, x \log \left (x\right ) - 2}{2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.03, size = 19, normalized size = 0.76 \begin {gather*} \frac {x^{2}}{2} + 2 \log {\left (x \right )} - 2 \log {\left (x - 1 \right )} - \frac {1}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.34, size = 23, normalized size = 0.92 \begin {gather*} \frac {1}{2} \, x^{2} - \frac {1}{x} - 2 \, \log \left ({\left | x - 1 \right |}\right ) + 2 \, \log \left ({\left | x \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.14, size = 19, normalized size = 0.76 \begin {gather*} 4\,\mathrm {atanh}\left (2\,x-1\right )-\frac {1}{x}+\frac {x^2}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________