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) \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 36, normalized size of antiderivative = 1.00, 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 31

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

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

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.02, 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

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.02, size = 36, normalized size = 1.00 \[ \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]

IntegrateAlgebraic[(-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

________________________________________________________________________________________

fricas [A]  time = 1.13, size = 45, normalized size = 1.25 \[ -\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 )}} \]

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)

________________________________________________________________________________________

giac [A]  time = 0.98, size = 32, normalized size = 0.89 \[ \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 ) \]

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

________________________________________________________________________________________

maple [A]  time = 0.29, size = 28, normalized size = 0.78




method result size



default \(\frac {5}{9 \left (4+x \right )}-\frac {7 \ln \left (4+x \right )}{27}+\frac {2}{9 \left (1+x \right )}+\frac {7 \ln \left (1+x \right )}{27}\) \(28\)
norman \(\frac {\frac {7 x}{9}+\frac {13}{9}}{x^{2}+5 x +4}+\frac {7 \ln \left (1+x \right )}{27}-\frac {7 \ln \left (4+x \right )}{27}\) \(30\)
risch \(\frac {\frac {7 x}{9}+\frac {13}{9}}{x^{2}+5 x +4}+\frac {7 \ln \left (1+x \right )}{27}-\frac {7 \ln \left (4+x \right )}{27}\) \(30\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.65, size = 30, normalized size = 0.83 \[ \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 ) \]

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)

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 25, normalized size = 0.69 \[ \frac {\frac {7\,x}{9}+\frac {13}{9}}{x^2+5\,x+4}-\frac {14\,\mathrm {atanh}\left (\frac {2\,x}{3}+\frac {5}{3}\right )}{27} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((7*x)/9 + 13/9)/(5*x + x^2 + 4) - (14*atanh((2*x)/3 + 5/3))/27

________________________________________________________________________________________

sympy [A]  time = 0.13, size = 31, normalized size = 0.86 \[ \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} \]

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

________________________________________________________________________________________