3.221 \(\int \frac {1}{x (1+x)} \, dx\)

Optimal. Leaf size=9 \[ \log (x)-\log (x+1) \]

[Out]

ln(x)-ln(1+x)

________________________________________________________________________________________

Rubi [A]  time = 0.00, antiderivative size = 9, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {36, 29, 31} \[ \log (x)-\log (x+1) \]

Antiderivative was successfully verified.

[In]

Int[1/(x*(1 + x)),x]

[Out]

Log[x] - Log[1 + x]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

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

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rubi steps

\begin {align*} \int \frac {1}{x (1+x)} \, dx &=\int \frac {1}{x} \, dx-\int \frac {1}{1+x} \, dx\\ &=\log (x)-\log (1+x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 9, normalized size = 1.00 \[ \log (x)-\log (x+1) \]

Antiderivative was successfully verified.

[In]

Integrate[1/(x*(1 + x)),x]

[Out]

Log[x] - Log[1 + x]

________________________________________________________________________________________

fricas [A]  time = 0.41, size = 9, normalized size = 1.00 \[ -\log \left (x + 1\right ) + \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-log(x + 1) + log(x)

________________________________________________________________________________________

giac [A]  time = 1.16, size = 11, normalized size = 1.22 \[ -\log \left ({\left | x + 1 \right |}\right ) + \log \left ({\left | x \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x/(1+x),x, algorithm="giac")

[Out]

-log(abs(x + 1)) + log(abs(x))

________________________________________________________________________________________

maple [A]  time = 0.00, size = 10, normalized size = 1.11 \[ \ln \relax (x )-\ln \left (x +1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/x/(x+1),x)

[Out]

ln(x)-ln(x+1)

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 9, normalized size = 1.00 \[ -\log \left (x + 1\right ) + \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-log(x + 1) + log(x)

________________________________________________________________________________________

mupad [B]  time = 0.20, size = 8, normalized size = 0.89 \[ -\ln \left (\frac {1}{x}+1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(x*(x + 1)),x)

[Out]

-log(1/x + 1)

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 7, normalized size = 0.78 \[ \log {\relax (x )} - \log {\left (x + 1 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x/(1+x),x)

[Out]

log(x) - log(x + 1)

________________________________________________________________________________________