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

Optimal. Leaf size=21 \[ -\frac {3}{2 (1-x)^2}+\frac {2}{1-x} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {2099} \begin {gather*} \frac {2}{1-x}-\frac {3}{2 (1-x)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2099

Int[(P_)^(p_)*(Q_)^(q_.), x_Symbol] :> With[{PP = Factor[P]}, Int[ExpandIntegrand[PP^p*Q^q, x], x] /;  !SumQ[N
onfreeFactors[PP, x]]] /; FreeQ[q, x] && PolyQ[P, x] && PolyQ[Q, x] && IntegerQ[p] && NeQ[P, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 14, normalized size = 0.67 \begin {gather*} \frac {1-4 x}{2 (-1+x)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.01, size = 16, normalized size = 0.76

method result size
norman \(\frac {-2 x +\frac {1}{2}}{\left (-1+x \right )^{2}}\) \(12\)
default \(-\frac {2}{-1+x}-\frac {3}{2 \left (-1+x \right )^{2}}\) \(16\)
risch \(\frac {-2 x +\frac {1}{2}}{x^{2}-2 x +1}\) \(17\)
gosper \(-\frac {4 x -1}{2 \left (x^{2}-2 x +1\right )}\) \(18\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 17, normalized size = 0.81 \begin {gather*} -\frac {4 \, x - 1}{2 \, {\left (x^{2} - 2 \, x + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 17, normalized size = 0.81 \begin {gather*} -\frac {4 \, x - 1}{2 \, {\left (x^{2} - 2 \, x + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.02, size = 14, normalized size = 0.67 \begin {gather*} \frac {1 - 4 x}{2 x^{2} - 4 x + 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 5.93, size = 12, normalized size = 0.57 \begin {gather*} -\frac {4 \, x - 1}{2 \, {\left (x - 1\right )}^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*(4*x - 1)/(x - 1)^2

________________________________________________________________________________________

Mupad [B]
time = 2.09, size = 12, normalized size = 0.57 \begin {gather*} -\frac {4\,x-1}{2\,{\left (x-1\right )}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(4*x - 1)/(2*(x - 1)^2)

________________________________________________________________________________________