What is the integral of log(z) over the unit circle?

If $\log z$ is interpreted as principal value $${\rm Log}z:=\log|z|+i{\rm Arg} z\ ,$$ where ${\rm Arg}$ denotes the polar angle in the interval $\ ]{-\pi},\pi[\ $, then the integral in question is well defined, and comes out to $-2\pi i$. (This is the case $\alpha:=-\pi$ in the following computations).

But in reality the logarithm $\log z$ of a $z\in{\mathbb C}^*$ is, as we all know, not a complex number, but only an equivalence class modulo $2\pi i$. Of course it could be that due to miraculous cancellations the integral in question has a unique value nevertheless. For this to be the case we should expect that for any $\alpha\in{\mathbb R}$ and any choice of the branch of the $\log$ along $$\gamma:\quad t\mapsto z(t):=e^{it}\qquad(\alpha\leq t\leq\alpha+2\pi)$$ we obtain the same value of the integral. This boils down to computing $$\int_\alpha^{\alpha+2\pi}(it+2k\pi i)\>ie^{it}\>dt=-\int_\alpha^{\alpha+2\pi}t\>e^{it}\>dt=2\pi i\>e^{i\alpha}\ .$$ During the computation several things have cancelled, but the factor $e^{i\alpha}$ remains. This shows that the integral in question cannot be assigned a definite value without making some arbitrary choices.


I would do it likes this:

Let $z = e^{i\theta}$. Then $\mathrm{d} z = i e^{i\theta} \mathrm{d} \theta$. Depending on you branch cut, $\ln(z) = i(\theta + 2\pi n)$ for whole $n$. Therefore the integral becomes $$ \int_0^{2 \pi} - (\theta + 2 \pi n) e^{i \theta} \mathrm{d} \theta \, . $$ Integrating by parts, I get $$ i [\theta e^{i \theta}]_0^{2 \pi} - [e^{i \theta}]_0^{2 \pi} + 2\pi n i [e^{i \theta}]_0^{2 \pi} = 2 \pi i \, . $$ Therefore $$ \oint_{|z| = 1} \ln z \, \mathrm{d}z = 2 \pi i $$