### 3.177 $$\int \frac{-1+2 x+5 x^2}{(1+x+x^2)^4} \, dx$$

Optimal. Leaf size=11 $-\frac{x}{\left (x^2+x+1\right )^3}$

[Out]

-(x/(1 + x + x^2)^3)

________________________________________________________________________________________

Rubi [A]  time = 0.0076456, antiderivative size = 11, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 19, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.053, Rules used = {1588} $-\frac{x}{\left (x^2+x+1\right )^3}$

Antiderivative was successfully veriﬁed.

[In]

Int[(-1 + 2*x + 5*x^2)/(1 + x + x^2)^4,x]

[Out]

-(x/(1 + x + x^2)^3)

Rule 1588

Int[(Pp_)*(Qq_)^(m_.), x_Symbol] :> With[{p = Expon[Pp, x], q = Expon[Qq, x]}, Simp[(Coeff[Pp, x, p]*x^(p - q
+ 1)*Qq^(m + 1))/((p + m*q + 1)*Coeff[Qq, x, q]), x] /; NeQ[p + m*q + 1, 0] && EqQ[(p + m*q + 1)*Coeff[Qq, x,
q]*Pp, Coeff[Pp, x, p]*x^(p - q)*((p - q + 1)*Qq + (m + 1)*x*D[Qq, x])]] /; FreeQ[m, x] && PolyQ[Pp, x] && Pol
yQ[Qq, x] && NeQ[m, -1]

Rubi steps

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

Mathematica [A]  time = 0.0060935, size = 11, normalized size = 1. $-\frac{x}{\left (x^2+x+1\right )^3}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(-1 + 2*x + 5*x^2)/(1 + x + x^2)^4,x]

[Out]

-(x/(1 + x + x^2)^3)

________________________________________________________________________________________

Maple [A]  time = 0.047, size = 12, normalized size = 1.1 \begin{align*} -{\frac{x}{ \left ({x}^{2}+x+1 \right ) ^{3}}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int((5*x^2+2*x-1)/(x^2+x+1)^4,x)

[Out]

-x/(x^2+x+1)^3

________________________________________________________________________________________

Maxima [B]  time = 1.0292, size = 45, normalized size = 4.09 \begin{align*} -\frac{x}{x^{6} + 3 \, x^{5} + 6 \, x^{4} + 7 \, x^{3} + 6 \, x^{2} + 3 \, x + 1} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+2*x-1)/(x^2+x+1)^4,x, algorithm="maxima")

[Out]

-x/(x^6 + 3*x^5 + 6*x^4 + 7*x^3 + 6*x^2 + 3*x + 1)

________________________________________________________________________________________

Fricas [B]  time = 1.62136, size = 70, normalized size = 6.36 \begin{align*} -\frac{x}{x^{6} + 3 \, x^{5} + 6 \, x^{4} + 7 \, x^{3} + 6 \, x^{2} + 3 \, x + 1} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+2*x-1)/(x^2+x+1)^4,x, algorithm="fricas")

[Out]

-x/(x^6 + 3*x^5 + 6*x^4 + 7*x^3 + 6*x^2 + 3*x + 1)

________________________________________________________________________________________

Sympy [B]  time = 0.129674, size = 31, normalized size = 2.82 \begin{align*} - \frac{x}{x^{6} + 3 x^{5} + 6 x^{4} + 7 x^{3} + 6 x^{2} + 3 x + 1} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x**2+2*x-1)/(x**2+x+1)**4,x)

[Out]

-x/(x**6 + 3*x**5 + 6*x**4 + 7*x**3 + 6*x**2 + 3*x + 1)

________________________________________________________________________________________

Giac [A]  time = 1.26893, size = 15, normalized size = 1.36 \begin{align*} -\frac{x}{{\left (x^{2} + x + 1\right )}^{3}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+2*x-1)/(x^2+x+1)^4,x, algorithm="giac")

[Out]

-x/(x^2 + x + 1)^3