\(\int \frac {5+9 x+8 x^2-2 x^3+(5-x)^4 (-10 x^2-9 x^3+7 x^4)+(5 x-x^2) \log (x)}{-5 x+x^2} \, dx\) [5615]

   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 = 61, antiderivative size = 23 \[ \int \frac {5+9 x+8 x^2-2 x^3+(5-x)^4 \left (-10 x^2-9 x^3+7 x^4\right )+\left (5 x-x^2\right ) \log (x)}{-5 x+x^2} \, dx=(1+x) \left (-x+(5-x)^4 x^2-\log (x)\right ) \]

[Out]

(x^2*(5-x)^4-x-ln(x))*(1+x)

Rubi [A] (verified)

Time = 0.12 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.78, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.049, Rules used = {1607, 6820, 2332} \[ \int \frac {5+9 x+8 x^2-2 x^3+(5-x)^4 \left (-10 x^2-9 x^3+7 x^4\right )+\left (5 x-x^2\right ) \log (x)}{-5 x+x^2} \, dx=x^7-19 x^6+130 x^5-350 x^4+125 x^3+624 x^2-x-x \log (x)-\log (x) \]

[In]

Int[(5 + 9*x + 8*x^2 - 2*x^3 + (5 - x)^4*(-10*x^2 - 9*x^3 + 7*x^4) + (5*x - x^2)*Log[x])/(-5*x + x^2),x]

[Out]

-x + 624*x^2 + 125*x^3 - 350*x^4 + 130*x^5 - 19*x^6 + x^7 - Log[x] - x*Log[x]

