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

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

[Out]

1/3/(1-x)+2/9*ln(1-x)-2/9*ln(2+x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 30, 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.083, Rules used = {2099} \[ \int \frac {x}{2-3 x+x^3} \, dx=\frac {1}{3 (1-x)}+\frac {2}{9} \log (1-x)-\frac {2}{9} \log (x+2) \]

[In]

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

[Out]

1/(3*(1 - x)) + (2*Log[1 - x])/9 - (2*Log[2 + x])/9

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

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.93 \[ \int \frac {x}{2-3 x+x^3} \, dx=-\frac {1}{3 (-1+x)}+\frac {2}{9} \log (1-x)-\frac {2}{9} \log (2+x) \]

[In]

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

[Out]

-1/3*1/(-1 + x) + (2*Log[1 - x])/9 - (2*Log[2 + x])/9

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.70

method result size
default \(-\frac {1}{3 \left (-1+x \right )}+\frac {2 \ln \left (-1+x \right )}{9}-\frac {2 \ln \left (2+x \right )}{9}\) \(21\)
norman \(-\frac {1}{3 \left (-1+x \right )}+\frac {2 \ln \left (-1+x \right )}{9}-\frac {2 \ln \left (2+x \right )}{9}\) \(21\)
risch \(-\frac {1}{3 \left (-1+x \right )}+\frac {2 \ln \left (-1+x \right )}{9}-\frac {2 \ln \left (2+x \right )}{9}\) \(21\)
parallelrisch \(\frac {2 \ln \left (-1+x \right ) x -2 \ln \left (2+x \right ) x -3-2 \ln \left (-1+x \right )+2 \ln \left (2+x \right )}{-9+9 x}\) \(36\)

[In]

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

[Out]

-1/3/(-1+x)+2/9*ln(-1+x)-2/9*ln(2+x)

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.90 \[ \int \frac {x}{2-3 x+x^3} \, dx=-\frac {2 \, {\left (x - 1\right )} \log \left (x + 2\right ) - 2 \, {\left (x - 1\right )} \log \left (x - 1\right ) + 3}{9 \, {\left (x - 1\right )}} \]

[In]

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

[Out]

-1/9*(2*(x - 1)*log(x + 2) - 2*(x - 1)*log(x - 1) + 3)/(x - 1)

Sympy [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.73 \[ \int \frac {x}{2-3 x+x^3} \, dx=\frac {2 \log {\left (x - 1 \right )}}{9} - \frac {2 \log {\left (x + 2 \right )}}{9} - \frac {1}{3 x - 3} \]

[In]

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

[Out]

2*log(x - 1)/9 - 2*log(x + 2)/9 - 1/(3*x - 3)

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

-1/3/(x - 1) - 2/9*log(x + 2) + 2/9*log(x - 1)

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

-1/3/(x - 1) - 2/9*log(abs(x + 2)) + 2/9*log(abs(x - 1))

Mupad [B] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.60 \[ \int \frac {x}{2-3 x+x^3} \, dx=-\frac {4\,\mathrm {atanh}\left (\frac {2\,x}{3}+\frac {1}{3}\right )}{9}-\frac {1}{3\,\left (x-1\right )} \]

[In]

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

[Out]

- (4*atanh((2*x)/3 + 1/3))/9 - 1/(3*(x - 1))