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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.00, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {615} \[ \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

Rule 615

Int[((b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[Log[x]/b, x] - Simp[Log[RemoveContent[b + c*x, x]]/b,
x] /; FreeQ[{b, c}, x]

Rubi steps

\begin {align*} \int \frac {1}{-2 x+x^2} \, dx &=\frac {1}{2} \log (2-x)-\frac {\log (x)}{2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 17, normalized size = 1.00 \[ \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

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 11, normalized size = 0.65 \[ \frac {1}{2} \, \log \left (x - 2\right ) - \frac {1}{2} \, \log \relax (x) \]

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)

________________________________________________________________________________________

giac [A]  time = 0.90, size = 13, normalized size = 0.76 \[ \frac {1}{2} \, \log \left ({\left | x - 2 \right |}\right ) - \frac {1}{2} \, \log \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*log(abs(x - 2)) - 1/2*log(abs(x))

________________________________________________________________________________________

maple [A]  time = 0.01, size = 12, normalized size = 0.71 \[ -\frac {\ln \relax (x )}{2}+\frac {\ln \left (x -2\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-2)-1/2*ln(x)

________________________________________________________________________________________

maxima [A]  time = 0.52, size = 11, normalized size = 0.65 \[ \frac {1}{2} \, \log \left (x - 2\right ) - \frac {1}{2} \, \log \relax (x) \]

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)

________________________________________________________________________________________

mupad [B]  time = 0.10, size = 6, normalized size = 0.35 \[ -\mathrm {atanh}\left (x-1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-1/(2*x - x^2),x)

[Out]

-atanh(x - 1)

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 10, normalized size = 0.59 \[ - \frac {\log {\relax (x )}}{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

________________________________________________________________________________________