A confusing question about intergral $\int_{0}^{2\pi}\log|1-e^{i\theta}| d\theta$ I am working out the question which is ex11 ch3 from Stein&Shakarchi's Complex Analysis:
Show that if |a|<1, then $$\int_{0}^{2\pi}\log|1-ae^{i\theta}|\,d\theta = 0$$ Then, prove that the above result remains true if we assume only that $|a|\leq 1$.
I firstly used the substitution $z=e^{i\theta}$ and found that $$\int_0^{2\pi}  \log|1-ae^{i \theta}|d\theta=\int_{|z|=1} \frac{\log|1-az|}{iz}dz=Re(\int_{|z|=1} \frac{\log(1-az)}{iz}dz)$$Since |a|<1 and $\frac{\log(1-az)}{iz}$ is holomorphic in the unit disc except a removable singularity at 0, then we can conclude that the integral is zero. As for |a|=1, except the same removable singularity, $\frac{\log(1-az)}{iz}$ has a pole at $z_0$, where $az_0=1$. I choose a closed contour C which is the unit disc but with an arc omitting $z_0$ and of radius $\epsilon$. Similarly, we have $\int_{\mathbf C} \frac{\log(1-az)}{iz}dz=0$ and let $\epsilon \to 0$ yields that ${\epsilon}{log\epsilon} \to 0$. Finally, we have $$\int_{|z|=1} \frac{\log(1-az)}{iz}dz=0 \Rightarrow \int_{|z|=1} \frac{\log|1-az|}{iz}dz=0$$
I searched that question before and found some similar solutions. However, if it is true and then consider the keyhole contour which omits the point $z_0$ we can conclude $$\int_{0}^{2\pi}\log|1-ae^{i\theta}|\,d\theta = 0,\ where\ |a|>1$$ by the same method. That question is so targeted that I can't believe myself.
If somewhere is not clear or wrong or you have better methods, plz tell me. Anyway, thank you for viewing.
 A: The function $u(z)=\log|1-az|$ is harmonic in the unit disk when $|a|<1$.
Therefore by the average property of harmonic functions the integral equals $u(0)=0$. The result with $|a|=1$ is obtained as a limit when $a$ tends to
some point on the unit circle from inside.
When $|a|>1$ consider $v(z)=\log|\overline{a}-z|$ and notice that $u$ and $v$ have the same integral over the unit circle because $|1-ae^{it}|=|\overline{a}-e^{it}|$. Now $v$ is harmonic. Applying the same argument to $v$ we obtain
$\log|a|$ for the value of our integral.
A: The integral when $|a|>1$ equals $2\pi\ln|a|.$ To see this, observe
$$\ln |1-az| = \ln \left (|a||1/a - z|\right) = \ln |a| + \ln|1/a - z|$$ $$ =\ln |a| + \ln \left|\frac{1/a - z}{1-(1/\bar a)z}\right | +\ln |1-(1/\bar a)z|.$$
In the middle term we have the modulus of the familiar conformal map of the open unit disc to itself. So for $|z|=1,$ the middle term is $0.$ Now integrate over $[0,2\pi],$ with $z=e^{i\theta},$ using the previous result on the third term, to get
$$2\pi \ln |a| + 0 + 0 = 2\pi \ln |a|.$$
