How to evaluate $\ \int_{0}^{\pi} \log (|1 - a e^{-i w}|)\,dw $ I massaged it into (assuming $ a = 1 $): 
$$\ \int_{0}^{\pi} \log \left(2\left|\sin\left(\frac{w}{2}\right)\right|\right)\,dw $$
and I've seen how to solve for $\ \int_{0}^{\pi} \log(\sin (x)) \,dx$ over $[0 ,\pi]$. But I was unable to solve for this. I know the answer is 0 for $\ a\le1 $, and I have some intuition for why this is true (by graphing $\ |1 - a  e^{-i  w}| $ over $[0 ,\ \pi ]$ for different values of a), but I am not sure how to solve this analytically. This is from an engineering textbook on delta sigma data converters (eq. 4.26, pg. 99, Understanding Delta-Sigma Data Converters, 2nd Edition). 
 A: Assume that $a\in\mathbb{R}$.  Then, observing that $|1-ae^{-iw}|=\sqrt{1+a^2-2a\cos(w)}$ is $2\pi$-periodic and even in $w$, we find that 
$$\begin{align}
\int_0^\pi \log\left(|1-ae^{-iw}|\right)\,dw&=\frac12 \int_0^{2\pi}\log\left(\sqrt{1+a^2-2a\cos(w)}\right)\,dw\\\\
&=\frac12 \int_0^{2\pi}\log\left(\sqrt{1+a^2+2a\cos(w)}\right)\,dw\\\\
&\overbrace{=}^{z=e^{iw}}\frac12 \oint_{|z|=1} \frac{\log\left(|z-a|\right)}{iz}\,dz\tag1
\end{align}$$
In addition, we see that 
$$\int_0^\pi \log\left(|1-ae^{-iw}|\right)\,dw=\pi \log(|a|)+\frac12 \oint_{|z|=1} \frac{\log\left(|z-1/a|\right)}{iz}\,dz\tag2$$
It suffices, therefore, to assume that $a>1$.  

Now, for $a>1$, let us evaluate the integral $I(a)$ given by
$$I(a)=\frac12\oint_{|z|=1}\frac{\log(z-a)}{iz}\,dz$$
Inasmuch as $\log(z-a)$ is analytic in and on $|z|=1$, the Residue Theorem guarantees that
$$I(a)=\pi \log(a)+i\pi^2\tag3$$
where we have chosen to cut the plane with a ray from $a$ and extending along the positive real axis such that $\log(1)=0$.
We also can write
$$\begin{align}
I(a)&=\frac12 \oint_{|z|=1}\frac{\log\left(|z-a|\right)}{iz}\,dz+\frac12 \oint_{|z|=1}\frac{\arg\left(z-a\right)}{z}\,dz\\\\
&= \int_0^\pi \log\left(|1-ae^{-iw}|\right)\,dw+\frac i2 \int_{-\pi}^\pi \left(\pi+\arctan\left(\frac{\sin(\phi)}{\cos(\phi)-a}\right)\right)\,d\phi\\\\
&= \int_0^\pi \log\left(|1-ae^{-iw}|\right)\,dw+i\pi^2\tag4
\end{align}$$
whence comparing $(3)$ and $(4)$ reveals
$$\int_0^\pi \log\left(|1-ae^{-iw}|\right)\,dw=\pi\log(a)$$
for $a>1$.  
Using $(1)$, $(2)$ and $(4)$ we see that for $0<a<1$
$$\int_0^\pi \log\left(|1-ae^{-iw}|\right)\,dw=0$$

Putting everything together yields
$$\int_0^\pi \log\left(|1-ae^{-iw}|\right)\,dw=\begin{cases}\pi\log(|a|)&,|a|\ge 1\\\\
0&,|a|\le 1\end{cases}$$
A: Let $-1 < a < 1, \,z = e^{i w}$. Since $|1 - a \overline z| = |1 - a z|$,
$$2 I(a) = \int_0^{2 \pi} \ln |1 - a e^{i w}| \,dw =
\operatorname{Re} \int_0^{2 \pi} \ln(1 - a e^{i w}) \,dw =
\operatorname{Re} \int_\gamma \frac {\ln(1 - a z)} {i z} dz = 0,$$
as there is a disk on which the integrand is analytic and which contains the unit circle $\gamma$.
Now let $a < -1 \lor a > 1$. Then
$$I(a) =
\int_0^\pi \ln {\left| a e^{-i w}
 \left( \frac {e^{i w}} a - 1 \right) \right|} \,dw =
\pi \ln |a| + I {\left( \frac 1 a \right)} =
\pi \ln |a|.$$
$I(\pm 1)$ can be found from
$$I(a^2) =
\frac 1 2 \int_0^{2 \pi} \ln |(1 - a e^{i w/2}) (1 + a e^{i w/2})| \,dw =
2 I(a).$$
