3.440 \(\int \frac{2+4 x}{x^2+2 x^3+x^4} \, dx\)

Optimal. Leaf size=10 \[ -\frac{2}{x (x+1)} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0103235, antiderivative size = 10, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.15, Rules used = {1594, 27, 74} \[ -\frac{2}{x (x+1)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 1594

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 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 74

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]

Rubi steps

\begin{align*} \int \frac{2+4 x}{x^2+2 x^3+x^4} \, dx &=\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]  time = 0.005241, size = 9, normalized size = 0.9 \[ -\frac{2}{x^2+x} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-2/(x + x^2)

________________________________________________________________________________________

Maple [A]  time = 0.004, size = 14, normalized size = 1.4 \begin{align*} 2\, \left ( 1+x \right ) ^{-1}-2\,{x}^{-1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/(1+x)-2/x

________________________________________________________________________________________

Maxima [A]  time = 0.976928, size = 12, normalized size = 1.2 \begin{align*} -\frac{2}{x^{2} + x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/(x^2 + x)

________________________________________________________________________________________

Fricas [A]  time = 0.940711, size = 19, normalized size = 1.9 \begin{align*} -\frac{2}{x^{2} + x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/(x^2 + x)

________________________________________________________________________________________

Sympy [A]  time = 0.081098, size = 7, normalized size = 0.7 \begin{align*} - \frac{2}{x^{2} + x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/(x**2 + x)

________________________________________________________________________________________

Giac [A]  time = 1.10217, size = 12, normalized size = 1.2 \begin{align*} -\frac{2}{x^{2} + x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/(x^2 + x)