3.258 \(\int (\log (x)+\log (1+x)+\log (2+x)) \, dx\)

Optimal. Leaf size=24 \[ -3 x+x \log (x)+(x+1) \log (x+1)+(x+2) \log (x+2) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2295, 2389} \[ -3 x+x \log (x)+(x+1) \log (x+1)+(x+2) \log (x+2) \]

Antiderivative was successfully verified.

[In]

Int[Log[x] + Log[1 + x] + Log[2 + x],x]

[Out]

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

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rubi steps

\begin {align*} \int (\log (x)+\log (1+x)+\log (2+x)) \, dx &=\int \log (x) \, dx+\int \log (1+x) \, dx+\int \log (2+x) \, dx\\ &=-x+x \log (x)+\operatorname {Subst}(\int \log (x) \, dx,x,1+x)+\operatorname {Subst}(\int \log (x) \, dx,x,2+x)\\ &=-3 x+x \log (x)+(1+x) \log (1+x)+(2+x) \log (2+x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 30, normalized size = 1.25 \[ -3 x+x \log (x)+x \log (x+1)+x \log (x+2)+\log (x+1)+2 \log (x+2) \]

Antiderivative was successfully verified.

[In]

Integrate[Log[x] + Log[1 + x] + Log[2 + x],x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 24, normalized size = 1.00 \[ {\left (x + 2\right )} \log \left (x + 2\right ) + {\left (x + 1\right )} \log \left (x + 1\right ) + x \log \relax (x) - 3 \, x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 1.04, size = 25, normalized size = 1.04 \[ {\left (x + 2\right )} \log \left (x + 2\right ) + {\left (x + 1\right )} \log \left (x + 1\right ) + x \log \relax (x) - 3 \, x - 3 \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.00, size = 26, normalized size = 1.08 \[ x \ln \relax (x )-3 x +\left (x +1\right ) \ln \left (x +1\right )+\left (x +2\right ) \ln \left (x +2\right )-3 \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(x)+ln(x+1)+ln(x+2),x)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 25, normalized size = 1.04 \[ {\left (x + 2\right )} \log \left (x + 2\right ) + {\left (x + 1\right )} \log \left (x + 1\right ) + x \log \relax (x) - 3 \, x - 3 \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.44, size = 51, normalized size = 2.12 \[ \ln \left (x+1\right )-3\,x+2\,\ln \left (x+2\right )+x\,\ln \left (x+1\right )+x\,\ln \relax (x)+\frac {\ln \left (x+2\right )\,\left (x^3+3\,x^2+2\,x\right )}{\left (x+1\right )\,\left (x+2\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(x + 1) + log(x + 2) + log(x),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 1.20, size = 37, normalized size = 1.54 \[ x \log {\relax (x )} - 3 x + \left (x + \frac {1}{2}\right ) \log {\left (x + 1 \right )} + \left (x + 1\right ) \log {\left (x + 2 \right )} + \frac {\log {\left (x + 1 \right )}}{2} + \log {\left (x + 2 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________