\(\int \frac {2+4 x}{x^2+2 x^3+x^4} \, dx\) [440]

   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 = 20, antiderivative size = 10 \[ \int \frac {2+4 x}{x^2+2 x^3+x^4} \, dx=-\frac {2}{x (1+x)} \]

[Out]

-2/x/(1+x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {1608, 27, 75} \[ \int \frac {2+4 x}{x^2+2 x^3+x^4} \, dx=-\frac {2}{x (x+1)} \]

[In]

Int[(2 + 4*x)/(x^2 + 2*x^3 + x^4),x]

[Out]

-2/(x*(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 75

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[b*(c + d*x)^
(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2, 0] &
& EqQ[a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)), 0]

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]

Rubi steps \begin{align*} \text {integral}& = \int \frac {2+4 x}{x^2 \left (1+2 x+x^2\right )} \, dx \\ & = \int \frac {2+4 x}{x^2 (1+x)^2} \, dx \\ & = -\frac {2}{x (1+x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.90 \[ \int \frac {2+4 x}{x^2+2 x^3+x^4} \, dx=-\frac {2}{x+x^2} \]

[In]

Integrate[(2 + 4*x)/(x^2 + 2*x^3 + x^4),x]

[Out]

-2/(x + x^2)

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.10

method result size
gosper \(-\frac {2}{x \left (x +1\right )}\) \(11\)
norman \(-\frac {2}{x \left (x +1\right )}\) \(11\)
risch \(-\frac {2}{x \left (x +1\right )}\) \(11\)
parallelrisch \(-\frac {2}{x \left (x +1\right )}\) \(11\)
default \(-\frac {2}{x}+\frac {2}{x +1}\) \(14\)

[In]

int((4*x+2)/(x^4+2*x^3+x^2),x,method=_RETURNVERBOSE)

[Out]

-2/x/(x+1)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.90 \[ \int \frac {2+4 x}{x^2+2 x^3+x^4} \, dx=-\frac {2}{x^{2} + x} \]

[In]

integrate((2+4*x)/(x^4+2*x^3+x^2),x, algorithm="fricas")

[Out]

-2/(x^2 + x)

Sympy [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.70 \[ \int \frac {2+4 x}{x^2+2 x^3+x^4} \, dx=- \frac {2}{x^{2} + x} \]

[In]

integrate((2+4*x)/(x**4+2*x**3+x**2),x)

[Out]

-2/(x**2 + x)

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.90 \[ \int \frac {2+4 x}{x^2+2 x^3+x^4} \, dx=-\frac {2}{x^{2} + x} \]

[In]

integrate((2+4*x)/(x^4+2*x^3+x^2),x, algorithm="maxima")

[Out]

-2/(x^2 + x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.90 \[ \int \frac {2+4 x}{x^2+2 x^3+x^4} \, dx=-\frac {2}{x^{2} + x} \]

[In]

integrate((2+4*x)/(x^4+2*x^3+x^2),x, algorithm="giac")

[Out]

-2/(x^2 + x)

Mupad [B] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00 \[ \int \frac {2+4 x}{x^2+2 x^3+x^4} \, dx=-\frac {2}{x\,\left (x+1\right )} \]

[In]

int((4*x + 2)/(x^2 + 2*x^3 + x^4),x)

[Out]

-2/(x*(x + 1))