TITLE: Showing $\int_0^{2\pi} \log|1-ae^{i\theta}|d\theta=0$
QUESTION [6 upvotes]: This is a homework problem for a second course in complex analysis. I've done a good bit of head-bashing and I'm still not sure how to solve it-- so I might just be missing something here. The task is to show that given $|a|<1$,
$$\int_0^{2\pi} \log|1-ae^{i\theta}|d\theta=0.$$
So right off the bat we can let $z=e^{i\theta}$ so that 
$$\int_0^{2\pi} \log|1-ae^{i\theta}|d\theta=\int_{|z|=1} \log|1-az|\frac{dz}{iz}=-i\int_{|z|=1} \log|1-az|{dz}.$$
After that I'm not sure if using the residue theorem is the way to go?

REPLY [5 votes]: Hint:
Note that $\log|1-ae^{i\theta}|$ is the real part of $\log(1-ae^{i\theta})$. Then try differentiating with respect to $a$. Then notice that integrating around the unit circle
$$
\frac1i\oint\frac{\mathrm{d}z}{1-az}=0
$$
when $|a|<1$.

REPLY [4 votes]: Consider the function $\log(1-a\,z)$ and think mean value.