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

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

[Out]

ln(2-x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {1600, 31} \[ \int \frac {x+x^2}{-2 x-x^2+x^3} \, dx=\log (2-x) \]

[In]

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

[Out]

Log[2 - x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 1600

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

Rubi steps \begin{align*} \text {integral}& = \int \frac {1}{-2+x} \, dx \\ & = \log (2-x) \\ \end{align*}

Mathematica [A] (verified)

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

[In]

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

[Out]

Log[-2 + x]

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 5, normalized size of antiderivative = 0.83

method result size
default \(\ln \left (x -2\right )\) \(5\)
norman \(\ln \left (x -2\right )\) \(5\)
risch \(\ln \left (x -2\right )\) \(5\)
parallelrisch \(\ln \left (x -2\right )\) \(5\)

[In]

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

[Out]

ln(x-2)

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

log(x - 2)

Sympy [A] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 3, normalized size of antiderivative = 0.50 \[ \int \frac {x+x^2}{-2 x-x^2+x^3} \, dx=\log {\left (x - 2 \right )} \]

[In]

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

[Out]

log(x - 2)

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

log(x - 2)

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 5, normalized size of antiderivative = 0.83 \[ \int \frac {x+x^2}{-2 x-x^2+x^3} \, dx=\log \left ({\left | x - 2 \right |}\right ) \]

[In]

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

[Out]

log(abs(x - 2))

Mupad [B] (verification not implemented)

Time = 0.01 (sec) , antiderivative size = 4, normalized size of antiderivative = 0.67 \[ \int \frac {x+x^2}{-2 x-x^2+x^3} \, dx=\ln \left (x-2\right ) \]

[In]

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

[Out]

log(x - 2)