Is $\sum_{n=1}^\infty a_n\sin(nx)$ converges on $[\varepsilon, 2\pi-\varepsilon]$? 
Let $a_n$, a sequence monotonically decreasing to $0$. Consider 
$$\sum_{n=1}^\infty a_n\sin(nx)$$
Is the series converges uniformly on $[\varepsilon, 2\pi-\varepsilon]$?
  ($\varepsilon > 0$)

Basically we could use Dirichlet's test. We want to show that $\sum_{n=1}^\infty \sin (nx)$ is bounded. Indeed:
$$\sum_{n=1}^\infty \sin (nx) = \frac{i}{2}\left( \sum_{n=1}^\infty (e^{ix})^n + \sum_{n=1}^\infty (e^{-ix})^n\right) \le \frac{i}{2} \left( \frac{1}{1-e^{ix}} +\frac{1}{1-e^{-ix}} \right) \le \frac{1}{1-e^{i(2\pi-\varepsilon)}} <\infty$$
BUT, clearly, $$g(\frac{\pi}{2}) = \sum_{n=1}^\infty \sin \frac{n\pi}{2} = \infty$$
Where is the mistake?
 A: We show that if $a_n$ is monotonically decreasing, then the series
$$\sum_{n=1}^{\infty}a_n\sin (nx)$$
is uniformly convergent on $[\epsilon,2\pi-\epsilon]$, for any fixed $\epsilon>0$.  
To test the uniform convergence we use this answer in which I showed that 
$$\begin{align}
\left|\sum_{n=1}^N \sin(nx)\right| \le \frac12\left(1+\left|\cos (\frac{x}{2})\right|\right)\left|\csc\left(\frac{x}{2}\right)\right|
\end{align}$$
Now, for any fixed $\epsilon$, we have for $x\in [\epsilon,2\pi-\epsilon]$,
$$\begin{align}
\left|\sum_{n=1}^N \sin(nx)\right| &\le \frac12\left(1+\left|\cos (\frac{x}{2})\right|\right)\left|\csc\left(\frac{x}{2}\right)\right|\\\\
&\le \csc(\epsilon/2) \tag 1
\end{align}$$
For the Dirichlet test of $\sum_{n=1}^{\infty}a_n\sin (nx)$, we only require the following two conditions:
Condition $(1)$ 
The sequence $a_n$ decreases monotonically to zero.
Condition $(2)$ 
The partial sums $\sum_{n=1}^N  \sin(nx)$ be bounded by a constant.
Condition $(1)$ is presumed while equation $(1)$ confirms Condition $(2)$.
Thus, if $a_n$ is monotonically decreasing, then for $x\in [\epsilon, 2\pi-\epsilon]$, for any fixed $\epsilon >0$, we have that 
$$\bbox[5px,border:2px solid #C0A000]{\sum_{n=1}^{\infty}a_n\sin (nx)\,\,\text{converges uniformly}}$$

As a side note, we have that the series $\sum_{n=1}^N \sin x \sin(nx)$ converges for $x\in [0,2\pi]$
We have 
$$\begin{align}
\left|\sum_{n=1}^N \sin x \sin(nx)\right| &\le \frac12\left(1+\left|\cos (\frac{x}{2})\right|\right)\left|\sin x\csc\left(\frac{x}{2}\right)\right|\\\\
&=\left(1+\left|\cos (\frac{x}{2})\right|\right)\left|\cos\left(\frac{x}{2}\right)\right|\\\\
&\le2 \tag 2
\end{align}$$
For the Dirichlet test of $\sum_{n=1}^{\infty}a_n\sin (x)\sin (nx)$, we only require the following two conditions:
Condition $(1)$ 
The sequence $a_n$ decreases monotonically to zero.
Condition $(2)$ 
The partial sums $\sum_{n=1}^N \sin (x) \sin(nx)$ be bounded by a constant.
Condition $(1)$ is presumed while equation $(2)$ confirms Condition $(2)$.
and we are done!
A: You last "clearly" is problematic. Because $g(\pi/2)$ is bounded between 0 to 1. 
