How does this integration pass? Can someone explain the passage in the red-box for me?



I am getting 
\begin{align}
& -\frac{1}{2\pi}\int_{0}^{2\pi} \log r  \;d\theta  - \frac{1}{2\pi} \int \log \| e^{i\theta_1} - e^{i\theta}\|  \;d\theta + \log r \\
= {} & -\frac{1}{2\pi} \int \log \| e^{i\theta_1} - e^{i\theta}\|  \\
\stackrel{?}{=} {} & - \frac{1}{2\pi} \int \log \| 1 - e^{i\theta}\| \, d\theta
\end{align}
It briefly mentions "periodicity" of $e^{i\theta}$.
But I don't see how that fits in here...
 A: Well, the periodicity is exactly it. When you write your ? equality, you actually get:
$$ -\frac{1}{2 \pi} \int_{0}^{2\pi} \log |1 - e^{i (\theta - \theta_1)}| d \theta$$
Notice that setting replacing $\theta$ by $\theta - \theta_1$ doesn't change anything since we're integrating over the whole domain $([0,2\pi]$ is the whole domain by the periodicity of $e^{i \theta}$), hence we may do so. You can think of it as our domain and our measure being invariant under the operation of $\theta \rightarrow \theta - \theta_1$ 
A: Note that
\begin{align}
\log |e^{i\theta_1} - e^{i\theta}|
& = \log |e^{i\theta_1}||1 - e^{i(\theta - \theta_1)}|\\
& = \log |e^{i\theta_1}| + \log |1 - e^{i(\theta - \theta_1)}|\\
& = \log 1 + \log |1 - e^{i(\theta - \theta_1)}|\\
& = 0 + \log |1 - e^{i(\theta - \theta_1)}|\\
& = \log |1 - e^{i(\theta - \theta_1)}|
\end{align}
Hence
$$\int_0^{2\pi} \log |e^{i\theta_1} - e^{i\theta}| \, \text{d}\theta
 = \int_0^{2\pi} \log |1 - e^{i(\theta - \theta_1)}| \, \text{d}\theta$$
Substituting $\phi = \theta - \theta_1$ and by periodicity and another substitutionin the third equal sign, we have 
\begin{align}
\int_0^{2\pi} \log |1 - e^{i(\theta - \theta_1)}| \, \text{d}\theta
& = \int_{-\theta_1}^{2\pi - \theta_1} \log |1 - e^{i\phi}| \, \text{d}\phi\\
& = \int_{-\theta_1}^{0} + \int_{0}^{2\pi-\theta_1} \log |1 - e^{i\phi}| \, \text{d}\phi\\
& = \int_{2\pi-\theta_1}^{2\pi} + \int_{0}^{2\pi-\theta_1} \log |1 - e^{i\phi}| \, \text{d}\phi\\
& = \int_{0}^{2\pi} \log |1 - e^{i\phi}| \, \text{d}\phi\\
\end{align}
