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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 32, antiderivative size = 12 \[ \int \frac {5-6 x^2+2 x^3}{-5 x+9 x^2-6 x^3+x^4} \, dx=\log \left ((-3+x)^2-\frac {5}{x}\right ) \]

[Out]

ln((-3+x)^2-5/x)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.75, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {2099, 1601} \[ \int \frac {5-6 x^2+2 x^3}{-5 x+9 x^2-6 x^3+x^4} \, dx=\log \left (-x^3+6 x^2-9 x+5\right )-\log (x) \]

[In]

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

[Out]

-Log[x] + Log[5 - 9*x + 6*x^2 - x^3]

Rule 1601

Int[(Pp_)/(Qq_), x_Symbol] :> With[{p = Expon[Pp, x], q = Expon[Qq, x]}, Simp[Coeff[Pp, x, p]*(Log[RemoveConte
nt[Qq, x]]/(q*Coeff[Qq, x, q])), x] /; EqQ[p, q - 1] && EqQ[Pp, Simplify[(Coeff[Pp, x, p]/(q*Coeff[Qq, x, q]))
*D[Qq, x]]]] /; PolyQ[Pp, x] && PolyQ[Qq, 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 {1}{x}+\frac {3 \left (3-4 x+x^2\right )}{-5+9 x-6 x^2+x^3}\right ) \, dx \\ & = -\log (x)+3 \int \frac {3-4 x+x^2}{-5+9 x-6 x^2+x^3} \, dx \\ & = -\log (x)+\log \left (5-9 x+6 x^2-x^3\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.75 \[ \int \frac {5-6 x^2+2 x^3}{-5 x+9 x^2-6 x^3+x^4} \, dx=-\log (x)+\log \left (5-9 x+6 x^2-x^3\right ) \]

[In]

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

[Out]

-Log[x] + Log[5 - 9*x + 6*x^2 - x^3]

Maple [A] (verified)

Time = 0.05 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.67

method result size
default \(\ln \left (x^{3}-6 x^{2}+9 x -5\right )-\ln \left (x \right )\) \(20\)
norman \(\ln \left (x^{3}-6 x^{2}+9 x -5\right )-\ln \left (x \right )\) \(20\)
risch \(\ln \left (x^{3}-6 x^{2}+9 x -5\right )-\ln \left (x \right )\) \(20\)
parallelrisch \(\ln \left (x^{3}-6 x^{2}+9 x -5\right )-\ln \left (x \right )\) \(20\)

[In]

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

[Out]

ln(x^3-6*x^2+9*x-5)-ln(x)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.58 \[ \int \frac {5-6 x^2+2 x^3}{-5 x+9 x^2-6 x^3+x^4} \, dx=\log \left (x^{3} - 6 \, x^{2} + 9 \, x - 5\right ) - \log \left (x\right ) \]

[In]

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

[Out]

log(x^3 - 6*x^2 + 9*x - 5) - log(x)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 17 vs. \(2 (8) = 16\).

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

[In]

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

[Out]

-log(x) + log(x**3 - 6*x**2 + 9*x - 5)

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.58 \[ \int \frac {5-6 x^2+2 x^3}{-5 x+9 x^2-6 x^3+x^4} \, dx=\log \left (x^{3} - 6 \, x^{2} + 9 \, x - 5\right ) - \log \left (x\right ) \]

[In]

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

[Out]

log(x^3 - 6*x^2 + 9*x - 5) - log(x)

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.75 \[ \int \frac {5-6 x^2+2 x^3}{-5 x+9 x^2-6 x^3+x^4} \, dx=\log \left ({\left | x^{3} - 6 \, x^{2} + 9 \, x - 5 \right |}\right ) - \log \left ({\left | x \right |}\right ) \]

[In]

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

[Out]

log(abs(x^3 - 6*x^2 + 9*x - 5)) - log(abs(x))

Mupad [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.58 \[ \int \frac {5-6 x^2+2 x^3}{-5 x+9 x^2-6 x^3+x^4} \, dx=\ln \left (x^3-6\,x^2+9\,x-5\right )-\ln \left (x\right ) \]

[In]

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

[Out]

log(9*x - 6*x^2 + x^3 - 5) - log(x)