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

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

[Out]

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

_______________________________________________________________________________________

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

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

log(-x + 3) - 1/x

_______________________________________________________________________________________

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

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

ln(-3+x)-1/x

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-1/x + log(x - 3)

_______________________________________________________________________________________

Fricas [A]  time = 0.2497, size = 16, normalized size = 1.33 \[ \frac{x \log \left (x - 3\right ) - 1}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Sympy [A]  time = 0.174778, size = 7, normalized size = 0.58 \[ \log{\left (x - 3 \right )} - \frac{1}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

log(x - 3) - 1/x

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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