I want to prove that $$\int_0^{2\pi}\log|1-ae^{i\theta}|\, d\theta=0$$ for all $|a|\leq 1$. I can prove it easily for $|a|<1$ via power series expansion for $\log|1+(-a)e^{i\theta}|$ and then integrating term-by-term as the series is absolutely convergent. Whenever $|a|=1$, though, I'm having trouble proving much of anything. It seemed like the above technique would work for $a\neq1$ since it can be proven that $$\sum_{n=1}^\infty\frac{z^n}{n}$$is convergent on $S^1$ for $z\neq1$ (previous exercise), however, I wasn't sure I could interchange the summation and integral.
Will anyone provide a hint toward the solution (preferably without giving the entire solution away)? Thanks! Also, if there is a more elegant solution to prove the first portion, please feel free to open my mind a little bit. For those curious, this is Exercise $11$ of Chapter $3$ from Stein and Shakarchi's book.
For $|a|<1$, the branch cut for $\log{(1-a z)}$ is on the real axis, for $z > 1/|a|$. Thus, we can write
$$\oint_{|z|=1} dz \frac{\log{(1-a z)}}{z} = 0$$
because $\frac{\log{(1-a z)}}{z}$ has no poles within $|z| \le 1$. Substitute $z=e^{i \theta}$ to get
$$i \int_0^{2 \pi} d\theta \log{(1-a e^{i \theta})} = i \int_0^{2 \pi} d\theta \log{|1-a e^{i \theta}|} - \int_0^{2 \pi} d\theta \: \arg{(1-a e^{i \theta})} = 0$$
Equating real and imaginary parts, we get the desired result for $|a| < 1$. For $|a|=1$, the circle $|z|=1$ passes through the branch cut so that Cauchy's theorem does not apply. In this case, we indent the circle $|z|=1$ near $z=1$ by an arc $\gamma$ on the circle $|z-1|=r$ to produce a contour $\Gamma$ and consider the limit $r \rightarrow 0$. On $\gamma$, we may show that
$$\left | \frac{\log{(1-z)}}{z} \right | \le \frac{\log{\frac{1}{r}}}{1-r}$$
because, for very small $r$, $\arg{(1-z)} \approx 0$ and $|z| > 1-r$ on $\gamma$. The magnitude of the integral over $\gamma$ is thus bounded by
$$\left | \int_{\gamma} dz \frac{\log{(1-z)}}{z} \right | \le 2 r \frac{\log{\frac{1}{r}}}{1-r} \arccos{\frac{r}{2}} $$
which goes to zero in the limit of $r \rightarrow 0$.
We may then show that, on the indented contour $\Gamma$:
$$\oint_{\Gamma} dz \frac{\log{(1-z)}}{z} = 0$$
By the same reasoning as above (equating real and imaginary parts), we see that
$$\int_0^{2 \pi} d\theta \log{|1- e^{i \theta}|} = 0$$
and the desired result follows.
Interestingly, though, we may show this explicitly. Let $z=e^{i \theta}$, $dz/z = i d\theta$, then
$$i \int_0^{2 \pi} d\theta \log{(1-e^{i \theta})} = 0$$
Now
$$\log{(1-e^{i \theta})} = \log{|1-e^{i \theta}|} +i \arg{(1-e^{i \theta})}$$
It turns out that
$$\arg{(1-e^{i \theta})} = \arctan{\frac{\sin{\theta}}{1-\cos{\theta}}} = \arctan{(\cot{\frac{\theta}{2}})} = \frac{\pi}{2} - \frac{\theta}{2}$$
$$\int_0^{2 \pi} d\theta \: \arg{(1-e^{i \theta})}= \int_0^{2 \pi} d\theta \left ( \frac{\pi}{2} - \frac{\theta}{2} \right ) = \frac{\pi}{2} 2 \pi - \frac{1}{4} (2 \pi)^2 = 0 $$
$$\therefore \int_0^{2 \pi} d\theta \log{|1-e^{i \theta}|} = 0$$