# Understanding contour integral with branch cuts

I was trying to understand contour integral which have or those involving branch cuts. Like $$I=\int_0^\infty\frac{dx}{x^3+1}$$ because the integrand is not even we cannot extend the integration to the whole real axis and then halve the result. However, suppose we look at the contour integral $$J=\oint_C\frac{\ln z \:dz}{x^3+1}$$ around the Keyhole contour. Everything seems nice until now. But then I get to know that "There is a connection between $$J$$ and the original definite integral $$I$$" $$J=2\pi iI$$ I get the partial intuition from one of M.SE answer, but couldn't understand the logic.

\begin{align}&\bbox[10px,#ffd]{\oint_C\frac{\ln z}{1+x^3}dz}=2\pi i\sum\text{Res}f(z)=\int_0^\infty\frac{\ln z}{1+z^3}dz+\int_\infty^0 \frac{\overbrace{\ln z+2\pi i}^\star}{1+z^3}dz=-2\pi i\int_0^\infty\frac{1}{1+z^3}dz\end{align}

Here I don't understand the $$\star$$. I think $$\ln z=\ln r+i\theta+2\pi in$$ used, but aren't we evaluate the integral on same branch? Then why to consider $$2\pi i$$?

Some contour integral which have branch cuts use wedge-shaped contour. Where $$\Gamma = \Gamma_1 + \Gamma_2 + \Gamma_3$$ going in a straight line $$\Gamma_1$$ from $$0$$ to $$R$$ on the real axis, then a circular arc $$\Gamma_2$$, then a straight line $$\Gamma_3$$ back to $$0$$. But I couldn't understand which angle I should use for $$\Gamma_3$$? Like for $$f(z) = \frac{z^n}{1+z^m}$$, it was suggested to use a wedge-shaped contour of angle $$\frac{2\pi}{m}$$.

Is there any trick or rule of thumb which help to decide the angle?

Here the holomorphic branch of the logarithm is chosen as $$\ln(z) = \ln(|z|) + i \arg(z) \quad \text{with } 0 < \arg(z) < 2 \pi \, ,$$ so that the function $$f$$ is holomorphic in $$\Bbb C \setminus [0, \infty)$$, and in particular on and inside the contour $$C$$.

The keyhole contour has two horizontal segments in some distance $$\epsilon > 0$$ from the real axis.

When integrating along the “upper” horizontal segment of $$C$$, $$\arg(z)$$ is close to zero, and in the limit $$\epsilon \to 0$$ that contribution becomes $$\int_r^R\frac{\ln x}{1+x^3} \, dx$$, where $$r$$ and $$R$$ are the inner and outer radius of the contour, respectively.

On the “lower” horizontal segment of $$C$$, $$\arg(z)$$ is close to $$2 \pi$$, and in the limit $$\epsilon \to 0$$ that contribution becomes $$\int_R^r\frac{\ln x + 2 \pi i}{1+x^3} \, dx = - \int_r^R\frac{\ln x + 2 \pi i}{1+x^3} \, dx$$.

Then result then follows with $$r \to 0$$ and $$R \to \infty$$.

• Aha, I see. I was forgot to consider $\arg(z)$. Thanks(+1) @MartinR. Could you say something on my second question? Commented Sep 19, 2021 at 13:18
• @WhyMeasureTheory: I don't think there is a general answer to that. Often you try to use some symmetries, e.g. $z^m$ is invariant under a rotation of $z$ by the angle $2\pi/m$, and each “wedge” contains exactly one pole of the function. Commented Sep 19, 2021 at 13:22
• "$z^m$ is invariant under a rotation of $z$ by the angle $2\pi/m$" How symmetries help us to decide the angle. It will be great help for me if you explain it a little bit @MartinR Commented Sep 19, 2021 at 13:26
• @WhyMeasureTheory: It gives you a simply relation between the integrals along the straight lines. Commented Sep 19, 2021 at 13:28
• I was really screwed up with the symmetries thing. Like Here they used Fresnel contour where the angle is $\frac{\pi}{4}$. I didn't see any relation $\sin(x^2)$ with that. It will be great help if you use an example and break down that thing, please. It bother me a lot @MartinR Commented Sep 20, 2021 at 16:06