I'm trying to evaluate $$\int_0^{2 \pi} \ln(a^2 -2 a \cos(t - \phi) + 1) dt$$
where $a\in \mathbb{R}$, $a \in (0, 1)$ and $\phi \in \mathbb{R}$.
I suspect the answer is just $0$, but I'm not sure how to demonstrate that succintly.
I attempted a contour integral using the subsitution $z = e^{i t}$, $cos(t) = \frac{1}{2} (z + \frac{1}{z})$ but it's not clear to me how to handle $z = 0$ when finding the residues.