If one sees the simplification done in equation $5.3$ (bottom of page 29) of this paper it seems that a trigonometric identity has been invoked of the kind,
$$\ln(2) + \sum _ {n=1} ^{\infty} \frac{\cos(n\theta)}{n} = - \ln \left\vert \sin\left(\frac{\theta}{2}\right)\right\vert $$
Is the above true and if yes then can someone help me prove it?
Hint 1: Use that $$ \log(1-z)=-\sum\limits_{n=1}^\infty\frac{z^n}{n} $$
Hint 2: Set $$ z=r e^{i\theta} $$
Hint 3: Take a real part
Hint 4: Take a limit $r\to 1-0$ and use Abel's summation formula