Calculate $\int_0^\infty \frac{\ln x}{\sqrt{x}(x+1)} \, \mathrm{d}x$ Calculate $$\int_0^\infty \frac{\ln x}{\sqrt{x}(x+1)} \, \mathrm{d}x$$
My try:
We will use pacman style path.
in the pacman there is only a single singularity
the outer path of the pacman is:
$$ \lim_{R\rightarrow\infty} \oint_{\lim C} \frac{\ln Re^{i\theta}} {\sqrt{R}e^{\theta i}(Re^{\theta i}+1)} \, \mathrm{d} \theta=0.$$
now we have the "inside the pacman" which contains only a removable singularity.
therefore:
\begin{align}
& \oint\limits_\text{pacman} \frac{\ln x}{\sqrt{x}(x+1)} \, dx \\[8pt]
= {} & \lim_{R\rightarrow\infty} \oint_C \frac{\ln Re^{i\theta}}{\sqrt{R} e^{\theta i}(Re^{\theta i}+1)} \, d\theta + \oint_\varepsilon \frac{\ln Re^{i\theta}}{\sqrt{R}e^{\theta i}(Re^{\theta i}+1)} \, d\theta + 2\oint_\varepsilon^\infty \frac{i\ln e^{\theta}}{Re^{\frac{\theta i}{2}}(e^{\theta i}R+1)} \, dR\\[8pt]
0 = {} & 0+0+2\oint_\varepsilon^\infty \frac{i\ln e^\theta}{Re^{\frac{\theta i}{2}}(e^{\theta i}R+1)} \, dR\\[8pt]
& \lim_{\varepsilon\rightarrow0} 2 \oint_\varepsilon^\infty \frac{x}{\sqrt{(x)}(x+1)} \, dR = 2\oint_0^\infty \frac{x}{\sqrt{(x)}(x+1)} \, dx=0\\[8pt]
& \oint_0^\infty \frac{x}{\sqrt{(x)}(x+1)} \, dx=0
\end{align}
 A: An alternative approach, to verify you got the right answer: with $u=\ln x$ your integral becomes$$\int_{\Bbb R}\frac{ue^{-u/2}}{1+e^{-u}}\mathrm{d}u,$$which has odd integrand, so is $0$ provided$$\int_0^\infty\frac{ue^{-u/2}}{1+e^{-u}}\mathrm{d}u$$is finite. Indeed, the latter integral has upper bound $\displaystyle \int_0^\infty ue^{-u/2}\mathrm{d}u=4$.
A: Your computation is wrong as you didn't used the correct branch of the complex logarithm for a pacman-like contour, that is, if we define the contour $\Gamma (r,R,\epsilon )$ by

then we need to use the branch of the logarithm such that $\arg(z)\in[0,2\pi)$ instead of the usual one where $\arg(z)\in(-\pi,\pi]$, then for $r,R,\epsilon >0$ we find that
$$
\begin{align*}
\int_{\Gamma (r,R,\epsilon )}f(z)\mathop{}\!d z&=\lim_{\epsilon \to 0^+}\int_{\Gamma (r,R,\epsilon )}f(z)\mathop{}\!d z\\
&=\int_{0}^{2\pi} f(Re^{i\theta })d(Re^{i\theta })+\int_{0}^{2\pi} f(re^{i\theta })d(re^{i\theta })+\int_{r}^R f(x)\mathop{}\!d x-\int_{r}^{R}\lim_{\epsilon \to 0^+}f(x-i\epsilon )d(x- i \epsilon )
\end{align*}
$$
for $f(z):=\frac{\ln z}{z^{1/2}(1+z)}$, then from the chosen branch of the logarithm we have that $\lim_{\epsilon \to 0^+}f(x-i\epsilon )=\frac{\ln x+2\pi i}{-\sqrt{x}(1+x)}$, and for $R>1$ we have that
$$
\left| \int_{0}^{2\pi} f(Re^{i\theta })d(Re^{i\theta }) \right|\leqslant 2\pi \sqrt R\frac{\ln R+2\pi}{R-1}\to 0\quad \text{ as }R\to \infty 
$$
Similarly for $r\in(0,1)$ we have that
$$
\left| \int_{0}^{2\pi} f(re^{i\theta })d(re^{i\theta }) \right|\leqslant 2\pi \sqrt r(\ln r+2\pi)\to 0\quad \text{ as }r\to 0^+
$$
Also from the residue theory we have that
$$
\int_{\Gamma (r,R,\epsilon )}f(z)\mathop{}\!d z=2\pi i\operatorname{Res}(f,-1)=2\pi^2 i\quad \text{ when }0<r<1<R
$$
Putting all together we have that
$$
2\pi^2 i=\int_{0}^{\infty }\frac{2\ln x+2\pi i}{\sqrt{x}(1+x)}\mathop{}\!d x\\ \therefore\quad \int_{0}^{\infty }\frac{\ln x}{\sqrt{x}(1+x)}\mathop{}\!d x=0\quad  \text{ and }\quad \int_{0}^{\infty }\frac1{\sqrt{x}(1+x)}\mathop{}\!d x=\pi
$$
∎
