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

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

________________________________________________________________________________________

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 = {2074, 1587} \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 1587

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]*D[Qq, x])/(q*Coeff[Q
q, x, q])]]] /; PolyQ[Pp, x] && PolyQ[Qq, x]

Rule 2074

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]

________________________________________________________________________________________

fricas [A]  time = 0.47, size = 22, normalized size = 0.76 \begin {gather*} x + \log \left (9 \, x^{3} + 2 \, x^{2} - 6 \, x + 5\right ) - \log \relax (x) \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)

________________________________________________________________________________________

giac [A]  time = 0.17, 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))

________________________________________________________________________________________

maple [A]  time = 0.03, size = 23, normalized size = 0.79




method result size



default \(x -\ln \relax (x )+\ln \left (9 x^{3}+2 x^{2}-6 x +5\right )\) \(23\)
norman \(x -\ln \relax (x )+\ln \left (9 x^{3}+2 x^{2}-6 x +5\right )\) \(23\)
risch \(x -\ln \relax (x )+\ln \left (9 x^{3}+2 x^{2}-6 x +5\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(x)+ln(9*x^3+2*x^2-6*x+5)

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 22, normalized size = 0.76 \begin {gather*} x + \log \left (9 \, x^{3} + 2 \, x^{2} - 6 \, x + 5\right ) - \log \relax (x) \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)

________________________________________________________________________________________

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 \relax (x) \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)

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 20, normalized size = 0.69 \begin {gather*} x - \log {\relax (x )} + \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)

________________________________________________________________________________________