### 3.238 $$\int \log (1+x+\sqrt{1+x}) \, dx$$

Optimal. Leaf size=32 $-x+\sqrt{x+1}+x \log \left (x+\sqrt{x+1}+1\right )+\frac{1}{2} \log (x+1)$

[Out]

-x + Sqrt[1 + x] + Log[1 + x]/2 + x*Log[1 + x + Sqrt[1 + x]]

________________________________________________________________________________________

Rubi [A]  time = 0.205253, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 1, integrand size = 11, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.091, Rules used = {2548} $-x+\sqrt{x+1}+x \log \left (x+\sqrt{x+1}+1\right )+\frac{1}{2} \log (x+1)$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-x + Sqrt[1 + x] + Log[1 + x]/2 + x*Log[1 + x + Sqrt[1 + x]]

Rule 2548

Int[Log[u_], x_Symbol] :> Simp[x*Log[u], x] - Int[SimplifyIntegrand[(x*D[u, x])/u, x], x] /; InverseFunctionFr
eeQ[u, x]

Rubi steps

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

Mathematica [A]  time = 0.0138862, size = 38, normalized size = 1.19 $-x+\sqrt{x+1}-\log \left (\sqrt{x+1}+1\right )+(x+1) \log \left (x+\sqrt{x+1}+1\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-x + Sqrt[1 + x] - Log[1 + Sqrt[1 + x]] + (1 + x)*Log[1 + x + Sqrt[1 + x]]

________________________________________________________________________________________

Maple [A]  time = 0.005, size = 34, normalized size = 1.1 \begin{align*} \left ( 1+x \right ) \ln \left ( 1+x+\sqrt{1+x} \right ) -x-1+\sqrt{1+x}-\ln \left ( \sqrt{1+x}+1 \right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(1+x)*ln(1+x+(1+x)^(1/2))-x-1+(1+x)^(1/2)-ln((1+x)^(1/2)+1)

________________________________________________________________________________________

Maxima [A]  time = 1.06802, size = 45, normalized size = 1.41 \begin{align*}{\left (x + 1\right )} \log \left (x + \sqrt{x + 1} + 1\right ) - x + \sqrt{x + 1} - \log \left (\sqrt{x + 1} + 1\right ) - 1 \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x + 1)*log(x + sqrt(x + 1) + 1) - x + sqrt(x + 1) - log(sqrt(x + 1) + 1) - 1

________________________________________________________________________________________

Fricas [A]  time = 1.81003, size = 130, normalized size = 4.06 \begin{align*}{\left (x - 1\right )} \log \left (x + \sqrt{x + 1} + 1\right ) - x + \sqrt{x + 1} + \log \left (\sqrt{x + 1} + 1\right ) + 2 \, \log \left (\sqrt{x + 1}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 1.05152, size = 158, normalized size = 4.94 \begin{align*} \frac{x \sqrt{x + 1} \log{\left (x + \sqrt{x + 1} + 1 \right )}}{\sqrt{x + 1} + 1} - \frac{x \sqrt{x + 1}}{\sqrt{x + 1} + 1} + \frac{x \log{\left (x + \sqrt{x + 1} + 1 \right )}}{\sqrt{x + 1} + 1} - \frac{\sqrt{x + 1} \log{\left (\sqrt{x + 1} + 1 \right )}}{\sqrt{x + 1} + 1} + \frac{\sqrt{x + 1} \log{\left (x + \sqrt{x + 1} + 1 \right )}}{\sqrt{x + 1} + 1} - \frac{\log{\left (\sqrt{x + 1} + 1 \right )}}{\sqrt{x + 1} + 1} + \frac{\log{\left (x + \sqrt{x + 1} + 1 \right )}}{\sqrt{x + 1} + 1} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*sqrt(x + 1)*log(x + sqrt(x + 1) + 1)/(sqrt(x + 1) + 1) - x*sqrt(x + 1)/(sqrt(x + 1) + 1) + x*log(x + sqrt(x
+ 1) + 1)/(sqrt(x + 1) + 1) - sqrt(x + 1)*log(sqrt(x + 1) + 1)/(sqrt(x + 1) + 1) + sqrt(x + 1)*log(x + sqrt(x
+ 1) + 1)/(sqrt(x + 1) + 1) - log(sqrt(x + 1) + 1)/(sqrt(x + 1) + 1) + log(x + sqrt(x + 1) + 1)/(sqrt(x + 1) +
1)

________________________________________________________________________________________

Giac [A]  time = 1.31745, size = 45, normalized size = 1.41 \begin{align*}{\left (x + 1\right )} \log \left (x + \sqrt{x + 1} + 1\right ) - x + \sqrt{x + 1} - \log \left (\sqrt{x + 1} + 1\right ) - 1 \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x + 1)*log(x + sqrt(x + 1) + 1) - x + sqrt(x + 1) - log(sqrt(x + 1) + 1) - 1