3.161 \(\int \frac{1}{(-1+x)^2 (1+x)^3} \, dx\)

Optimal. Leaf size=36 \[ \frac{1}{8 (1-x)}-\frac{1}{4 (x+1)}-\frac{1}{8 (x+1)^2}+\frac{3}{8} \tanh ^{-1}(x) \]

[Out]

1/(8*(1 - x)) - 1/(8*(1 + x)^2) - 1/(4*(1 + x)) + (3*ArcTanh[x])/8

________________________________________________________________________________________

Rubi [A]  time = 0.0151888, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {44, 207} \[ \frac{1}{8 (1-x)}-\frac{1}{4 (x+1)}-\frac{1}{8 (x+1)^2}+\frac{3}{8} \tanh ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

1/(8*(1 - x)) - 1/(8*(1 + x)^2) - 1/(4*(1 + x)) + (3*ArcTanh[x])/8

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

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rubi steps

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

Mathematica [A]  time = 0.0212087, size = 38, normalized size = 1.06 \[ \frac{1}{16} \left (\frac{-6 x^2-6 x+4}{(x-1) (x+1)^2}-3 \log (x-1)+3 \log (x+1)\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

((4 - 6*x - 6*x^2)/((-1 + x)*(1 + x)^2) - 3*Log[-1 + x] + 3*Log[1 + x])/16

________________________________________________________________________________________

Maple [A]  time = 0.008, size = 35, normalized size = 1. \begin{align*} -{\frac{1}{8\, \left ( 1+x \right ) ^{2}}}-{\frac{1}{4+4\,x}}+{\frac{3\,\ln \left ( 1+x \right ) }{16}}-{\frac{1}{-8+8\,x}}-{\frac{3\,\ln \left ( -1+x \right ) }{16}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/8/(1+x)^2-1/4/(1+x)+3/16*ln(1+x)-1/8/(-1+x)-3/16*ln(-1+x)

________________________________________________________________________________________

Maxima [A]  time = 0.935295, size = 51, normalized size = 1.42 \begin{align*} -\frac{3 \, x^{2} + 3 \, x - 2}{8 \,{\left (x^{3} + x^{2} - x - 1\right )}} + \frac{3}{16} \, \log \left (x + 1\right ) - \frac{3}{16} \, \log \left (x - 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/8*(3*x^2 + 3*x - 2)/(x^3 + x^2 - x - 1) + 3/16*log(x + 1) - 3/16*log(x - 1)

________________________________________________________________________________________

Fricas [B]  time = 1.98701, size = 155, normalized size = 4.31 \begin{align*} -\frac{6 \, x^{2} - 3 \,{\left (x^{3} + x^{2} - x - 1\right )} \log \left (x + 1\right ) + 3 \,{\left (x^{3} + x^{2} - x - 1\right )} \log \left (x - 1\right ) + 6 \, x - 4}{16 \,{\left (x^{3} + x^{2} - x - 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/16*(6*x^2 - 3*(x^3 + x^2 - x - 1)*log(x + 1) + 3*(x^3 + x^2 - x - 1)*log(x - 1) + 6*x - 4)/(x^3 + x^2 - x -
 1)

________________________________________________________________________________________

Sympy [A]  time = 0.125333, size = 41, normalized size = 1.14 \begin{align*} - \frac{3 x^{2} + 3 x - 2}{8 x^{3} + 8 x^{2} - 8 x - 8} - \frac{3 \log{\left (x - 1 \right )}}{16} + \frac{3 \log{\left (x + 1 \right )}}{16} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(3*x**2 + 3*x - 2)/(8*x**3 + 8*x**2 - 8*x - 8) - 3*log(x - 1)/16 + 3*log(x + 1)/16

________________________________________________________________________________________

Giac [A]  time = 1.05106, size = 58, normalized size = 1.61 \begin{align*} -\frac{1}{8 \,{\left (x - 1\right )}} + \frac{\frac{12}{x - 1} + 5}{32 \,{\left (\frac{2}{x - 1} + 1\right )}^{2}} + \frac{3}{16} \, \log \left ({\left | -\frac{2}{x - 1} - 1 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/8/(x - 1) + 1/32*(12/(x - 1) + 5)/(2/(x - 1) + 1)^2 + 3/16*log(abs(-2/(x - 1) - 1))