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

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

[Out]

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

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {1608, 1642} \[ \int \frac {-3+5 x+6 x^2}{-3 x+2 x^2+x^3} \, dx=2 \log (1-x)+\log (x)+3 \log (x+3) \]

[In]

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

[Out]

2*Log[1 - x] + Log[x] + 3*Log[3 + x]

Rule 1608

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rule 1642

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

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

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00 \[ \int \frac {-3+5 x+6 x^2}{-3 x+2 x^2+x^3} \, dx=2 \log (1-x)+\log (x)+3 \log (3+x) \]

[In]

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

[Out]

2*Log[1 - x] + Log[x] + 3*Log[3 + x]

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.94

method result size
default \(\ln \left (x \right )+3 \ln \left (3+x \right )+2 \ln \left (x -1\right )\) \(16\)
norman \(\ln \left (x \right )+3 \ln \left (3+x \right )+2 \ln \left (x -1\right )\) \(16\)
risch \(\ln \left (x \right )+3 \ln \left (3+x \right )+2 \ln \left (x -1\right )\) \(16\)
parallelrisch \(\ln \left (x \right )+3 \ln \left (3+x \right )+2 \ln \left (x -1\right )\) \(16\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.34 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.88 \[ \int \frac {-3+5 x+6 x^2}{-3 x+2 x^2+x^3} \, dx=3 \, \log \left (x + 3\right ) + 2 \, \log \left (x - 1\right ) + \log \left (x\right ) \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.88 \[ \int \frac {-3+5 x+6 x^2}{-3 x+2 x^2+x^3} \, dx=\log {\left (x \right )} + 2 \log {\left (x - 1 \right )} + 3 \log {\left (x + 3 \right )} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.88 \[ \int \frac {-3+5 x+6 x^2}{-3 x+2 x^2+x^3} \, dx=3 \, \log \left (x + 3\right ) + 2 \, \log \left (x - 1\right ) + \log \left (x\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.88 \[ \int \frac {-3+5 x+6 x^2}{-3 x+2 x^2+x^3} \, dx=2\,\ln \left (x-1\right )+3\,\ln \left (x+3\right )+\ln \left (x\right ) \]

[In]

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

[Out]

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