Compute $\int_{|z|=1}\frac{\log z}{z}dz$. Here is a question about contour integration in complex analysis:


  Compute
  $$\int_{|z|=1}\frac{\log z}{z}dz$$


I am not sure if I understand the question since the logarithm must be defined in a simply connected domain $\Omega$ with $0\notin\Omega$ and $1\in\Omega$. Hence, we cannot define $\log$ for every value in the circle $|z|=1$; there must be at least one point where it is not defined. However, if I forget this and consider the principal branch, I can compute
$$\int_{|z|=1}\frac{\log z}{z}dz = \int_{-\pi}^\pi \frac{\log e^{i\theta}}{e^{i\theta}}ie^{i\theta}d\theta = \int_{-\pi}^\pi i\theta id\theta=-\frac{\theta^2}{2}\bigg\vert_{-\pi}^\pi=0$$
Is this right?
The analysis is not quite complete because, generally, the contour must not enclose the branch point at $z=0$.  Because the example above does, you are getting any number of "answers."  Consider the case when $\arg{z} \in [0,2 \pi)$.  A naive evaluation of the integral produces

$$i \int_0^{2 \pi} d\theta \, e^{i \theta} \frac{i \theta}{e^{i \theta}} = -2 \pi^2 \ne 0$$

The problem of course lies in the multivaluedness of the integrand.  A correct approach excludes the log from the interior of the contour.  One approach is to consider a keyhole contour $C$ of outer radius $1$ and inner radius $\epsilon$ about the positive real axis:

$$\oint_C dz \, \frac{\log{z}}{z}$$

This contour integral is equal to 

$$i \int_0^{2 \pi} d\theta \, e^{i \theta} \frac{i \theta}{e^{i \theta}} + \int_1^{\epsilon} dx \frac{\log{x}+i 2 \pi}{x}  + i \epsilon \int_{2 \pi}^0 d\phi \, e^{i \phi} \frac{\log{\epsilon}+i \phi}{\epsilon e^{i \phi}} + \int_{\epsilon}^1 dx \frac{\log{x}}{x}$$

which in turn is equal to

$$-2 \pi^2 + i 2 \pi \log{\epsilon} -i 2 \pi \log{\epsilon} + 2 \pi^2 = 0$$

as expected, as there are no poles in the interior of $C$.  This type of analysis works for any branch cut definition for the log.
$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\on}[1]{\operatorname{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
$\ds{\bbox[5px,#ffd]{}}$

\begin{align}
&amp;\bbox[5px,#ffd]{\oint_{\verts{z}\ =\ 1}
{\ln\pars{z} \over z}\,\dd z}
\\[5mm] = &amp;\
\lim_{\epsilon\ \to\ 0^{+}}\,\,\left[-\int_{-1}^{-\epsilon}{\ln\pars{-x} + \ic\pi \over x}\,\dd x -
\int_{\pi}^{-\pi}{\ln\pars{\epsilon} + \ic\theta \over \epsilon\expo{\ic\theta}}\,\epsilon\expo{\ic\theta}\ic\,\dd\theta\right.
\\[2mm] &amp;\
\phantom{\lim_{\epsilon\ \to\ 0^{+}}\,\,\left[\,\,\right.}\left.
-\int_{-\epsilon}^{-1}{\ln\pars{-x} - \ic\pi \over x}\,\dd x
\right]
\\[5mm] = &amp;\ 
\lim_{\epsilon\ \to\ 0^{+}}\,\,\braces{%
-2\pi\ic\ln\pars{\epsilon} + \ic\int_{-\pi}^{\pi}
\bracks{\ln\pars{\epsilon} + \ic\theta}\dd\theta} =
\bbx{0} \\ &amp;
\end{align}