I have encountered this integral:$$\frac{1}{2\pi}\int_0^{2\pi}\log|\exp(i\theta)-a|\text{d}\theta=0$$ where $|a|<1$ in proving Jensen's formula. because I am stupid, I don't know why it is equal $0$, I can't work it out. After a moment,I find a smart way in Stein's book. After the change of variable $\theta \mapsto -\theta$,the above integral becomes:$$\frac{1}{2\pi}\int_0^{2\pi}\log|1-a\exp(i\theta)|\text{d}\theta$$ and use Cauchy's integral formulas to $F(z)=1-az$ in $\Omega \supset \overline{\Bbb{D}}=\{z\in\Bbb{C}:|z|\leq 1\}$:$$\log F(0)=\frac{1}{2\pi i}\int_{\partial \Bbb{D} }\frac{\log F(\zeta)}{\zeta}\text{d}\zeta$$ we get $$0=\log|F(0)|=\frac{1}{2\pi}\int_0^{2\pi}\log(1-a\exp(i\theta))\text{d}\theta$$
But I still feel uncomfortable. I think the reason maybe :
Please help me, thanks very much.
The following is an alternative point of view to explain why the integral is constantly $0$. I am not sure if it is helpful to you.
Note that for every $\theta\in\mathbb{R}$, the function $a\mapsto\log|\exp(i\theta)-a|$ is harmonic when $|a|<1$. It follows that $$f(a):=\frac{1}{2\pi}\int_0^{2\pi}\log|\exp(i\theta)-a|d\theta$$ is also harmonic when $|a|<1$. Therefore, by meanvalue theorem, $$\frac{1}{2\pi}\int_0^{2\pi}f(a\exp(it))dt=f(0)=0.\tag{1}$$ However, note that for every $t\in\mathbb{R}$, \begin{eqnarray*} f(a\exp(it))&=&\frac{1}{2\pi}\int_0^{2\pi}\log|\exp(i\theta)-a\exp(it)|d\theta\\ &=&\frac{1}{2\pi}\int_0^{2\pi}\log|\exp(i(\theta-t))-a|d\theta\\ &=&\frac{1}{2\pi}\int_0^{2\pi}\log|\exp(i\theta)-a|d\theta\\ &=&f(a). \end{eqnarray*} Then from $(1)$ we know that $f(a)=0$.