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

Optimal. Leaf size=11 \[ -x+\frac {x^2}{2} \]

[Out]

-x+1/2*x^2

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {1600} \begin {gather*} \frac {x^2}{2}-x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-x + x^2/2

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*} \int \frac {-1+x^3}{1+x+x^2} \, dx &=\int (-1+x) \, dx\\ &=-x+\frac {x^2}{2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 11, normalized size = 1.00 \begin {gather*} -x+\frac {x^2}{2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-x + x^2/2

________________________________________________________________________________________

Maple [A]
time = 0.32, size = 10, normalized size = 0.91

method result size
gosper \(\frac {x \left (x -2\right )}{2}\) \(7\)
default \(-x +\frac {1}{2} x^{2}\) \(10\)
norman \(-x +\frac {1}{2} x^{2}\) \(10\)
risch \(-x +\frac {1}{2} x^{2}\) \(10\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x+1/2*x^2

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 9, normalized size = 0.82 \begin {gather*} \frac {1}{2} \, x^{2} - x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*x^2 - x

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 9, normalized size = 0.82 \begin {gather*} \frac {1}{2} \, x^{2} - x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*x^2 - x

________________________________________________________________________________________

Sympy [A]
time = 0.01, size = 5, normalized size = 0.45 \begin {gather*} \frac {x^{2}}{2} - x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**2/2 - x

________________________________________________________________________________________

Giac [A]
time = 5.10, size = 9, normalized size = 0.82 \begin {gather*} \frac {1}{2} \, x^{2} - x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*x^2 - x

________________________________________________________________________________________

Mupad [B]
time = 0.02, size = 6, normalized size = 0.55 \begin {gather*} \frac {x\,\left (x-2\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x*(x - 2))/2

________________________________________________________________________________________