Rule 1607

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

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 6820

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rubi steps \begin{align*} \text {integral}& = \int \frac {5+9 x+8 x^2-2 x^3+(5-x)^4 \left (-10 x^2-9 x^3+7 x^4\right )+\left (5 x-x^2\right ) \log (x)}{(-5+x) x} \, dx \\ & = \int \left (-2-\frac {1}{x}+1248 x+375 x^2-1400 x^3+650 x^4-114 x^5+7 x^6-\log (x)\right ) \, dx \\ & = -2 x+624 x^2+125 x^3-350 x^4+130 x^5-19 x^6+x^7-\log (x)-\int \log (x) \, dx \\ & = -x+624 x^2+125 x^3-350 x^4+130 x^5-19 x^6+x^7-\log (x)-x \log (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.78 \[ \int \frac {5+9 x+8 x^2-2 x^3+(5-x)^4 \left (-10 x^2-9 x^3+7 x^4\right )+\left (5 x-x^2\right ) \log (x)}{-5 x+x^2} \, dx=-x+624 x^2+125 x^3-350 x^4+130 x^5-19 x^6+x^7-\log (x)-x \log (x) \]

[In]

Integrate[(5 + 9*x + 8*x^2 - 2*x^3 + (5 - x)^4*(-10*x^2 - 9*x^3 + 7*x^4) + (5*x - x^2)*Log[x])/(-5*x + x^2),x]

[Out]

-x + 624*x^2 + 125*x^3 - 350*x^4 + 130*x^5 - 19*x^6 + x^7 - Log[x] - x*Log[x]

Maple [A] (verified)

Time = 0.53 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.83

method result size
default \(x^{7}-19 x^{6}+130 x^{5}-350 x^{4}+125 x^{3}-x -x \ln \left (x \right )+624 x^{2}-\ln \left (x \right )\) \(42\)
norman \(x^{7}-19 x^{6}+130 x^{5}-350 x^{4}+125 x^{3}-x -x \ln \left (x \right )+624 x^{2}-\ln \left (x \right )\) \(42\)
risch \(x^{7}-19 x^{6}+130 x^{5}-350 x^{4}+125 x^{3}-x -x \ln \left (x \right )+624 x^{2}-\ln \left (x \right )\) \(42\)
parallelrisch \(x^{7}-19 x^{6}+130 x^{5}-350 x^{4}+125 x^{3}-x -x \ln \left (x \right )+624 x^{2}-\ln \left (x \right )\) \(42\)
parts \(x^{7}-19 x^{6}+130 x^{5}-350 x^{4}+125 x^{3}-x -x \ln \left (x \right )+624 x^{2}-\ln \left (x \right )\) \(42\)

[In]

int(((7*x^4-9*x^3-10*x^2)*(5-x)^4+(-x^2+5*x)*ln(x)-2*x^3+8*x^2+9*x+5)/(x^2-5*x),x,method=_RETURNVERBOSE)

[Out]

x^7-19*x^6+130*x^5-350*x^4+125*x^3-x-x*ln(x)+624*x^2-ln(x)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.70 \[ \int \frac {5+9 x+8 x^2-2 x^3+(5-x)^4 \left (-10 x^2-9 x^3+7 x^4\right )+\left (5 x-x^2\right ) \log (x)}{-5 x+x^2} \, dx=x^{7} - 19 \, x^{6} + 130 \, x^{5} - 350 \, x^{4} + 125 \, x^{3} + 624 \, x^{2} - {\left (x + 1\right )} \log \left (x\right ) - x \]

[In]

integrate(((7*x^4-9*x^3-10*x^2)*(5-x)^4+(-x^2+5*x)*log(x)-2*x^3+8*x^2+9*x+5)/(x^2-5*x),x, algorithm="fricas")

[Out]

x^7 - 19*x^6 + 130*x^5 - 350*x^4 + 125*x^3 + 624*x^2 - (x + 1)*log(x) - x

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 37 vs. \(2 (15) = 30\).

Time = 0.09 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.61 \[ \int \frac {5+9 x+8 x^2-2 x^3+(5-x)^4 \left (-10 x^2-9 x^3+7 x^4\right )+\left (5 x-x^2\right ) \log (x)}{-5 x+x^2} \, dx=x^{7} - 19 x^{6} + 130 x^{5} - 350 x^{4} + 125 x^{3} + 624 x^{2} - x \log {\left (x \right )} - x - \log {\left (x \right )} \]

[In]

integrate(((7*x**4-9*x**3-10*x**2)*(5-x)**4+(-x**2+5*x)*ln(x)-2*x**3+8*x**2+9*x+5)/(x**2-5*x),x)

[Out]

x**7 - 19*x**6 + 130*x**5 - 350*x**4 + 125*x**3 + 624*x**2 - x*log(x) - x - log(x)

Maxima [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.78 \[ \int \frac {5+9 x+8 x^2-2 x^3+(5-x)^4 \left (-10 x^2-9 x^3+7 x^4\right )+\left (5 x-x^2\right ) \log (x)}{-5 x+x^2} \, dx=x^{7} - 19 \, x^{6} + 130 \, x^{5} - 350 \, x^{4} + 125 \, x^{3} + 624 \, x^{2} - x \log \left (x\right ) - x - \log \left (x\right ) \]

[In]

integrate(((7*x^4-9*x^3-10*x^2)*(5-x)^4+(-x^2+5*x)*log(x)-2*x^3+8*x^2+9*x+5)/(x^2-5*x),x, algorithm="maxima")

[Out]

x^7 - 19*x^6 + 130*x^5 - 350*x^4 + 125*x^3 + 624*x^2 - x*log(x) - x - log(x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.78 \[ \int \frac {5+9 x+8 x^2-2 x^3+(5-x)^4 \left (-10 x^2-9 x^3+7 x^4\right )+\left (5 x-x^2\right ) \log (x)}{-5 x+x^2} \, dx=x^{7} - 19 \, x^{6} + 130 \, x^{5} - 350 \, x^{4} + 125 \, x^{3} + 624 \, x^{2} - x \log \left (x\right ) - x - \log \left (x\right ) \]

[In]

integrate(((7*x^4-9*x^3-10*x^2)*(5-x)^4+(-x^2+5*x)*log(x)-2*x^3+8*x^2+9*x+5)/(x^2-5*x),x, algorithm="giac")

[Out]

x^7 - 19*x^6 + 130*x^5 - 350*x^4 + 125*x^3 + 624*x^2 - x*log(x) - x - log(x)

Mupad [B] (verification not implemented)

Time = 11.22 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.48 \[ \int \frac {5+9 x+8 x^2-2 x^3+(5-x)^4 \left (-10 x^2-9 x^3+7 x^4\right )+\left (5 x-x^2\right ) \log (x)}{-5 x+x^2} \, dx=-\left (x+1\right )\,\left (x+\ln \left (x\right )-625\,x^2+500\,x^3-150\,x^4+20\,x^5-x^6\right ) \]

[In]

int(-(9*x - (x - 5)^4*(10*x^2 + 9*x^3 - 7*x^4) + log(x)*(5*x - x^2) + 8*x^2 - 2*x^3 + 5)/(5*x - x^2),x)

[Out]

-(x + 1)*(x + log(x) - 625*x^2 + 500*x^3 - 150*x^4 + 20*x^5 - x^6)