\(\int \frac {15+30 x+5 x^2+8 x^3+x^4-2 x^5}{x^2+2 x^3+x^4} \, dx\) [8575]

   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 = 38, antiderivative size = 29 \[ \int \frac {15+30 x+5 x^2+8 x^3+x^4-2 x^5}{x^2+2 x^3+x^4} \, dx=4+\left (1+e^4\right )^2-x^2+5 \left (-4+x-\frac {3}{x (1+x)}\right ) \]

[Out]

(exp(4)+1)^2+5*x-16-15/x/(1+x)-x^2

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.72, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.079, Rules used = {1608, 27, 1634} \[ \int \frac {15+30 x+5 x^2+8 x^3+x^4-2 x^5}{x^2+2 x^3+x^4} \, dx=-x^2+5 x+\frac {15}{x+1}-\frac {15}{x} \]

[In]

Int[(15 + 30*x + 5*x^2 + 8*x^3 + x^4 - 2*x^5)/(x^2 + 2*x^3 + x^4),x]

[Out]

-15/x + 5*x - x^2 + 15/(1 + 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 {15+30 x+5 x^2+8 x^3+x^4-2 x^5}{x^2 \left (1+2 x+x^2\right )} \, dx \\ & = \int \frac {15+30 x+5 x^2+8 x^3+x^4-2 x^5}{x^2 (1+x)^2} \, dx \\ & = \int \left (5+\frac {15}{x^2}-2 x-\frac {15}{(1+x)^2}\right ) \, dx \\ & = -\frac {15}{x}+5 x-x^2+\frac {15}{1+x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.72 \[ \int \frac {15+30 x+5 x^2+8 x^3+x^4-2 x^5}{x^2+2 x^3+x^4} \, dx=-\frac {15}{x}+5 x-x^2+\frac {15}{1+x} \]

[In]

Integrate[(15 + 30*x + 5*x^2 + 8*x^3 + x^4 - 2*x^5)/(x^2 + 2*x^3 + x^4),x]

[Out]

-15/x + 5*x - x^2 + 15/(1 + x)

Maple [A] (verified)

Time = 0.05 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.69

method result size
risch \(-x^{2}+5 x -\frac {15}{x \left (1+x \right )}\) \(20\)
default \(5 x -x^{2}-\frac {15}{x}+\frac {15}{1+x}\) \(22\)
gosper \(-\frac {x^{4}-4 x^{3}+5 x +15}{x \left (1+x \right )}\) \(24\)
parallelrisch \(-\frac {x^{4}-4 x^{3}+5 x +15}{x \left (1+x \right )}\) \(24\)
norman \(\frac {-x^{4}+4 x^{3}-5 x -15}{\left (1+x \right ) x}\) \(25\)

[In]

int((-2*x^5+x^4+8*x^3+5*x^2+30*x+15)/(x^4+2*x^3+x^2),x,method=_RETURNVERBOSE)

[Out]

-x^2+5*x-15/x/(1+x)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.83 \[ \int \frac {15+30 x+5 x^2+8 x^3+x^4-2 x^5}{x^2+2 x^3+x^4} \, dx=-\frac {x^{4} - 4 \, x^{3} - 5 \, x^{2} + 15}{x^{2} + x} \]

[In]

integrate((-2*x^5+x^4+8*x^3+5*x^2+30*x+15)/(x^4+2*x^3+x^2),x, algorithm="fricas")

[Out]

-(x^4 - 4*x^3 - 5*x^2 + 15)/(x^2 + x)

Sympy [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.41 \[ \int \frac {15+30 x+5 x^2+8 x^3+x^4-2 x^5}{x^2+2 x^3+x^4} \, dx=- x^{2} + 5 x - \frac {15}{x^{2} + x} \]

[In]

integrate((-2*x**5+x**4+8*x**3+5*x**2+30*x+15)/(x**4+2*x**3+x**2),x)

[Out]

-x**2 + 5*x - 15/(x**2 + x)

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.62 \[ \int \frac {15+30 x+5 x^2+8 x^3+x^4-2 x^5}{x^2+2 x^3+x^4} \, dx=-x^{2} + 5 \, x - \frac {15}{x^{2} + x} \]

[In]

integrate((-2*x^5+x^4+8*x^3+5*x^2+30*x+15)/(x^4+2*x^3+x^2),x, algorithm="maxima")

[Out]

-x^2 + 5*x - 15/(x^2 + x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.62 \[ \int \frac {15+30 x+5 x^2+8 x^3+x^4-2 x^5}{x^2+2 x^3+x^4} \, dx=-x^{2} + 5 \, x - \frac {15}{x^{2} + x} \]

[In]

integrate((-2*x^5+x^4+8*x^3+5*x^2+30*x+15)/(x^4+2*x^3+x^2),x, algorithm="giac")

[Out]

-x^2 + 5*x - 15/(x^2 + x)

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.66 \[ \int \frac {15+30 x+5 x^2+8 x^3+x^4-2 x^5}{x^2+2 x^3+x^4} \, dx=5\,x-\frac {15}{x\,\left (x+1\right )}-x^2 \]

[In]

int((30*x + 5*x^2 + 8*x^3 + x^4 - 2*x^5 + 15)/(x^2 + 2*x^3 + x^4),x)

[Out]

5*x - 15/(x*(x + 1)) - x^2