# How to compute $\int{\ln(\sqrt{x}+\sqrt{x+1})dx}$?

The integral I am trying to work out is

$$\int{\ln(\sqrt{x}+\sqrt{x+1})dx}$$

So first step is substitute $u=x+1$: $$\int{\ln(\sqrt{u-1}+\sqrt{u})du}.$$

Now substitute $u=\cos^2(t)$. $\int{-\ln(\sqrt{-\sin^2(t)}+\sqrt{\cos^2(t)})2\sin(t)\cos(t)dt}$. This works out to $\int{-\ln(\cos(t)+i\sin(t))\sin(2t)dt}$. Remarkably, we obtain $\int{-\ln(e^{it})\sin(2t)dt}$ using Euler's identity.

Now we have $\int{-it\sin(2t)dt}$ and filling in reverse substitution $t=\arccos(\sqrt{x+1})$ after performing partial integration eventually yields me $0.5i\arccos(\sqrt{x+1})(2x+1)+0.5\sqrt{x^2+x}$.

I tried it on wolfram alpha and it gave a different result with hyperbolic functions. So that was not too useful to check this answer with. I feel this is not the right answer due to the imaginary inverse cosine factor. Where did it go wrong?

Here is a solution not working with hyperbolic functions. Now updated with some more details.

Integrating by parts, and using that (by the chain rule, and writing the expression inside square brackets on common denominator) \begin{aligned} D\log(\sqrt{x}+\sqrt{x+1})&=\frac{1}{\sqrt{x}+\sqrt{x+1}}D\bigl(\sqrt{x}+\sqrt{x+1}\bigr)\\ &= \frac{1}{\sqrt{x}+\sqrt{x+1}}\Bigl[\frac{1}{2\sqrt{x}}+\frac{1}{2\sqrt{x+1}}\Bigr]\\ &=\frac{1}{\sqrt{x}+\sqrt{x+1}}\frac{\sqrt{x+1}+\sqrt{x}}{2\sqrt{x}\sqrt{x+1}}\\ &=\frac{1}{2\sqrt{x}\sqrt{x+1}}, \end{aligned} we find that $$\int \log(\sqrt{x}+\sqrt{x+1})\,dx=x\log(\sqrt{x}+\sqrt{x+1})-\int \frac{\sqrt{x}}{2\sqrt{x+1}}\,dx$$ Then, integrating by parts again, rewriting, splitting, and using the derivative on top, \begin{aligned} \int \frac{\sqrt{x}}{2\sqrt{x+1}}\,dx&=\sqrt{x}\sqrt{x+1}-\int \frac{\sqrt{x+1}}{2\sqrt{x}}\,dx\\ &=\sqrt{x}\sqrt{x+1}-\int\frac{x+1}{2\sqrt{x}\sqrt{x+1}}\,dx\\ &=\sqrt{x}\sqrt{x+1}-\int\frac{\sqrt{x}}{2\sqrt{x+1}}\,dx-\log(\sqrt{x}+\sqrt{x+1}). \end{aligned} Moving the integral to the left-hand side, we find that $$\int \frac{\sqrt{x}}{2\sqrt{x+1}}\,dx=\frac{1}{2}\sqrt{x}\sqrt{x+1}-\frac{1}{2}\log(\sqrt{x}+\sqrt{x+1}),$$ and so, finally, one primitive is given by $$\int\log(\sqrt{x}+\sqrt{x+1})\,dx = \Bigl(x+\frac{1}{2}\Bigr)\log(\sqrt{x}+\sqrt{x+1})-\frac{1}{2}\sqrt{x}\sqrt{x+1}.$$

• Could you justify your first step, the fact, and your last step? I cant really follow them. But it seems like a nice solution! Sep 10, 2015 at 9:09
• I have now added some details on the differentiation. About the last step, I don't know what is the problem, so I don't know what to change... Sep 10, 2015 at 10:07
• Well I dont get what you mean with one primitive is given by Sep 12, 2015 at 15:03
• I only mean that to get all different primitives, one should add a constant. Sep 12, 2015 at 19:55
• Right i see, thanks man. I like your solution Sep 12, 2015 at 19:57

HINT...The integral is equivalent to $$I=\int\operatorname{arsinh} \sqrt{x}dx$$ Therefore it would make sense to deal with hyperbolic functions here. You could start with the substitution $$\sqrt{x}=\sinh u$$ This would give $$I=\int u\sinh 2udu$$ This can be done by parts.

• Thanks, but honestly I am not familiar with hyperbolic functions yet... Sep 9, 2015 at 15:27
• Btw how do you get the large integral sign? I only get small ones Sep 9, 2015 at 15:42
• OK. What about trying the substitution $x=\tan^2\theta$? it's a bit messy but it works. For mathjax, see meta.math.stackexchange.com/questions/5020/… Sep 9, 2015 at 15:45
• @user209347: A quick way is to click the "edit" button and observe the differences. Sep 9, 2015 at 15:46

In fact, $u\ge 1$ in your integral (due to $\sqrt{u-1}$ present). So the substitution $u = \cos^2 t$ is not possible. However, you can use the hyperbolic substitution $u = \cosh t$ (of $x = \sinh t$ immediately) to get the same result as Walpha.

• Wow that is a sharp observation! I guess that was the reason it did not work? But I can allow negative roots right, with the complex domain? Sep 9, 2015 at 15:12
• @user209347 Sometimes yes, you "can". But note that when making substitutions like the one you've made, you are changing the domain of integration to something very different, lying in the complex plain. That usually requires some additional reasoning. Sep 9, 2015 at 15:14
• So is the answer i got like an extension of walpha integral to the complex plane? That sounds weird but cool Sep 9, 2015 at 15:25
• @avid19: I've seen someone refer to it as Wolfie which gives it a canine appeal, but Walpha does have a nice ring to it. :) Sep 9, 2015 at 15:44
• @TitoPiezasIII, Walpha sounds like alpha wolf, very cool. Wolfie? Nah. Sep 9, 2015 at 15:51

Recall that $$\sinh t =\frac{e^t-e^{-t}}{2}\text{, and } \cosh t =\frac{e^t+e^{-t}}{2}$$ Now note that \begin{align} \cosh^2 t -\sinh^2 t&=\Big(\frac{e^t+e^{-t}}{2}\Big)^2-\Big(\frac{e^t+e^{-t}}{2}\Big)^2\\ &=\frac{e^{2t}+e^{-2t}+2}{2^2}-\frac{e^{2t}+e^{-2t}-2}{2^2}\\ &=\frac{2+2}{2^2}=1 \end{align} Hence if in your integral you choose $x=\sinh ^2 t$ you get \begin{align}\sqrt x + \sqrt{x+1}&=\sinh t + \sqrt{\sinh^2t+1}\\ &=\sinh t + \sqrt{\cosh^2t}\\ &=\sinh t + \cosh t\\ &=\frac{e^t-e^{-t}}{2}+\frac{e^t+e^{-t}}{2}\\ &=e^t \end{align} .. this, hopefully, clarifies things for you.