3.1.6 \(\int \frac {1}{(-1+x) x (1+x)^2} \, dx\) [6]

Optimal. Leaf size=32 \[ -\frac {1}{2 (1+x)}+\frac {1}{4} \log (1-x)-\log (x)+\frac {3}{4} \log (1+x) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {84} \begin {gather*} -\frac {1}{2 (x+1)}+\frac {1}{4} \log (1-x)-\log (x)+\frac {3}{4} \log (x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 84

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 28, normalized size = 0.88 \begin {gather*} \frac {1}{4} \left (-\frac {2}{1+x}+\log (1-x)-4 \log (x)+3 \log (1+x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Mathics [A]
time = 1.76, size = 28, normalized size = 0.88 \begin {gather*} \frac {-2+\left (1+x\right ) \left (\text {Log}\left [-1+x\right ]-4 \text {Log}\left [x\right ]+3 \text {Log}\left [1+x\right ]\right )}{4+4 x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-2 + (1 + x) (Log[-1 + x] - 4 Log[x] + 3 Log[1 + x])) / (4 (1 + x))

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 25, normalized size = 0.78

method result size
default \(-\ln \left (x \right )+\frac {\ln \left (-1+x \right )}{4}-\frac {1}{2 \left (1+x \right )}+\frac {3 \ln \left (1+x \right )}{4}\) \(25\)
norman \(-\ln \left (x \right )+\frac {\ln \left (-1+x \right )}{4}-\frac {1}{2 \left (1+x \right )}+\frac {3 \ln \left (1+x \right )}{4}\) \(25\)
risch \(-\ln \left (x \right )+\frac {\ln \left (-1+x \right )}{4}-\frac {1}{2 \left (1+x \right )}+\frac {3 \ln \left (1+x \right )}{4}\) \(25\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 24, normalized size = 0.75 \begin {gather*} -\frac {1}{2 \, {\left (x + 1\right )}} + \frac {3}{4} \, \log \left (x + 1\right ) + \frac {1}{4} \, \log \left (x - 1\right ) - \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.33, size = 33, normalized size = 1.03 \begin {gather*} \frac {3 \, {\left (x + 1\right )} \log \left (x + 1\right ) + {\left (x + 1\right )} \log \left (x - 1\right ) - 4 \, {\left (x + 1\right )} \log \left (x\right ) - 2}{4 \, {\left (x + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.08, size = 24, normalized size = 0.75 \begin {gather*} - \log {\left (x \right )} + \frac {\log {\left (x - 1 \right )}}{4} + \frac {3 \log {\left (x + 1 \right )}}{4} - \frac {1}{2 x + 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.00, size = 32, normalized size = 1.00 \begin {gather*} -\ln \left |x\right |+\frac {\ln \left |x-1\right |}{4}+\frac {3}{4} \ln \left |x+1\right |-\frac {\frac {1}{4}\cdot 2}{x+1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-1+x)/x/(1+x)^2,x)

[Out]

-1/2/(x + 1) + 3/4*log(abs(x + 1)) + 1/4*log(abs(x - 1)) - log(abs(x))

________________________________________________________________________________________

Mupad [B]
time = 0.03, size = 26, normalized size = 0.81 \begin {gather*} \frac {\ln \left (x-1\right )}{4}+\frac {3\,\ln \left (x+1\right )}{4}-\ln \left (x\right )-\frac {1}{2\,\left (x+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________