Prove $\sum_{0<|n|\leq N}\frac{e^{inx}}{n}$ is uniformly bounded in $N$ and $x\in[-\pi,\pi]$. 
Prove $\sum_{0<|n|\leq N}\frac{e^{inx}}{n}$ is uniformly bounded in $N$ and $x\in[-\pi,\pi]$ by using the fact that 
  \begin{eqnarray*}
&&\frac{1}{2i}\sum_{0<|n|\leq N}\frac{e^{inx}}{n}=\sum_{n=1}^{N}\frac{\sin nx}{n}=\frac{1}{2}\int_{0}^{x}( D_N(t)-1)\,dt,\\
&&\int_{0}^{\infty}\frac{\sin t}{t}\,dt<\infty,
\end{eqnarray*}
  where $D_N(x)=\sum_{n=-N}^{N}e^{inx}$ is the Dirichlet kernel.

For fixed $N$ or $x$, it's easy to prove that the sum is uniformly convergent in $x$ or $N$ by using Abel convergence test and don't need to use the second formula. But how to prove the sum is uniformly bounded in $N$ and $x\in[-\pi,\pi]$ at the same time?
 A: It is enough find a uniform bound for $x \in [0,\pi]$ and $N \in \mathbb{N}$ using straightforward estimates.
We have 
$$\tag{*}\left|\sum_{n=1}^N \frac{\sin nx}{n}\right| = \left|\sum_{n=1}^M \frac{\sin nx}{n}+ \sum_{n=M+1}^N \frac{\sin nx}{n}\right| \leqslant \sum_{n=1}^M \frac{|\sin nx|}{n}+ \left|\sum_{n=M+1}^N \frac{\sin nx}{n}\right|$$ 
where $M = \lfloor \frac{1}{x}\rfloor$ and $M \leqslant \frac{1}{x} < M+1$.
Since $|\sin nx| \leqslant n|x| = nx$, we have for the first sum on the RHS of (*),
$$ \sum_{n=1}^M \frac{|\sin nx|}{n} \leqslant Mx \leqslant 1$$
The second sum can be handled using summation by parts and  a well-known bound for $S_N(x) = \sum_{n=1}^N \sin nx$.
We have
$$\left|\sum_{n=M+1}^N \frac{\sin nx}{n} \right| = \left|\frac{S_N(x)}{N} - \frac{S_M(x)}{M+1}+ \sum_{n=M+1}^{N-1} S_n(x) \left(\frac{1}{n} - \frac{1}{n+1} \right) \right|$$
Since $|S_N(x)| \leqslant 1/|\sin(x/2)|$ it follows that
$$\left|\sum_{n=M+1}^N \frac{\sin nx}{n} \right| \leqslant \frac{1}{|\sin(x/2)|}\left(\frac{1}{N} + \frac{1}{M+1} + \sum_{n=M+1}^{N-1}\left(\frac{1}{n} - \frac{1}{n+1} \right) \right) = \frac{2}{(M+1)|\sin(x/2)|}$$
Since $|\sin(x/2)| = \sin(x/2) \geqslant (2/\pi)(x/2) = x/ \pi$ for $x$ in this range, it follows that
$$\left|\sum_{n=M+1}^N \frac{\sin nx}{n} \right| \leqslant \frac{2}{(M+1)|\sin(x/2)|} \leqslant \frac{2 \pi}{(M+1)x} \leqslant 2\pi$$
Thus, for all $x \in [0,\pi]$ and for all $N \in \mathbb{N}$, 
$$\left|\sum_{n=1}^N \frac{\sin nx}{n}\right| \leqslant 2\pi + 1$$
A: I'll give you a hint:  Since
$$
t\in(0,\pi)\mapsto\begin{cases}\frac1t-\frac1{\sin t}&t\neq 0\\0&t=0\end{cases}$$
is continuous and $\lim_{\lambda\to\infty}\int_0^\xi\frac{\sin\lambda t}{t}\,\mathrm{d}t=\lim_{\lambda\to\infty}\int_0^{\lambda\xi}\frac{\sin x}{x}\,\mathrm{d}x$ exists, we have
$$
\lim_{\lambda\to\infty}\int_0^\xi\frac{\sin\lambda t}{\sin t}\,\mathrm{d}t
=\lim_{\lambda\to\infty}\int_0^\xi\frac{\sin\lambda t}{t}\,\mathrm{d}t
$$
when $\xi\in(-\pi,\pi)$.  In particular,
$$
\int_0^xD_N(t)\,\mathrm{d}t=\int_0^x\frac{\sin(N+\frac12)t}{2\sin\frac12t}\,\mathrm{d}t
$$
can be bounded uniformly (in $x\in[-\pi,\pi]$, note that $\xi$ becomes $\frac12x$ here) as $N\to\infty$, so giving you a uniform bound.
