Optimal. Leaf size=26 \[ \frac{x^3}{3}+\frac{x^2}{2}+2 x+2 \log (1-x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0163615, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {1593, 772} \[ \frac{x^3}{3}+\frac{x^2}{2}+2 x+2 \log (1-x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1593
Rule 772
Rubi steps
\begin{align*} \int \frac{x+x^3}{-1+x} \, dx &=\int \frac{x \left (1+x^2\right )}{-1+x} \, dx\\ &=\int \left (2+\frac{2}{-1+x}+x+x^2\right ) \, dx\\ &=2 x+\frac{x^2}{2}+\frac{x^3}{3}+2 \log (1-x)\\ \end{align*}
Mathematica [A] time = 0.0042414, size = 25, normalized size = 0.96 \[ \frac{1}{6} \left (2 x^3+3 x^2+12 x+12 \log (x-1)-17\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.002, size = 21, normalized size = 0.8 \begin{align*}{\frac{{x}^{3}}{3}}+{\frac{{x}^{2}}{2}}+2\,x+2\,\ln \left ( -1+x \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.919088, size = 27, normalized size = 1.04 \begin{align*} \frac{1}{3} \, x^{3} + \frac{1}{2} \, x^{2} + 2 \, x + 2 \, \log \left (x - 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.04059, size = 54, normalized size = 2.08 \begin{align*} \frac{1}{3} \, x^{3} + \frac{1}{2} \, x^{2} + 2 \, x + 2 \, \log \left (x - 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.06815, size = 19, normalized size = 0.73 \begin{align*} \frac{x^{3}}{3} + \frac{x^{2}}{2} + 2 x + 2 \log{\left (x - 1 \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.04923, size = 28, normalized size = 1.08 \begin{align*} \frac{1}{3} \, x^{3} + \frac{1}{2} \, x^{2} + 2 \, x + 2 \, \log \left ({\left | x - 1 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]