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

Optimal. Leaf size=12 \[ x+\log (1-x)-\log (x) \]

[Out]

x+ln(1-x)-ln(x)

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

x + 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 1802

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*Pq*(a + b*x
^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 12, normalized size = 1.00 \[ x+\log (1-x)-\log (x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

x + Log[1 - x] - Log[x]

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 10, normalized size = 0.83 \[ x + \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),x, algorithm="fricas")

[Out]

x + log(x - 1) - log(x)

________________________________________________________________________________________

giac [A]  time = 0.37, size = 12, normalized size = 1.00 \[ x + \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),x, algorithm="giac")

[Out]

x + log(abs(x - 1)) - log(abs(x))

________________________________________________________________________________________

maple [A]  time = 0.00, size = 11, normalized size = 0.92 \[ x -\ln \relax (x )+\ln \left (x -1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x+ln(x-1)-ln(x)

________________________________________________________________________________________

maxima [A]  time = 1.01, size = 10, normalized size = 0.83 \[ x + \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),x, algorithm="maxima")

[Out]

x + log(x - 1) - log(x)

________________________________________________________________________________________

mupad [B]  time = 2.14, size = 10, normalized size = 0.83 \[ x-2\,\mathrm {atanh}\left (2\,x-1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 2*atanh(2*x - 1)

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 8, normalized size = 0.67 \[ x - \log {\relax (x )} + \log {\left (x - 1 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - log(x) + log(x - 1)

________________________________________________________________________________________