3.154 \(\int \frac{x+x^3}{-1+x} \, dx\)

Optimal. Leaf size=26 \[ \frac{x^3}{3}+\frac{x^2}{2}+2 x+2 \log (1-x) \]

[Out]

2*x + x^2/2 + x^3/3 + 2*Log[1 - x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0306489, 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 \[ \frac{x^3}{3}+\frac{x^2}{2}+2 x+2 \log (1-x) \]

Antiderivative was successfully verified.

[In]  Int[(x + x^3)/(-1 + x),x]

[Out]

2*x + x^2/2 + x^3/3 + 2*Log[1 - x]

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \frac{x^{3}}{3} + 2 x + 2 \log{\left (- x + 1 \right )} + \int x\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((x**3+x)/(-1+x),x)

[Out]

x**3/3 + 2*x + 2*log(-x + 1) + Integral(x, x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.00714938, 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]  Integrate[(x + x^3)/(-1 + x),x]

[Out]

(-17 + 12*x + 3*x^2 + 2*x^3 + 12*Log[-1 + x])/6

_______________________________________________________________________________________

Maple [A]  time = 0.003, size = 21, normalized size = 0.8 \[{\frac{{x}^{3}}{3}}+{\frac{{x}^{2}}{2}}+2\,x+2\,\ln \left ( -1+x \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((x^3+x)/(-1+x),x)

[Out]

1/3*x^3+1/2*x^2+2*x+2*ln(-1+x)

_______________________________________________________________________________________

Maxima [A]  time = 1.35759, size = 27, normalized size = 1.04 \[ \frac{1}{3} \, x^{3} + \frac{1}{2} \, x^{2} + 2 \, x + 2 \, \log \left (x - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^3 + x)/(x - 1),x, algorithm="maxima")

[Out]

1/3*x^3 + 1/2*x^2 + 2*x + 2*log(x - 1)

_______________________________________________________________________________________

Fricas [A]  time = 0.192253, size = 27, normalized size = 1.04 \[ \frac{1}{3} \, x^{3} + \frac{1}{2} \, x^{2} + 2 \, x + 2 \, \log \left (x - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^3 + x)/(x - 1),x, algorithm="fricas")

[Out]

1/3*x^3 + 1/2*x^2 + 2*x + 2*log(x - 1)

_______________________________________________________________________________________

Sympy [A]  time = 0.059164, size = 19, normalized size = 0.73 \[ \frac{x^{3}}{3} + \frac{x^{2}}{2} + 2 x + 2 \log{\left (x - 1 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x**3+x)/(-1+x),x)

[Out]

x**3/3 + x**2/2 + 2*x + 2*log(x - 1)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.211187, size = 28, normalized size = 1.08 \[ \frac{1}{3} \, x^{3} + \frac{1}{2} \, x^{2} + 2 \, x + 2 \,{\rm ln}\left ({\left | x - 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^3 + x)/(x - 1),x, algorithm="giac")

[Out]

1/3*x^3 + 1/2*x^2 + 2*x + 2*ln(abs(x - 1))