How to compute$\frac{1}{(2\pi)^2}\int_0^{2\pi}\int_0^{2\pi}\ln|z-e^{i\theta_1}-e^{i\theta_2}|d\theta_1d\theta_2$? By Jensen's formula, we know
\begin{equation}
\frac{1}{2\pi}\int_0^{2\pi}\ln|z-e^{i\theta}|d\theta=\left\{
 \begin{aligned}
 0 \quad |z|<1\\
 ln|z| \quad |z|\geq1\\
 \end{aligned}
 \right.
\end{equation}
How to compute$\frac{1}{(2\pi)^2}\int_0^{2\pi}\int_0^{2\pi}\ln|z-e^{i\theta_1}-e^{i\theta_2}|d\theta_1d\theta_2$?
My idea is firstly compute $\frac{1}{2\pi}\int_0^{2\pi}\ln|z-e^{i\theta_1}-e^{i\theta_2}|d\theta_1$
\begin{equation}
\frac{1}{2\pi}\int_0^{2\pi}\ln|z-e^{i\theta_1}-e^{i\theta_2}|d\theta_1=\left\{
 \begin{aligned}
 0 \quad |z-e^{i\theta_2}|<1\\
 \ln|z-e^{i\theta_2}| \quad |z-e^{i\theta_2}|\geq1\\
 \end{aligned}
 \right.
\end{equation}
But I don't know how to compute the next step.
 A: For any complex number $z\neq 0$ such that $|z|\leq 2$ there are exactly two couples $(\theta,\varphi)$ such that $\exp(i\theta)+\exp(i\varphi)=z$. The integral only depends on $|z|$ and it is zero for $|z|>2$.
We may assume without loss of generality $z=r\in[0,2]$ and compute
$$ I(r)=\frac{1}{8\pi^2}\iint_{[-\pi,\pi]^2}\ln\left(r^2-4r\cos\frac{\theta+\varphi}{2}\cos\frac{\theta-\varphi}{2}+4\cos^2\frac{\theta-\varphi}{2}\right)\,d\theta\,d\varphi $$
through a change of variables, turning it into an almost elementary integral
$$\begin{eqnarray*} I(r) &=& \frac{1}{4\pi^2}\iint_{[-\pi,\pi]^2}\ln\left(r^2-4r\cos\theta\cos\varphi+4\cos^2\varphi\right)\,d\theta\,d\varphi\\&=&\frac{1}{\pi}\int_{-\pi}^{\pi}\log|r|+\log\max\left(1,\left|\frac{4\cos\varphi}{r}\right|\right)\,d\varphi \end{eqnarray*}$$
since the Poisson kernel gives $\int_{-\pi}^{\pi}\log(1+R^2-2R\cos\theta)\,d\theta = 4\pi\log\max(1,|R|) $, leading to
$$ \int_{-\pi}^{\pi}\log((r^2+4\cos^2\varphi)-(4r\cos\varphi)\cos\theta)\,d\theta = 4\pi\log|r|+4\pi\log\max\left(1,\left|\frac{4\cos\varphi}{r}\right|\right).$$
