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

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

[Out]

Log[2 - x]/2 - Log[x]/2

_______________________________________________________________________________________

Rubi [A]  time = 0.00907664, antiderivative size = 17, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.444 \[ \frac{1}{2} \log (2-x)-\frac{\log (x)}{2} \]

Antiderivative was successfully verified.

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

[Out]

Log[2 - x]/2 - Log[x]/2

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 1.10927, size = 10, normalized size = 0.59 \[ - \frac{\log{\left (x \right )}}{2} + \frac{\log{\left (- x + 2 \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-log(x)/2 + log(-x + 2)/2

_______________________________________________________________________________________

Mathematica [A]  time = 0.0025605, size = 17, normalized size = 1. \[ \frac{1}{2} \log (2-x)-\frac{\log (x)}{2} \]

Antiderivative was successfully verified.

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

[Out]

Log[2 - x]/2 - Log[x]/2

_______________________________________________________________________________________

Maple [A]  time = 0.007, size = 12, normalized size = 0.7 \[ -{\frac{\ln \left ( x \right ) }{2}}+{\frac{\ln \left ( -2+x \right ) }{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 1.34144, size = 15, normalized size = 0.88 \[ \frac{1}{2} \, \log \left (x - 2\right ) - \frac{1}{2} \, \log \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.194603, size = 15, normalized size = 0.88 \[ \frac{1}{2} \, \log \left (x - 2\right ) - \frac{1}{2} \, \log \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Sympy [A]  time = 0.087498, size = 10, normalized size = 0.59 \[ - \frac{\log{\left (x \right )}}{2} + \frac{\log{\left (x - 2 \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-log(x)/2 + log(x - 2)/2

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.205118, size = 18, normalized size = 1.06 \[ \frac{1}{2} \,{\rm ln}\left ({\left | x - 2 \right |}\right ) - \frac{1}{2} \,{\rm ln}\left ({\left | x \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/2*ln(abs(x - 2)) - 1/2*ln(abs(x))