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

Optimal. Leaf size=30 $\frac{1}{5 (1-x)}-\frac{1}{25} \log (1-x)+\frac{1}{25} \log (x+4)$

[Out]

1/(5*(1 - x)) - Log[1 - x]/25 + Log[4 + x]/25

________________________________________________________________________________________

Rubi [A]  time = 0.009743, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 11, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.091, Rules used = {44} $\frac{1}{5 (1-x)}-\frac{1}{25} \log (1-x)+\frac{1}{25} \log (x+4)$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

1/(5*(1 - x)) - Log[1 - x]/25 + Log[4 + x]/25

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rubi steps

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

Mathematica [A]  time = 0.0072473, size = 22, normalized size = 0.73 $\frac{1}{25} \left (-\frac{5}{x-1}-\log (x-1)+\log (x+4)\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(-5/(-1 + x) - Log[-1 + x] + Log[4 + x])/25

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 21, normalized size = 0.7 \begin{align*} -{\frac{1}{-5+5\,x}}-{\frac{\ln \left ( -1+x \right ) }{25}}+{\frac{\ln \left ( 4+x \right ) }{25}} \end{align*}

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

[In]

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

[Out]

-1/5/(-1+x)-1/25*ln(-1+x)+1/25*ln(4+x)

________________________________________________________________________________________

Maxima [A]  time = 0.928554, size = 27, normalized size = 0.9 \begin{align*} -\frac{1}{5 \,{\left (x - 1\right )}} + \frac{1}{25} \, \log \left (x + 4\right ) - \frac{1}{25} \, \log \left (x - 1\right ) \end{align*}

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

[In]

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

[Out]

-1/5/(x - 1) + 1/25*log(x + 4) - 1/25*log(x - 1)

________________________________________________________________________________________

Fricas [A]  time = 1.93085, size = 81, normalized size = 2.7 \begin{align*} \frac{{\left (x - 1\right )} \log \left (x + 4\right ) -{\left (x - 1\right )} \log \left (x - 1\right ) - 5}{25 \,{\left (x - 1\right )}} \end{align*}

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

[In]

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

[Out]

1/25*((x - 1)*log(x + 4) - (x - 1)*log(x - 1) - 5)/(x - 1)

________________________________________________________________________________________

Sympy [A]  time = 0.103599, size = 19, normalized size = 0.63 \begin{align*} - \frac{\log{\left (x - 1 \right )}}{25} + \frac{\log{\left (x + 4 \right )}}{25} - \frac{1}{5 x - 5} \end{align*}

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

[In]

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

[Out]

-log(x - 1)/25 + log(x + 4)/25 - 1/(5*x - 5)

________________________________________________________________________________________

Giac [A]  time = 1.05186, size = 28, normalized size = 0.93 \begin{align*} -\frac{1}{5 \,{\left (x - 1\right )}} + \frac{1}{25} \, \log \left ({\left | -\frac{5}{x - 1} - 1 \right |}\right ) \end{align*}

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

[In]

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

[Out]

-1/5/(x - 1) + 1/25*log(abs(-5/(x - 1) - 1))