\(\int \frac {-49-140 x-29 x^2+19 x^3+2 x^4}{49 x+14 x^2+x^3} \, dx\) [7548]

   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 = 35, antiderivative size = 27 \[ \int \frac {-49-140 x-29 x^2+19 x^3+2 x^4}{49 x+14 x^2+x^3} \, dx=-13+x-x \left (3+\frac {4-x^2}{7+x}+\frac {\log (x)}{x}\right ) \]

[Out]

-13-(ln(x)/x+(-x^2+4)/(x+7)+3)*x+x

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.67, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.086, Rules used = {1608, 27, 1634} \[ \int \frac {-49-140 x-29 x^2+19 x^3+2 x^4}{49 x+14 x^2+x^3} \, dx=x^2-9 x-\frac {315}{x+7}-\log (x) \]

[In]

Int[(-49 - 140*x - 29*x^2 + 19*x^3 + 2*x^4)/(49*x + 14*x^2 + x^3),x]

[Out]

-9*x + x^2 - 315/(7 + x) - Log[x]

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 1608

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - 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 {-49-140 x-29 x^2+19 x^3+2 x^4}{x \left (49+14 x+x^2\right )} \, dx \\ & = \int \frac {-49-140 x-29 x^2+19 x^3+2 x^4}{x (7+x)^2} \, dx \\ & = \int \left (-9-\frac {1}{x}+2 x+\frac {315}{(7+x)^2}\right ) \, dx \\ & = -9 x+x^2-\frac {315}{7+x}-\log (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.67 \[ \int \frac {-49-140 x-29 x^2+19 x^3+2 x^4}{49 x+14 x^2+x^3} \, dx=-9 x+x^2-\frac {315}{7+x}-\log (x) \]

[In]

Integrate[(-49 - 140*x - 29*x^2 + 19*x^3 + 2*x^4)/(49*x + 14*x^2 + x^3),x]

[Out]

-9*x + x^2 - 315/(7 + x) - Log[x]

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.70

method result size
default \(x^{2}-9 x -\ln \left (x \right )-\frac {315}{x +7}\) \(19\)
risch \(x^{2}-9 x -\ln \left (x \right )-\frac {315}{x +7}\) \(19\)
norman \(\frac {x^{3}-2 x^{2}+126}{x +7}-\ln \left (x \right )\) \(22\)
parallelrisch \(-\frac {-x^{3}+x \ln \left (x \right )+2 x^{2}-126+7 \ln \left (x \right )}{x +7}\) \(28\)

[In]

int((2*x^4+19*x^3-29*x^2-140*x-49)/(x^3+14*x^2+49*x),x,method=_RETURNVERBOSE)

[Out]

x^2-9*x-ln(x)-315/(x+7)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.96 \[ \int \frac {-49-140 x-29 x^2+19 x^3+2 x^4}{49 x+14 x^2+x^3} \, dx=\frac {x^{3} - 2 \, x^{2} - {\left (x + 7\right )} \log \left (x\right ) - 63 \, x - 315}{x + 7} \]

[In]

integrate((2*x^4+19*x^3-29*x^2-140*x-49)/(x^3+14*x^2+49*x),x, algorithm="fricas")

[Out]

(x^3 - 2*x^2 - (x + 7)*log(x) - 63*x - 315)/(x + 7)

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.52 \[ \int \frac {-49-140 x-29 x^2+19 x^3+2 x^4}{49 x+14 x^2+x^3} \, dx=x^{2} - 9 x - \log {\left (x \right )} - \frac {315}{x + 7} \]

[In]

integrate((2*x**4+19*x**3-29*x**2-140*x-49)/(x**3+14*x**2+49*x),x)

[Out]

x**2 - 9*x - log(x) - 315/(x + 7)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.67 \[ \int \frac {-49-140 x-29 x^2+19 x^3+2 x^4}{49 x+14 x^2+x^3} \, dx=x^{2} - 9 \, x - \frac {315}{x + 7} - \log \left (x\right ) \]

[In]

integrate((2*x^4+19*x^3-29*x^2-140*x-49)/(x^3+14*x^2+49*x),x, algorithm="maxima")

[Out]

x^2 - 9*x - 315/(x + 7) - log(x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.70 \[ \int \frac {-49-140 x-29 x^2+19 x^3+2 x^4}{49 x+14 x^2+x^3} \, dx=x^{2} - 9 \, x - \frac {315}{x + 7} - \log \left ({\left | x \right |}\right ) \]

[In]

integrate((2*x^4+19*x^3-29*x^2-140*x-49)/(x^3+14*x^2+49*x),x, algorithm="giac")

[Out]

x^2 - 9*x - 315/(x + 7) - log(abs(x))

Mupad [B] (verification not implemented)

Time = 12.99 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.67 \[ \int \frac {-49-140 x-29 x^2+19 x^3+2 x^4}{49 x+14 x^2+x^3} \, dx=x^2-\ln \left (x\right )-\frac {315}{x+7}-9\,x \]

[In]

int(-(140*x + 29*x^2 - 19*x^3 - 2*x^4 + 49)/(49*x + 14*x^2 + x^3),x)

[Out]

x^2 - log(x) - 315/(x + 7) - 9*x