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

Optimal. Leaf size=36 \[ \frac{7 x+13}{9 \left (x^2+5 x+4\right )}+\frac{7}{27} \log (x+1)-\frac{7}{27} \log (x+4) \]

[Out]

(13 + 7*x)/(9*(4 + 5*x + x^2)) + (7*Log[1 + x])/27 - (7*Log[4 + x])/27

________________________________________________________________________________________

Rubi [A]  time = 0.0079996, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {638, 616, 31} \[ \frac{7 x+13}{9 \left (x^2+5 x+4\right )}+\frac{7}{27} \log (x+1)-\frac{7}{27} \log (x+4) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(13 + 7*x)/(9*(4 + 5*x + x^2)) + (7*Log[1 + x])/27 - (7*Log[4 + x])/27

Rule 638

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

Rule 616

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/Simp
[b/2 - q/2 + c*x, x], x], x] - Dist[c/q, Int[1/Simp[b/2 + q/2 + c*x, x], x], x]] /; FreeQ[{a, b, c}, x] && NeQ
[b^2 - 4*a*c, 0] && PosQ[b^2 - 4*a*c] && PerfectSquareQ[b^2 - 4*a*c]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

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

Mathematica [A]  time = 0.0172021, size = 33, normalized size = 0.92 \[ \frac{1}{27} \left (\frac{21 x+39}{x^2+5 x+4}+7 \log (x+1)-7 \log (x+4)\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

((39 + 21*x)/(4 + 5*x + x^2) + 7*Log[1 + x] - 7*Log[4 + x])/27

________________________________________________________________________________________

Maple [A]  time = 0.008, size = 28, normalized size = 0.8 \begin{align*}{\frac{2}{9+9\,x}}+{\frac{7\,\ln \left ( 1+x \right ) }{27}}+{\frac{5}{36+9\,x}}-{\frac{7\,\ln \left ( 4+x \right ) }{27}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/9/(1+x)+7/27*ln(1+x)+5/9/(4+x)-7/27*ln(4+x)

________________________________________________________________________________________

Maxima [A]  time = 0.923678, size = 41, normalized size = 1.14 \begin{align*} \frac{7 \, x + 13}{9 \,{\left (x^{2} + 5 \, x + 4\right )}} - \frac{7}{27} \, \log \left (x + 4\right ) + \frac{7}{27} \, \log \left (x + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/9*(7*x + 13)/(x^2 + 5*x + 4) - 7/27*log(x + 4) + 7/27*log(x + 1)

________________________________________________________________________________________

Fricas [A]  time = 1.72885, size = 131, normalized size = 3.64 \begin{align*} -\frac{7 \,{\left (x^{2} + 5 \, x + 4\right )} \log \left (x + 4\right ) - 7 \,{\left (x^{2} + 5 \, x + 4\right )} \log \left (x + 1\right ) - 21 \, x - 39}{27 \,{\left (x^{2} + 5 \, x + 4\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/27*(7*(x^2 + 5*x + 4)*log(x + 4) - 7*(x^2 + 5*x + 4)*log(x + 1) - 21*x - 39)/(x^2 + 5*x + 4)

________________________________________________________________________________________

Sympy [A]  time = 0.113766, size = 31, normalized size = 0.86 \begin{align*} \frac{7 x + 13}{9 x^{2} + 45 x + 36} + \frac{7 \log{\left (x + 1 \right )}}{27} - \frac{7 \log{\left (x + 4 \right )}}{27} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(7*x + 13)/(9*x**2 + 45*x + 36) + 7*log(x + 1)/27 - 7*log(x + 4)/27

________________________________________________________________________________________

Giac [A]  time = 1.0542, size = 43, normalized size = 1.19 \begin{align*} \frac{7 \, x + 13}{9 \,{\left (x^{2} + 5 \, x + 4\right )}} - \frac{7}{27} \, \log \left ({\left | x + 4 \right |}\right ) + \frac{7}{27} \, \log \left ({\left | x + 1 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/9*(7*x + 13)/(x^2 + 5*x + 4) - 7/27*log(abs(x + 4)) + 7/27*log(abs(x + 1))