3.3.58 \(\int (\log (x)+\log (1+x)+\log (2+x)) \, dx\) [258]

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

[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 = {2332, 2436} \begin {gather*} -3 x+x \log (x)+(x+1) \log (x+1)+(x+2) \log (x+2) \end {gather*}

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 2332

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

Rule 2436

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)+\text {Subst}(\int \log (x) \, dx,x,1+x)+\text {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.01, size = 30, normalized size = 1.25 \begin {gather*} -3 x+x \log (x)+\log (1+x)+x \log (1+x)+2 \log (2+x)+x \log (2+x) \end {gather*}

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]

________________________________________________________________________________________

Maple [A]
time = 0.01, size = 26, normalized size = 1.08

method result size
default \(-3 x +x \ln \left (x \right )+\left (1+x \right ) \ln \left (1+x \right )-3+\left (2+x \right ) \ln \left (2+x \right )\) \(26\)
risch \(-3 x +x \ln \left (x \right )+\ln \left (1+x \right ) x +\ln \left (1+x \right )+\ln \left (2+x \right ) x +2 \ln \left (2+x \right )\) \(31\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 2.42, size = 25, normalized size = 1.04 \begin {gather*} {\left (x + 2\right )} \log \left (x + 2\right ) + {\left (x + 1\right )} \log \left (x + 1\right ) + x \log \left (x\right ) - 3 \, x - 3 \end {gather*}

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

________________________________________________________________________________________

Fricas [A]
time = 0.77, size = 24, normalized size = 1.00 \begin {gather*} {\left (x + 2\right )} \log \left (x + 2\right ) + {\left (x + 1\right )} \log \left (x + 1\right ) + x \log \left (x\right ) - 3 \, x \end {gather*}

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

________________________________________________________________________________________

Sympy [A]
time = 0.69, size = 37, normalized size = 1.54 \begin {gather*} x \log {\left (x \right )} - 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 )} \end {gather*}

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)

________________________________________________________________________________________

Giac [A]
time = 0.46, size = 25, normalized size = 1.04 \begin {gather*} {\left (x + 2\right )} \log \left (x + 2\right ) + {\left (x + 1\right )} \log \left (x + 1\right ) + x \log \left (x\right ) - 3 \, x - 3 \end {gather*}

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

________________________________________________________________________________________

Mupad [B]
time = 0.44, size = 51, normalized size = 2.12 \begin {gather*} \ln \left (x+1\right )-3\,x+2\,\ln \left (x+2\right )+x\,\ln \left (x+1\right )+x\,\ln \left (x\right )+\frac {\ln \left (x+2\right )\,\left (x^3+3\,x^2+2\,x\right )}{\left (x+1\right )\,\left (x+2\right )} \end {gather*}

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))

________________________________________________________________________________________