### 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.0020595, antiderivative size = 17, normalized size of antiderivative = 1., 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 veriﬁed.

[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.0017699, size = 17, normalized size = 1. $\frac{1}{2} \log (2-x)-\frac{\log (x)}{2}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Veriﬁcation 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 = 0.92438, size = 15, normalized size = 0.88 \begin{align*} \frac{1}{2} \, \log \left (x - 2\right ) - \frac{1}{2} \, \log \left (x\right ) \end{align*}

Veriﬁcation 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 = 1.86167, size = 39, normalized size = 2.29 \begin{align*} \frac{1}{2} \, \log \left (x - 2\right ) - \frac{1}{2} \, \log \left (x\right ) \end{align*}

Veriﬁcation 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.087404, size = 10, normalized size = 0.59 \begin{align*} - \frac{\log{\left (x \right )}}{2} + \frac{\log{\left (x - 2 \right )}}{2} \end{align*}

Veriﬁcation 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 [A]  time = 1.05437, size = 18, normalized size = 1.06 \begin{align*} \frac{1}{2} \, \log \left ({\left | x - 2 \right |}\right ) - \frac{1}{2} \, \log \left ({\left | x \right |}\right ) \end{align*}

Veriﬁcation 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))