\(\int \frac {1}{(-1+x)^2 x^2} \, dx\) [193]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 9, antiderivative size = 25 \[ \int \frac {1}{(-1+x)^2 x^2} \, dx=\frac {1}{1-x}-\frac {1}{x}-2 \log (1-x)+2 \log (x) \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {46} \[ \int \frac {1}{(-1+x)^2 x^2} \, dx=\frac {1}{1-x}-\frac {1}{x}-2 \log (1-x)+2 \log (x) \]

[In]

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

[Out]

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

Rule 46

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] && Lt
Q[m + n + 2, 0])

Rubi steps \begin{align*} \text {integral}& = \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] (verified)

Time = 0.01 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00 \[ \int \frac {1}{(-1+x)^2 x^2} \, dx=-\frac {1}{-1+x}-\frac {1}{x}-2 \log (1-x)+2 \log (x) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.18 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.96

method result size
default \(-\frac {1}{-1+x}-2 \ln \left (-1+x \right )-\frac {1}{x}+2 \ln \left (x \right )\) \(24\)
norman \(\frac {1-2 x}{x \left (-1+x \right )}+2 \ln \left (x \right )-2 \ln \left (-1+x \right )\) \(26\)
risch \(\frac {1-2 x}{x \left (-1+x \right )}+2 \ln \left (x \right )-2 \ln \left (-1+x \right )\) \(26\)
meijerg \(-\frac {1}{x}+1+2 \ln \left (x \right )+2 i \pi +\frac {3 x}{-3 x +3}-2 \ln \left (1-x \right )\) \(34\)
parallelrisch \(\frac {2 x^{2} \ln \left (x \right )-2 \ln \left (-1+x \right ) x^{2}+1-2 x \ln \left (x \right )+2 \ln \left (-1+x \right ) x -2 x}{x \left (-1+x \right )}\) \(43\)

[In]

int(1/(-1+x)^2/x^2,x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.60 \[ \int \frac {1}{(-1+x)^2 x^2} \, dx=-\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} \]

[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] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80 \[ \int \frac {1}{(-1+x)^2 x^2} \, dx=\frac {1 - 2 x}{x^{2} - x} + 2 \log {\left (x \right )} - 2 \log {\left (x - 1 \right )} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.08 \[ \int \frac {1}{(-1+x)^2 x^2} \, dx=-\frac {2 \, x - 1}{x^{2} - x} - 2 \, \log \left (x - 1\right ) + 2 \, \log \left (x\right ) \]

[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)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.20 \[ \int \frac {1}{(-1+x)^2 x^2} \, dx=-\frac {1}{x - 1} + \frac {1}{\frac {1}{x - 1} + 1} + 2 \, \log \left ({\left | -\frac {1}{x - 1} - 1 \right |}\right ) \]

[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))

Mupad [B] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.08 \[ \int \frac {1}{(-1+x)^2 x^2} \, dx=\frac {1}{x\,\left (x-1\right )}-\frac {2}{x-1}-2\,\ln \left (\frac {x-1}{x}\right ) \]

[In]

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

[Out]

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