# The Complex Logarithm and Complex Integration

This is a bit of a baby/immature question about complex analysis. I am just not completely comfortable with complex logarithm yet I think and I'm having trouble getting my intuition adjusted.

Suppose we want to integrate $\int_\gamma \frac{1}{z}$ where $\gamma$ is the closed polygonal path $[(1-i),(1+i),(-1+i),(-1-i)]$.

Clearly the top and bottom parts of the path when cancel upon integration and the left and the right would if it were not for the negative real axis. Now, we have defined the principal logarithm as having imaginary part in $(-\pi,\pi)$ so as to preserve continuity. To integrate the leftmost path I need to choose a different branch of the logarithm which will result in an extra $2 \pi i$ which is what should be expected (i.e. Cuachy's integral formula). However, how does translating, say up, solve my problem because wouldn't it still be crossing the branch for my new branch of the logarithm?

• Does the path stop at $-1-i$ or does it go back to $1-i$ so as to be a closed path?
– user307169
Mar 24 '16 at 16:25
• Sorry, yes it is a closed path. Mar 24 '16 at 16:26
• Is this something you came up with on your own? I'm tempted to say it can't be done because of the necessity of crossing a branch cut, but maybe there's another way that I don't know.
– user307169
Mar 24 '16 at 16:31
• No, it was given to me by my complex analysis professor and this is his field of study, though, perhaps there is a mistake somewhere. Mar 24 '16 at 16:32
• Well.. I don't think path independence applies because $\frac{1}{z}$ isn't holomorphic. I'll keep thinking about it but maybe someone else who knows better can chime in.
– user307169
Mar 24 '16 at 16:35

The integral of interest is

$$\int_C \frac{1}{z}\,dz=2\pi i$$

This can be obtained directly using the Residue Theorem. To see this by direct integration over the prescribed contour, we write the integral as

\begin{align} \int_C \frac{1}{z}\,dz&=\int_{-1}^1 \frac{1}{1+iy}\,idy+\int_{1}^{-1} \frac{1}{x+i}\,dx+\int_{1}^{-1} \frac{1}{-1+iy}\,idy+\int_{-1}^1 \frac{1}{x-i}\,dx\\\\ &=\int_{-1}^1 \frac{2i}{x^2+1}\,dx+\int_{-1}^1\frac{2i}{1+y^2}\,dy\\\\ &=2i(\pi/2)+2i(\pi/2)\\\\ &=2\pi i \end{align}

as was to be shown!

If we wish to use the complex logarithm defined such that $-\pi<\arg(z)\le \pi$, we write

\begin{align} \int_C \frac1z \,dz&=\lim_{\epsilon \to 0^+}\left( \log(-1+i\epsilon)-\log(-1-i\epsilon)\right)\\\\ &=i\pi -(-i\pi)\\\\ &=2\pi i \end{align}

as expected!

I've got it figured. So on the left hand side of our square path it CROSSES the negative real axis. We cannot do that as $\log$ is not defined there. However, if we pick a different branch and so we have to pick a different branch because then we won't have $\log(z)=\ln|z|+i0$ where $z$ is on the negative real axis we will have $\log(z)=\ln|z|+2\pi i$. Which will give the value of our integral.