Showing $\sum_{n=1}^\infty \frac{\cos(xn)}{n}$ converges for $x \in (0,2 \pi)$ 
How do you show that for $x \in (0,2 \pi)$ the following series converges?
$$\sum_{n=1}^\infty \frac{\cos(xn)}{n}$$

Of course, this series doesn't converge absolutely. For $x= \pi$ you get the convergence with  the Leibniz criterion. For other $x$ in that interval the cosine is still often enough positive and negative evenly distributed that I expect the series to converge. How to formally prove that?
 A: We have
$$\sum_{n=1}^\infty \frac{\cos(nx)}{n}=\Re \left[\sum_{n=1}^\infty \frac{e^{i nx}}{n}\right]$$
This then simplifies to
$$=\Re\left[-\ln(1-e^{ix})\right]$$
You could prove this using the Taylor Series for $\ln(1-x)$ but this is difficult in my mind as that series is normally defined for $|x|<1$ and thus requires more fines. To get the real part of this we have
$$1-e^{ix}=1-\cos(x)-i\sin(x)=\sqrt{2-2 \cos (x)}e^{i\phi}$$
where $\phi=\arg(1-e^{ix})$. Then
$$\Re\left[-\ln(1-e^{ix})\right]=\Re\left[-\ln\left(\sqrt{2-2 \cos (x)}e^{i\phi}\right)\right]$$
$$=\Re\left[-i\phi-\frac{1}{2}\ln(2-2\cos(x))\right]=-\frac{1}{2}\ln(2-2\cos(x))$$
This exists for all $x\neq 2\pi k$ ($k\in\mathbb{Z}$).
A: Comment:
$$y(x)=\cos x +\frac {\cos 2x}2+\frac {\cos 3x}3 +\cdots +\frac{ \cos nx}{n}.$$
Take derivative of all term and sum up you get:
$$y'(x)=-(\sin x+ \sin 2x +\sin 3x +\cdots+ \sin nx)=-\frac{\sin\left(\frac{n+1}2x\right) \sin\left(\frac n{2}x\right)}{\sin \frac x2}.$$
Now integrate and find the limit.
