\(\int \frac {5+10 x+2 x^2-375 x^3-75 x^4+250 x^5+50 x^6-35 x^7-7 x^8}{5 x+x^2} \, dx\) [1615]

   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 = 50, antiderivative size = 28 \[ \int \frac {5+10 x+2 x^2-375 x^3-75 x^4+250 x^5+50 x^6-35 x^7-7 x^8}{5 x+x^2} \, dx=-6+2 x-x \left (5 x-x^3\right )^2+\log \left (\frac {2 x}{5+x}\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.96, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.040, Rules used = {1607, 1634} \[ \int \frac {5+10 x+2 x^2-375 x^3-75 x^4+250 x^5+50 x^6-35 x^7-7 x^8}{5 x+x^2} \, dx=-x^7+10 x^5-25 x^3+2 x+\log (x)-\log (x+5) \]

[In]

Int[(5 + 10*x + 2*x^2 - 375*x^3 - 75*x^4 + 250*x^5 + 50*x^6 - 35*x^7 - 7*x^8)/(5*x + x^2),x]

[Out]

2*x - 25*x^3 + 10*x^5 - x^7 + Log[x] - Log[5 + 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 1634

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

Rubi steps \begin{align*} \text {integral}& = \int \frac {5+10 x+2 x^2-375 x^3-75 x^4+250 x^5+50 x^6-35 x^7-7 x^8}{x (5+x)} \, dx \\ & = \int \left (2+\frac {1}{-5-x}+\frac {1}{x}-75 x^2+50 x^4-7 x^6\right ) \, dx \\ & = 2 x-25 x^3+10 x^5-x^7+\log (x)-\log (5+x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.96 \[ \int \frac {5+10 x+2 x^2-375 x^3-75 x^4+250 x^5+50 x^6-35 x^7-7 x^8}{5 x+x^2} \, dx=2 x-25 x^3+10 x^5-x^7+\log (x)-\log (5+x) \]

[In]

Integrate[(5 + 10*x + 2*x^2 - 375*x^3 - 75*x^4 + 250*x^5 + 50*x^6 - 35*x^7 - 7*x^8)/(5*x + x^2),x]

[Out]

2*x - 25*x^3 + 10*x^5 - x^7 + Log[x] - Log[5 + x]

Maple [A] (verified)

Time = 0.19 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00

method result size
default \(-x^{7}+10 x^{5}-25 x^{3}+2 x +\ln \left (x \right )-\ln \left (5+x \right )\) \(28\)
norman \(-x^{7}+10 x^{5}-25 x^{3}+2 x +\ln \left (x \right )-\ln \left (5+x \right )\) \(28\)
risch \(-x^{7}+10 x^{5}-25 x^{3}+2 x +\ln \left (x \right )-\ln \left (5+x \right )\) \(28\)
parallelrisch \(-x^{7}+10 x^{5}-25 x^{3}+2 x +\ln \left (x \right )-\ln \left (5+x \right )\) \(28\)
meijerg \(\ln \left (x \right )-\ln \left (5\right )-\ln \left (1+\frac {x}{5}\right )-\frac {3125 x \left (\frac {24}{3125} x^{6}-\frac {28}{625} x^{5}+\frac {168}{625} x^{4}-\frac {42}{25} x^{3}+\frac {56}{5} x^{2}-84 x +840\right )}{24}+\frac {3125 x \left (-\frac {14}{625} x^{5}+\frac {84}{625} x^{4}-\frac {21}{25} x^{3}+\frac {28}{5} x^{2}-42 x +420\right )}{12}+\frac {3125 x \left (\frac {12}{625} x^{4}-\frac {3}{25} x^{3}+\frac {4}{5} x^{2}-6 x +60\right )}{6}-\frac {3125 x \left (-\frac {3}{25} x^{3}+\frac {4}{5} x^{2}-6 x +60\right )}{6}-\frac {625 x \left (\frac {4}{25} x^{2}-\frac {6}{5} x +12\right )}{4}+\frac {625 x \left (-\frac {3 x}{5}+6\right )}{2}+2 x\) \(142\)

[In]

int((-7*x^8-35*x^7+50*x^6+250*x^5-75*x^4-375*x^3+2*x^2+10*x+5)/(x^2+5*x),x,method=_RETURNVERBOSE)

[Out]

-x^7+10*x^5-25*x^3+2*x+ln(x)-ln(5+x)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.96 \[ \int \frac {5+10 x+2 x^2-375 x^3-75 x^4+250 x^5+50 x^6-35 x^7-7 x^8}{5 x+x^2} \, dx=-x^{7} + 10 \, x^{5} - 25 \, x^{3} + 2 \, x - \log \left (x + 5\right ) + \log \left (x\right ) \]

[In]

integrate((-7*x^8-35*x^7+50*x^6+250*x^5-75*x^4-375*x^3+2*x^2+10*x+5)/(x^2+5*x),x, algorithm="fricas")

[Out]

-x^7 + 10*x^5 - 25*x^3 + 2*x - log(x + 5) + log(x)

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.86 \[ \int \frac {5+10 x+2 x^2-375 x^3-75 x^4+250 x^5+50 x^6-35 x^7-7 x^8}{5 x+x^2} \, dx=- x^{7} + 10 x^{5} - 25 x^{3} + 2 x + \log {\left (x \right )} - \log {\left (x + 5 \right )} \]

[In]

integrate((-7*x**8-35*x**7+50*x**6+250*x**5-75*x**4-375*x**3+2*x**2+10*x+5)/(x**2+5*x),x)

[Out]

-x**7 + 10*x**5 - 25*x**3 + 2*x + log(x) - log(x + 5)

Maxima [A] (verification not implemented)

none

Time = 0.17 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.96 \[ \int \frac {5+10 x+2 x^2-375 x^3-75 x^4+250 x^5+50 x^6-35 x^7-7 x^8}{5 x+x^2} \, dx=-x^{7} + 10 \, x^{5} - 25 \, x^{3} + 2 \, x - \log \left (x + 5\right ) + \log \left (x\right ) \]

[In]

integrate((-7*x^8-35*x^7+50*x^6+250*x^5-75*x^4-375*x^3+2*x^2+10*x+5)/(x^2+5*x),x, algorithm="maxima")

[Out]

-x^7 + 10*x^5 - 25*x^3 + 2*x - log(x + 5) + log(x)

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.04 \[ \int \frac {5+10 x+2 x^2-375 x^3-75 x^4+250 x^5+50 x^6-35 x^7-7 x^8}{5 x+x^2} \, dx=-x^{7} + 10 \, x^{5} - 25 \, x^{3} + 2 \, x - \log \left ({\left | x + 5 \right |}\right ) + \log \left ({\left | x \right |}\right ) \]

[In]

integrate((-7*x^8-35*x^7+50*x^6+250*x^5-75*x^4-375*x^3+2*x^2+10*x+5)/(x^2+5*x),x, algorithm="giac")

[Out]

-x^7 + 10*x^5 - 25*x^3 + 2*x - log(abs(x + 5)) + log(abs(x))

Mupad [B] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.07 \[ \int \frac {5+10 x+2 x^2-375 x^3-75 x^4+250 x^5+50 x^6-35 x^7-7 x^8}{5 x+x^2} \, dx=2\,x-25\,x^3+10\,x^5-x^7+\mathrm {atan}\left (\frac {x\,2{}\mathrm {i}}{5}+1{}\mathrm {i}\right )\,2{}\mathrm {i} \]

[In]

int((10*x + 2*x^2 - 375*x^3 - 75*x^4 + 250*x^5 + 50*x^6 - 35*x^7 - 7*x^8 + 5)/(5*x + x^2),x)

[Out]

2*x + atan((x*2i)/5 + 1i)*2i - 25*x^3 + 10*x^5 - x^7