Optimal. Leaf size=30 \[ \frac {2}{1-x}+x+\frac {x^2}{2}+\log (1-x)-\log (1+x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, 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 = {2099}
\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 2099
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.01, size = 29, normalized size = 0.97 \begin {gather*} -\frac {2}{-1+x}+\frac {1}{2} (1+x)^2+\log (1-x)-\log (1+x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 25, normalized size = 0.83
method | result | size |
default | \(x +\frac {x^{2}}{2}+\ln \left (-1+x \right )-\frac {2}{-1+x}-\ln \left (1+x \right )\) | \(25\) |
risch | \(x +\frac {x^{2}}{2}+\ln \left (-1+x \right )-\frac {2}{-1+x}-\ln \left (1+x \right )\) | \(25\) |
norman | \(\frac {\frac {1}{2} x^{2}+\frac {1}{2} x^{3}-3}{-1+x}-\ln \left (1+x \right )+\ln \left (-1+x \right )\) | \(30\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 1.30, 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]
________________________________________________________________________________________
Fricas [A]
time = 0.42, 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]
________________________________________________________________________________________
Sympy [A]
time = 0.03, 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]
________________________________________________________________________________________
Giac [A]
time = 0.48, 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]
________________________________________________________________________________________
Mupad [B]
time = 0.05, 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]
________________________________________________________________________________________