Deduce that $$\int _ { 0 } ^ { 2 \pi } \ln \left( x ^ { 2 } - 2 x \cos \theta + 1 \right) d \theta = \begin{cases} 4 \pi \ln ( | x | ) & \text { if } | x | > 1 \\ 0 & \text { if } | x | < 1 \end{cases}$$