Value of $\sum_{n=1}^{\infty} \frac{\cos (n)}{n}$

A shorter approach

\begin{align} \sum_{n=1}^{\infty} \dfrac{\cos n}{n}&=\frac12 \sum_{n=1}^{\infty} \dfrac{e^{in}+e^{-in}}{n}\\ &=- \frac12 [\ln(1-e^i)+ \ln(1-e^{-i })]\\ &= -\frac12 \ln (2-2\cos1)=-\frac12\ln(4\sin^2\frac12)\\ &= -\ln(2\sin\frac12) \end{align}


If $\log$ is the principal branch of logarithmic function, we have that $-\log(1-z)=\sum^\infty_{n=1}\frac{z^n}{n}$ for all $|z|<1$. If $z=re^{i\theta}$ with $0<r<1$, then the Abel sum of the sawtooth function $$f(\theta)=\frac{1}{2i}\sum_{|n|\geq1}\frac{e^{in\theta}}{n}=\sum^\infty_{n=1}\frac{\sin(n\theta)}{n}$$ is given by $$ \begin{align} A_rf(\theta)&= \sum^\infty_{n=1}\frac{r^n\sin(n\theta)}{n}= \frac{1}{2i}\sum_{|n|\geq1}\frac{r^{|n|}e^{in\theta}}{n}=\frac{1}{2i}\sum^\infty_{n=1}\frac{r^n}{n}\Big(e^{in\theta}-e^{-in\theta}\Big)\\ &=-\frac{1}{2i}\big(\log(1-re^{i\theta})-\log(1-re^{-i\theta})\big)=\operatorname{Im}\big(-\log(1-re^{i\theta})\big)\\ &= -\operatorname{arg}(1-re^{i\theta}). \end{align}$$ Thus, for $0<\theta<2\pi$, we have that $\frac{1}{2}(\pi-\theta)=f(\theta)=\lim_{r\rightarrow1-}A_rf(\theta)=-\operatorname{arg}(1-e^{i\theta})$. Now we consider $$\begin{align} -\log(1-re^{i\theta})&=\sum^\infty_{n=1}\frac{r^n\cos(n\theta)}{n} + i\sum^\infty_{n=1}\frac{r^n\sin(n\theta)}{n}\nonumber\\ &= -\log(|1-re^{i\theta}|) - i\arg(1-re^{i\theta})\tag{2}\label{sawtooth-log} \end{align}$$ The second term the right hand side of $\eqref{sawtooth-log}$ converges to $i\,f(\theta)$ for $0<\theta<2\pi$, and the first term converges to the $2\pi$--periodic even function $$g(\theta):=-\log(|1-e^{i\theta}|)=-\log\big(2|\sin(\theta/2)|\big)$$ Notice that $g$ is unbounded and that $\lim_{\theta\rightarrow0}g(\theta)=\infty=\lim_{\theta\rightarrow2\pi}g(\theta)$. Since $\sin(t)\cong t$ as $t\rightarrow0$ and $\lim_{t\rightarrow0+}t^\alpha\log(t)$ for any $\alpha>0$, we have that $g\in\mathcal{L}_p(\mathbb{S}^1)$ for all $p\geq1$. Since $\theta\mapsto\sum^\infty_{n=1}\frac{\cos(n\theta)}{n}$ is square integrable over $\mathbb{S}^1$,
$$\log\big(2|\sin(\theta/2)|\big)=-\sum^\infty_{n=1}\frac{\cos(n\theta)}{n}$$ at $\theta=1$, one gets $$-\log\big(2|\sin(1/2)|\big)=\sum^\infty_{n=1}\frac{\cos(n)}{n}$$