Optimal. Leaf size=38 \[ -\frac {3}{2 (1-x)^2}+\frac {2}{1-x}+\frac {1}{1+x}+\log (1-x)-2 \log (1+x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 44, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.023, Rules used = {2099}
\begin {gather*} \frac {2}{1-x}+\frac {1}{x+1}-\frac {3}{2 (1-x)^2}+\log (1-x)-2 \log (x+1) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2099
Rubi steps
\begin {align*} \int \frac {5-3 x+6 x^2+5 x^3-x^4}{-1+x+2 x^2-2 x^3-x^4+x^5} \, dx &=\int \left (\frac {3}{(-1+x)^3}+\frac {2}{(-1+x)^2}+\frac {1}{-1+x}-\frac {1}{(1+x)^2}-\frac {2}{1+x}\right ) \, dx\\ &=-\frac {3}{2 (1-x)^2}+\frac {2}{1-x}+\frac {1}{1+x}+\log (1-x)-2 \log (1+x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 32, normalized size = 0.84 \begin {gather*} -\frac {3}{2 (-1+x)^2}-\frac {2}{-1+x}+\frac {1}{1+x}+\log (-1+x)-2 \log (1+x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.03, size = 31, normalized size = 0.82
method | result | size |
default | \(\ln \left (-1+x \right )-\frac {3}{2 \left (-1+x \right )^{2}}-\frac {2}{-1+x}+\frac {1}{1+x}-2 \ln \left (1+x \right )\) | \(31\) |
norman | \(\frac {-x^{2}-\frac {7}{2} x +\frac {3}{2}}{\left (-1+x \right )^{2} \left (1+x \right )}-2 \ln \left (1+x \right )+\ln \left (-1+x \right )\) | \(33\) |
risch | \(\frac {-x^{2}-\frac {7}{2} x +\frac {3}{2}}{x^{3}-x^{2}-x +1}-2 \ln \left (1+x \right )+\ln \left (-1+x \right )\) | \(38\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 1.12, size = 38, normalized size = 1.00 \begin {gather*} -\frac {2 \, x^{2} + 7 \, x - 3}{2 \, {\left (x^{3} - x^{2} - x + 1\right )}} - 2 \, \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 [B] Leaf count of result is larger than twice the leaf count of optimal. 65 vs.
\(2 (32) = 64\).
time = 0.44, size = 65, normalized size = 1.71 \begin {gather*} -\frac {2 \, x^{2} + 4 \, {\left (x^{3} - x^{2} - x + 1\right )} \log \left (x + 1\right ) - 2 \, {\left (x^{3} - x^{2} - x + 1\right )} \log \left (x - 1\right ) + 7 \, x - 3}{2 \, {\left (x^{3} - x^{2} - x + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.05, size = 36, normalized size = 0.95 \begin {gather*} - \frac {2 x^{2} + 7 x - 3}{2 x^{3} - 2 x^{2} - 2 x + 2} + \log {\left (x - 1 \right )} - 2 \log {\left (x + 1 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.50, size = 35, normalized size = 0.92 \begin {gather*} -\frac {2 \, x^{2} + 7 \, x - 3}{2 \, {\left (x + 1\right )} {\left (x - 1\right )}^{2}} - 2 \, \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.07, size = 33, normalized size = 0.87 \begin {gather*} \ln \left (x-1\right )-2\,\ln \left (x+1\right )+\frac {x^2+\frac {7\,x}{2}-\frac {3}{2}}{-x^3+x^2+x-1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________