\(\int \frac {1}{x (1+x)} \, dx\) [221]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 9, antiderivative size = 9 \[ \int \frac {1}{x (1+x)} \, dx=\log (x)-\log (1+x) \]

[Out]

ln(x)-ln(1+x)

Rubi [A] (verified)

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

[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*} \text {integral}& = \int \frac {1}{x} \, dx-\int \frac {1}{1+x} \, dx \\ & = \log (x)-\log (1+x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.00 \[ \int \frac {1}{x (1+x)} \, dx=\log (x)-\log (1+x) \]

[In]

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

[Out]

Log[x] - Log[1 + x]

Maple [A] (verified)

Time = 0.09 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.11

method result size
default \(\ln \left (x \right )-\ln \left (1+x \right )\) \(10\)
norman \(\ln \left (x \right )-\ln \left (1+x \right )\) \(10\)
meijerg \(\ln \left (x \right )-\ln \left (1+x \right )\) \(10\)
risch \(\ln \left (x \right )-\ln \left (1+x \right )\) \(10\)
parallelrisch \(\ln \left (x \right )-\ln \left (1+x \right )\) \(10\)

[In]

int(1/x/(1+x),x,method=_RETURNVERBOSE)

[Out]

ln(x)-ln(1+x)

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.00 \[ \int \frac {1}{x (1+x)} \, dx=-\log \left (x + 1\right ) + \log \left (x\right ) \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.78 \[ \int \frac {1}{x (1+x)} \, dx=\log {\left (x \right )} - \log {\left (x + 1 \right )} \]

[In]

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

[Out]

log(x) - log(x + 1)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.00 \[ \int \frac {1}{x (1+x)} \, dx=-\log \left (x + 1\right ) + \log \left (x\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.22 \[ \int \frac {1}{x (1+x)} \, dx=-\log \left ({\left | x + 1 \right |}\right ) + \log \left ({\left | x \right |}\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.89 \[ \int \frac {1}{x (1+x)} \, dx=-\ln \left (\frac {1}{x}+1\right ) \]

[In]

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

[Out]

-log(1/x + 1)