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

   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 = 11, antiderivative size = 11 \[ \int \frac {1}{(1+x) (2+x)} \, dx=\log (1+x)-\log (2+x) \]

[Out]

ln(1+x)-ln(2+x)

Rubi [A] (verified)

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

[In]

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

[Out]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

Log[1 + x] - Log[2 + x]

Maple [A] (verified)

Time = 0.14 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.09

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

[In]

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

[Out]

ln(1+x)-ln(2+x)

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.73 \[ \int \frac {1}{(1+x) (2+x)} \, dx=\log {\left (x + 1 \right )} - \log {\left (x + 2 \right )} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.18 \[ \int \frac {1}{(1+x) (2+x)} \, dx=-\log \left ({\left | x + 2 \right |}\right ) + \log \left ({\left | x + 1 \right |}\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.91 \[ \int \frac {1}{(1+x) (2+x)} \, dx=\ln \left (1-\frac {1}{x+2}\right ) \]

[In]

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

[Out]

log(1 - 1/(x + 2))