# Integral with ln

#### Yankel

##### Active member
Hello

I am struggling with this integral:

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

I tried integrating by parts (multiplying the integral by 1), however I got stuck with another integral I couldn't solve on the way

$\int \frac{1}{\sqrt{x}+1}dx$

Thanks !

#### MarkFL

Staff member
I would try a substitution involving the argument of the log function first, then integration by parts.

$$\displaystyle w=\sqrt{x}+1\,\therefore\,dx=2(w-1)\,dw$$

and we have:

$$\displaystyle I=2\int(w-1)\ln(w)\,dw$$

Integration by parts:

$$\displaystyle u=\ln(w)\,\therefore\,du=\frac{1}{w}\,dw$$

$$\displaystyle dv=(w-1)dw\,\therefore\,v=\frac{w^2}{2}-w=\frac{w(w-2)}{2}$$

$$\displaystyle I=2\left(\frac{w(w-2)}{2}\ln(w)-\frac{1}{2}\int w-2\,dw \right)$$

$$\displaystyle I=w(w-2)\ln(w)-\frac{1}{2}w^2+2w+C$$

Back-substitute for $w$:

$$\displaystyle w^2-2w=x-1$$

$$\displaystyle -\frac{1}{2}w^2+2w=-\frac{x}{2}+\sqrt{x}+\frac{3}{2}$$

Hence:

$$\displaystyle I=(x-1)\ln\left(\sqrt{x}+1 \right)-\frac{x}{2}+\sqrt{x}+C$$

#### mathworker

##### Well-known member
I think its better you do by parts first.Then you may arrive at $$\displaystyle \int\frac{\sqrt{x}}{\sqrt{x}+1}dx$$
Edit : made a mistake earlier,Okay may be thats what you have asked
[HR][/HR]
i would do it by letting,
\displaystyle \begin{align*}x&=t^2\\dx&=2tdt\end{align*}
so,
$$\displaystyle \int\frac{2t}{t+1}dt=2t-2\log(t+1)$$

Last edited:

#### MarkFL

Staff member
I think its better you do by parts first.Then you may arrive at $$\displaystyle \int\frac{\sqrt{x}}{\sqrt{x}+1}dx$$
Edit : made a mistake earlier
How do you arrive at this?

#### mathworker

##### Well-known member
$$\displaystyle \int\log\sqrt{x}+1dx=logx\int1dx-\int\frac{1}{\sqrt{x}+1}\frac{1}{2\sqrt{x}}xdx=x\log{x}-\frac{1}{2}\int\frac{\sqrt{x}}{\sqrt{x}+1}$$

#### Prove It

##### Well-known member
MHB Math Helper
Hello

I am struggling with this integral:

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

I tried integrating by parts (multiplying the integral by 1), however I got stuck with another integral I couldn't solve on the way

$\int \frac{1}{\sqrt{x}+1}dx$

Thanks !
\displaystyle \begin{align*} \int{ \ln{ \left( \sqrt{x} + 1 \right) } \, dx} &= \int{ 1 \cdot \ln{ \left( \sqrt{x} + 1 \right) } \, dx} \end{align*}

Now applying integration by parts with \displaystyle \begin{align*} u = \ln{ \left( \sqrt{x} + 1 \right) } \implies du = \frac{1}{2\sqrt{x} \, \left( \sqrt{x} + 1 \right) } \, dx \end{align*} and \displaystyle \begin{align*} dv = 1\, dx \implies v = x \end{align*} and the integral becomes

\displaystyle \begin{align*} \int{ 1 \cdot \ln{ \left( \sqrt{x} + 1 \right) } \, dx} &= x\ln{ \left( \sqrt{x} + 1 \right) } - \int{ \frac{x}{2\sqrt{x}\,\left( \sqrt{x} + 1 \right) } \, dx} \end{align*}

Now let \displaystyle \begin{align*} t = \sqrt{x} + 1 \implies dt = \frac{1}{2\sqrt{x}}\,dx \end{align*} and the integral becomes

\displaystyle \begin{align*} x\ln{ \left( \sqrt{x} + 1 \right) } - \int{ \frac{x}{2\sqrt{x}\,\left( \sqrt{x} + 1 \right) } \, dx} &= x\ln{ \left( \sqrt{x} + 1 \right) } - \int{ \frac{ (t - 1)^2 }{t} \,dt } \\ &= x\ln{ \left( \sqrt{x} + 1 \right) } - \int{ \frac{t^2 - 2t + 1}{t}\,dt} \\ &= x\ln{ \left( \sqrt{x} + 1 \right) } - \int{ t - 2 + \frac{1}{t} \, dt} \\ &= x\ln{ \left( \sqrt{x} + 1 \right) } - \left( \frac{t^2}{2} - 2t + \ln{|t|} \right) + C \\ &= x\ln{ \left( \sqrt{x} + 1 \right) } - \frac{t^2}{2} + 2t - \ln{|t|} + C \\ &= x\ln{ \left( \sqrt{x} + 1 \right) } - \frac{ \left( \sqrt{x} + 1 \right) ^2}{2} + 2 \left( \sqrt{x} + 1 \right) - \ln{ \left| \sqrt{x} + 1 \right| } + C \end{align*}