3.371 \(\int \frac {1+x^3}{-x^2+x^3} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {1593, 1620} \[ x+\frac {1}{x}+2 \log (1-x)-\log (x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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]

Rule 1620

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.32, size = 17, normalized size = 1.00 \[ x + \frac {1}{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((x^3+1)/(x^3-x^2),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.89, size = 15, normalized size = 0.88 \[ x + \frac {1}{x} + 2 \, \log \left (x - 1\right ) - \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.03, size = 15, normalized size = 0.88 \[ x+2\,\ln \left (x-1\right )-\ln \relax (x)+\frac {1}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________