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

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

[Out]

x^(-1) + 3*Log[1 - x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0433017, antiderivative size = 12, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091 \[ \frac{1}{x}+3 \log (1-x) \]

Antiderivative was successfully verified.

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

[Out]

x^(-1) + 3*Log[1 - x]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 7.00016, size = 8, normalized size = 0.67 \[ 3 \log{\left (- x + 1 \right )} + \frac{1}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Mathematica [A]  time = 0.00578145, size = 12, normalized size = 1. \[ \frac{1}{x}+3 \log (1-x) \]

Antiderivative was successfully verified.

[In]  Integrate[(1 - x + 3*x^2)/(-x^2 + x^3),x]

[Out]

x^(-1) + 3*Log[1 - x]

_______________________________________________________________________________________

Maple [A]  time = 0.007, size = 11, normalized size = 0.9 \[ 3\,\ln \left ( -1+x \right ) +{x}^{-1} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 0.812893, size = 14, normalized size = 1.17 \[ \frac{1}{x} + 3 \, \log \left (x - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.249535, size = 18, normalized size = 1.5 \[ \frac{3 \, x \log \left (x - 1\right ) + 1}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Sympy [A]  time = 0.169184, size = 8, normalized size = 0.67 \[ 3 \log{\left (x - 1 \right )} + \frac{1}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.262483, size = 15, normalized size = 1.25 \[ \frac{1}{x} + 3 \,{\rm ln}\left ({\left | x - 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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