### 3.193 $$\int \frac{1}{(-1+x)^2 x^2} \, dx$$

Optimal. Leaf size=25 $\frac{1}{1-x}-\frac{1}{x}-2 \log (1-x)+2 \log (x)$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0082479, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 9, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.111, Rules used = {44} $\frac{1}{1-x}-\frac{1}{x}-2 \log (1-x)+2 \log (x)$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rubi steps

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

Mathematica [A]  time = 0.0102419, size = 25, normalized size = 1. $-\frac{1}{x-1}-\frac{1}{x}-2 \log (1-x)+2 \log (x)$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.008, size = 24, normalized size = 1. \begin{align*} -{x}^{-1}+2\,\ln \left ( x \right ) - \left ( -1+x \right ) ^{-1}-2\,\ln \left ( -1+x \right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.923035, size = 36, normalized size = 1.44 \begin{align*} -\frac{2 \, x - 1}{x^{2} - x} - 2 \, \log \left (x - 1\right ) + 2 \, \log \left (x\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-1+x)^2/x^2,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.74229, size = 92, normalized size = 3.68 \begin{align*} -\frac{2 \,{\left (x^{2} - x\right )} \log \left (x - 1\right ) - 2 \,{\left (x^{2} - x\right )} \log \left (x\right ) + 2 \, x - 1}{x^{2} - x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-1+x)^2/x^2,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.100422, size = 20, normalized size = 0.8 \begin{align*} - \frac{2 x - 1}{x^{2} - x} + 2 \log{\left (x \right )} - 2 \log{\left (x - 1 \right )} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-1+x)**2/x**2,x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.05045, size = 41, normalized size = 1.64 \begin{align*} -\frac{1}{x - 1} + \frac{1}{\frac{1}{x - 1} + 1} + 2 \, \log \left ({\left | -\frac{1}{x - 1} - 1 \right |}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-1+x)^2/x^2,x, algorithm="giac")

[Out]

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