Formula 4.224 (9) from Gradshteyn and Ryzhik (7ed, 2007) states that $$\int_0^\pi \ln (a + b\,\cos x)\,dx = π\,\ln \left(\frac{a +\sqrt{a^2-b^2}}{2}\right), \quad [a ≥ |b| > 0]$$ Could someone help me to understand how they got to the right-hand side expression? Thanks!!
Ps: I've found this similar topic that may be helpful: A question in Complex Analysis $\int_0^{2\pi}\log(1-2r\cos x +r^2)\,dx$