How to prove the closed form of an integral

How to prove the following identity: $${1\over 2\pi}\int_{0}^{2\pi}\ln(1-2r\cos x+r^{2})\,dx=2\ln r,\text{ where } r\gt 1.$$

I was asked to use the following result to prove it: $$\lim_{n\to\infty}\sqrt[n]{f_{1n}f_{2n}\cdots f_{nn}}=\exp\left\{{1\over{b-a}}\int_a^b \ln f(x)\,dx\right\}$$ provided $f\in C[a,b]$, $f\gt 0$, and $f_{vn}=f(a+v\delta_n), \delta_n={{b-a}\over n}$

It's easy to prove the hint by checking the definition of Riemann integral,but I was trapped in using it to prove the original identity.

Thanks for help!

-

Hint From your own definitions, (take the log of both sides of the hint and use $[a,b]=[0,2\pi]$): $$\begin{split} \frac{1}{2\pi} \int_0^{2\pi} \ln \left( 1-2r\cos(x)+r^2 \right) dx &= \lim_{n \to \infty} \ln \left( \sqrt[n]{\prod_{k=1}^n \left(1-2r\cos(2\pi k/n) + r^2 \right)} \right) \end{split}$$