Optimal. Leaf size=30 \[ \frac {x^2}{2}+x+\frac {2}{1-x}+\log (1-x)-\log (x+1) \]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.034, Rules used = {2074} \begin {gather*} \frac {x^2}{2}+x+\frac {2}{1-x}+\log (1-x)-\log (x+1) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2074
Rubi steps
\begin {align*} \int \frac {1+4 x-2 x^2+x^4}{1-x-x^2+x^3} \, dx &=\int \left (1+\frac {1}{-1-x}+\frac {2}{(-1+x)^2}+\frac {1}{-1+x}+x\right ) \, dx\\ &=\frac {2}{1-x}+x+\frac {x^2}{2}+\log (1-x)-\log (1+x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 29, normalized size = 0.97 \begin {gather*} \frac {1}{2} (x+1)^2-\frac {2}{x-1}+\log (1-x)-\log (x+1) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1+4 x-2 x^2+x^4}{1-x-x^2+x^3} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.14, size = 36, normalized size = 1.20 \begin {gather*} \frac {x^{3} + x^{2} - 2 \, {\left (x - 1\right )} \log \left (x + 1\right ) + 2 \, {\left (x - 1\right )} \log \left (x - 1\right ) - 2 \, x - 4}{2 \, {\left (x - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.28, size = 26, normalized size = 0.87 \begin {gather*} \frac {1}{2} \, x^{2} + x - \frac {2}{x - 1} - \log \left ({\left | x + 1 \right |}\right ) + \log \left ({\left | x - 1 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 25, normalized size = 0.83 \begin {gather*} \frac {x^{2}}{2}+x +\ln \left (x -1\right )-\ln \left (x +1\right )-\frac {2}{x -1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.21, size = 24, normalized size = 0.80 \begin {gather*} \frac {1}{2} \, x^{2} + x - \frac {2}{x - 1} - \log \left (x + 1\right ) + \log \left (x - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.11, size = 22, normalized size = 0.73 \begin {gather*} x-\frac {2}{x-1}+\frac {x^2}{2}+\mathrm {atan}\left (x\,1{}\mathrm {i}\right )\,2{}\mathrm {i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.10, size = 20, normalized size = 0.67 \begin {gather*} \frac {x^{2}}{2} + x + \log {\left (x - 1 \right )} - \log {\left (x + 1 \right )} - \frac {2}{x - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________