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

   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 = 15, antiderivative size = 12 \[ \int \frac {1+x^3}{-x+x^3} \, dx=x+\log (1-x)-\log (x) \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {1607, 1816} \[ \int \frac {1+x^3}{-x+x^3} \, dx=x+\log (1-x)-\log (x) \]

[In]

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

[Out]

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

Rule 1607

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 1816

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

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.86 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.92

method result size
default \(x -\ln \left (x \right )+\ln \left (x -1\right )\) \(11\)
norman \(x -\ln \left (x \right )+\ln \left (x -1\right )\) \(11\)
risch \(x -\ln \left (x \right )+\ln \left (x -1\right )\) \(11\)
parallelrisch \(x -\ln \left (x \right )+\ln \left (x -1\right )\) \(11\)
meijerg \(\frac {\ln \left (-x^{2}+1\right )}{2}-\ln \left (x \right )-\frac {i \pi }{2}-\frac {i \left (2 i x -2 i \operatorname {arctanh}\left (x \right )\right )}{2}\) \(33\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.83 \[ \int \frac {1+x^3}{-x+x^3} \, dx=x + \log \left (x - 1\right ) - \log \left (x\right ) \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.83 \[ \int \frac {1+x^3}{-x+x^3} \, dx=x + \log \left (x - 1\right ) - \log \left (x\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 9.14 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.83 \[ \int \frac {1+x^3}{-x+x^3} \, dx=x-2\,\mathrm {atanh}\left (2\,x-1\right ) \]

[In]

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

[Out]

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