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

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

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {2099} \[ \int \frac {1+2 x}{-1+3 x-3 x^2+x^3} \, dx=\frac {2}{1-x}-\frac {3}{2 (1-x)^2} \]

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

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.57

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

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81 \[ \int \frac {1+2 x}{-1+3 x-3 x^2+x^3} \, dx=-\frac {4 \, x - 1}{2 \, {\left (x^{2} - 2 \, x + 1\right )}} \]

[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] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[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)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.57 \[ \int \frac {1+2 x}{-1+3 x-3 x^2+x^3} \, dx=-\frac {4 \, x - 1}{2 \, {\left (x - 1\right )}^{2}} \]

[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] (verification not implemented)

Time = 9.28 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.57 \[ \int \frac {1+2 x}{-1+3 x-3 x^2+x^3} \, dx=-\frac {4\,x-1}{2\,{\left (x-1\right )}^2} \]

[In]

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

[Out]

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