contour integration of a function with two branch points .

To evaluate the integral using contour integration, consider the integral

$$\oint_C dz \frac{z^{-p} \log{(1+z)}}{1+z} $$

where $C$ is the following contour:

enter image description here

The magnitude of the integral about the large arc of radius $R$ behaves as $\frac{\log{R}}{R^p}$ as $R \to \infty$ and thus vanishes. Let the radius of the small circular arcs be $\epsilon$. The contour integral is then equal to, in this limit,

$$\left (1-e^{-i 2 \pi p} \right ) \int_0^{\infty} dx \frac{x^{-p} \log{(1+x)}}{1+x} - e^{-i \pi p}\int_{\infty}^{1+\epsilon} dx \frac{x^{-p} [\log{(x-1)}+i \pi]}{1-x} \\ - e^{-i \pi p}\int_{1+\epsilon}^{\infty} dx \frac{x^{-p} [\log{(x-1)}-i \pi]}{1-x}+i \epsilon \int_{\pi}^{-\pi} d\phi \,e^{i \phi} \frac{(e^{i \pi}+\epsilon e^{i \phi})^{-p} \log{(\epsilon e^{i \phi})}}{\epsilon e^{i \phi}}$$

The first integral represents the integral about the branch cut along the positive real axis, which concerns the $z^{-p}$ term only. Note that the integral about the origin vanishes as $\epsilon \to 0$. The second and third integrals represent the integrals along each side of the branch cut on the negative axis. Note that, along this branch cut, the argument of $z^{-p}$ is $-\pi p$ on either side of the branch cut, as the branch cut there concerns the log term only. The fourth integral is the integral about the branch point $z=-1$.

By Cauchy's theorem, the contour integral is zero. Thus, we have

$$\left (1-e^{-i 2 \pi p} \right ) \int_0^{\infty} dx \frac{x^{-p} \log{(1+x)}}{1+x} = i 2 \pi \, e^{-i \pi p} \int_{1+\epsilon}^{\infty} dx \frac{x^{-p}}{x-1} + i e^{-i \pi p} \int_{-\pi}^{\pi} d\phi \left ( \log{\epsilon} + i \phi \right )$$

Note that

$$\begin{align}\int_{1+\epsilon}^{\infty} dx \frac{x^{-p}}{x-1} &= \int_0^{1-\epsilon} dx \frac{x^{p-1}}{1-x} + O(\epsilon) \end{align} $$

and

$$\begin{align}\int_0^{1-\epsilon} dx \frac{x^{p-1}}{1-x} &= \int_0^{1-\epsilon} dx \, x^p \left (\frac1x + \frac1{1-x} \right ) \\ &= \frac1p (1-\epsilon)^p - \left [\log{(1-x)} x^p \right ]_0^{1-\epsilon} + p \int_0^{1-\epsilon} dx \, x^{p-1} \log{(1-x)}\\ &= \frac1p - \log{\epsilon} + p \int_0^1 dx \, x^{p-1} \log{(1-x)} + O(\epsilon)\\ &= \frac1p - \log{\epsilon} - p \sum_{k=1}^{\infty} \frac1{k (k+p)}+ O(\epsilon) \\ &= \frac1p - \log{\epsilon}-\gamma -\psi(1+p)+ O(\epsilon) \\ &= - \log{\epsilon} - (\gamma + \psi(p))+ O(\epsilon) \end{align} $$

where $\psi$ is the digamma function. Note that the singular $\log{\epsilon}$ pieces cancel. The second piece of the second integral on the RHS vanishes as it is an odd function over a symmetric interval. Thus, we may take the limit as $\epsilon \to 0$ and we get

$$\int_0^{\infty} dx \frac{x^{-p} \log{(1+x)}}{1+x} = -\frac{i 2 \pi \, e^{-i \pi p}}{1-e^{-i 2 \pi p}} (\gamma + \psi(p)) = -\frac{\pi}{\sin{\pi p}} (\gamma + \psi(p))$$

Alternatively, we may express this so that it is clear that the integral takes a positive value:

$$\int_0^{\infty} dx \frac{x^{-p} \log{(1+x)}}{1+x} = \frac{\pi}{\sin{\pi p}} \left (\frac1p - H_p \right ) $$

where $H_p$ is the analytically continued harmonic number at $p$.