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

Optimal. Leaf size=29 \[ \log \left (e^x (3-x)-\frac {1}{2} e^x \left (\frac {5}{x}+9 x^2\right )\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 22, normalized size of antiderivative = 0.76, number of steps used = 3, number of rules used = 2, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {2099, 1601} \begin {gather*} \log \left (9 x^3+2 x^2-6 x+5\right )+x-\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x - Log[x] + Log[5 - 6*x + 2*x^2 + 9*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 {gather*} \begin {aligned} \text {integral} &=\int \left (1-\frac {1}{x}+\frac {-6+4 x+27 x^2}{5-6 x+2 x^2+9 x^3}\right ) \, dx\\ &=x-\log (x)+\int \frac {-6+4 x+27 x^2}{5-6 x+2 x^2+9 x^3} \, dx\\ &=x-\log (x)+\log \left (5-6 x+2 x^2+9 x^3\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 22, normalized size = 0.76 \begin {gather*} x-\log (x)+\log \left (5-6 x+2 x^2+9 x^3\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.13, size = 23, normalized size = 0.79

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 22, normalized size = 0.76 \begin {gather*} x + \log \left (9 \, x^{3} + 2 \, x^{2} - 6 \, x + 5\right ) - \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 22, normalized size = 0.76 \begin {gather*} x + \log \left (9 \, x^{3} + 2 \, x^{2} - 6 \, x + 5\right ) - \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.05, size = 20, normalized size = 0.69 \begin {gather*} x - \log {\left (x \right )} + \log {\left (9 x^{3} + 2 x^{2} - 6 x + 5 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 24, normalized size = 0.83 \begin {gather*} x + \log \left ({\left | 9 \, x^{3} + 2 \, x^{2} - 6 \, x + 5 \right |}\right ) - \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.13, size = 22, normalized size = 0.76 \begin {gather*} x+\ln \left (9\,x^3+2\,x^2-6\,x+5\right )-\ln \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________