3.166 \(\int \frac {1}{-x^3+x^4} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {1593, 44} \[ \frac {1}{2 x^2}+\frac {1}{x}+\log (1-x)-\log (x) \]

Antiderivative was successfully verified.

[In]

Int[(-x^3 + x^4)^(-1),x]

[Out]

1/(2*x^2) + x^(-1) + Log[1 - x] - 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])

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 21, normalized size = 1.00 \[ \frac {1}{2 x^2}+\frac {1}{x}+\log (1-x)-\log (x) \]

Antiderivative was successfully verified.

[In]

Integrate[(-x^3 + x^4)^(-1),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.38, size = 26, normalized size = 1.24 \[ \frac {2 \, x^{2} \log \left (x - 1\right ) - 2 \, x^{2} \log \relax (x) + 2 \, x + 1}{2 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^4-x^3),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.92, size = 21, normalized size = 1.00 \[ \frac {2 \, x + 1}{2 \, x^{2}} + \log \left ({\left | x - 1 \right |}\right ) - \log \left ({\left | x \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^4-x^3),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.01, size = 18, normalized size = 0.86 \[ -\ln \relax (x )+\ln \left (x -1\right )+\frac {1}{x}+\frac {1}{2 x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(x^4-x^3),x)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.63, size = 19, normalized size = 0.90 \[ \frac {2 \, x + 1}{2 \, x^{2}} + \log \left (x - 1\right ) - \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^4-x^3),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 16, normalized size = 0.76 \[ \frac {x+\frac {1}{2}}{x^2}-2\,\mathrm {atanh}\left (2\,x-1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-1/(x^3 - x^4),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 17, normalized size = 0.81 \[ - \log {\relax (x )} + \log {\left (x - 1 \right )} + \frac {2 x + 1}{2 x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x**4-x**3),x)

[Out]

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

________________________________________________________________________________________