For what values of $\theta$ does $\sum_{1}^{\infty} \frac{e^{i n\theta}}{n}$ Converge? I just came across the problem of what happens in the boundary cases of What is convergence interval of this series $\sum\limits_{n =1}^{\infty}\frac{(z- 1 - i)^{n}}{n\cdot2^{n}}$.
More concisely, for what $\theta$ will the following sum converge?
$$\sum_{n=1}^{\infty} \frac{e^{ni\theta}}{n}$$
It is well known that this sum will diverge for $\theta=0$ and will converge for $\theta=\pi$. In fact, for any odd multiple of an even root of unity, since we have symmetry, for each line through the origin of the complex plane, we can use the alternating series theorem to show that they converge.
Another idea I had was to split  the sum into imaginary and real parts, and if we can prove each of these converges, then we are all set. So now we must prove that both of the following converge
$$\sum_{n=1}^{\infty}\frac{\cos(n\theta)}{n}\space, \space \sum_{n=1}^{\infty}\frac{\sin(n\theta)}{n}$$
Now these can be shown to converge easily by Dirichlet's test for any rational multiple of pi, but what about irrational multiples of pi? I know it has been shown to converge with $\theta=1$, but I don't see how to generalize this.
 A: You can do an Abel transform (also known as summation by part) :
Let $a_n = \sum_{k=1}^n e^{ik\theta}$ (and therefore $a_0 = 0$) and $b_n = {1\over n}$. Then :
$$\begin{align}\sum_{k=1}^n {e^{ik\theta}\over k} &= \sum_{k=1}^nb_k (a_k - a_{k-1})\\
&=\sum_{k=1}^nb_k a_k - \sum_{k=1}^{n-1}b_{k+1}a_{k}\\
&=\sum_{k=1}^{n-1}(b_k-b_{k+1}) a_k - b_na_n\\
\end{align}$$
Now clearly $a_nb_n$ converges (to 1 when $\theta \in 2\pi\Bbb Z$ and to 0 otherwise, using geometric series), and : 
$$\sum_{k=1}^{n-1}(b_k-b_{k+1})a_k = \sum_{k=1}^{n-1} {1\over k(k+1)}\sum_{j=1}^{k}e^{ij\theta} \tag {1}$$
If $\theta$ is not a multiple of $2\pi$, $e^{i\theta} \ne 1$ thus $$\left|\sum_{j=1}^{k}e^{ij\theta}\right| = \left|{e^{i(k+1)\theta}-1\over e^{i\theta}-1}\right| \le {2 \over|e^{i\theta}-1|}$$
Therefore the term inside our sum $\text{(1)}$ is a $O({1\over k^2})$ and our sum converges.
It is clear that when $\theta \in 2\pi \Bbb Z$ the series diverges.
So our series converge iff $\theta \notin 2\pi \Bbb Z$.
Note : This is very similar to integration by part with integrals (as stated in the wikipedia article) : one common trick to prove convergence of semi-convergent integrals (such as $\sin x\over x$) is to integrate by part, leaving you with a remainder which you can compute and another integral that is absolutely convergent.
A: Here is a proof inspired by Trigonometric Inequality. $\sin{1}+\sin{2}+\ldots+\sin{n} <2$ .
So from Dirichlet's test we must show that
$$\sum_{n=1}^{\infty}\sin(n\theta)$$
is bounded. To do this we use the identity
$$\cos a - \cos b = - 2 \sin \frac{a + b}{2} \sin \frac{a - b}{2} $$
Setting $a=k+\theta/2$ and $b=k-\theta/2$
$$\sin k=\frac{\cos(k+\theta/2)-\cos(k-\theta/2)}{-2 \sin (\theta/2)}$$
So we have
$$\sum_{n=1}^{N}\sin(n\theta)=\sum_{n=1}^{N}\frac{\cos((n+\frac{1}{2})\theta)-\cos((n-\frac{1}{2})\theta)}{-2\sin(\theta/2)}$$
$$\bigg|\sum_{n=1}^{N}\sin(n\theta)\bigg|=\bigg|\frac{\cos((N+\frac{1}{2})\theta)-\cos(\theta/2)}{\sin(\theta/2)}\bigg| \leq 2\cdot\text{cosec}(\theta/2)$$
And now that we have bounded the sum for all real $\theta \neq 2\pi \mathbb{Z}$, we have proved convergence for the complex numbers.
A similar argument can be done for cosine, as there is the identity
$$\sin(a)-\sin(b)=-2\cos\frac{a+b}{2}\sin\frac{a-b}{2}$$
Thus 
$$\sum_{1}^{\infty} \frac{e^{ni\theta}}{n}$$
Converges for all real $\theta \neq 2\pi \mathbb{Z}$.
