TITLE: $S(x)=\sum_{n=1}^{\infty}a_n \sin(nx) $, $a_n$ is monotonic decreasing $a_n\to 0$: Show uniformly converges within $[\epsilon, 2\pi - \epsilon]$
QUESTION [6 upvotes]: $S(x)=\sum_{n=1}^{\infty}a_n \sin(nx) $, $a_n$ is monotonic decreasing $a_n\to 0$, when ${n \to \infty}$. I need to prove that for every $\epsilon >0$, the series is uniformly converges within $[\epsilon, 2\pi - \epsilon]$. Can I use Dirichlet and say that $\sum_{0}^{M} \sin (nx)< M$ for every x in the interval and since $a_n$ is uniformly converges to 0 ( uniformity since it does not depend on $x$), so the series is uniform convergent in this range?
In addition I need to prove that if $\sum_{n=1}^{\infty} a_n^2 = \infty$  so the series is not uniform convergent in $[0, 2 \pi]$, Since I know that from $n_0$ and on $a_n^2< a_n$ I used an inequality, again I'm not sure of that.
In the other hand, maybe I need to use Fourier series somehow. 
Thanks for the help!

REPLY [6 votes]: For your first question:
You can use Dirichlet's Test$^\dagger$ as long as you can show that 
$$D_n(x)=\sum\limits_{k=1}^n \sin(kx)$$ 
is indeed uniformly bounded on $[\epsilon, 2\pi-\epsilon]$.
Dirichet himself did this as follows:
Using the formula $$2\sin(v)\sin(u)=\cos(v-u)-\cos (v+u),$$ for any $n$:
$$\eqalign{
2\sin(x/2) D_n(x)&= \sum_{k=1}^n\bigl[\, 2\sin(x/2)\sin(kx)\,\bigr]\cr
&=\sum_{k=1}^n\Bigl[\, \cos \bigl(\,( k-{\textstyle{1\over2}})x\,\bigr) - \cos \bigl(\,(k+{\textstyle{1\over 2}})x\,\bigr)\,\Bigr]\cr
&=\cos (x/2)-\cos \bigl(\,(n+\textstyle{1\over2})x\bigr).

}
$$
So:
$$\tag{1}
|D_n(x)|= \biggl|  {{\cos (x/2)-\cos \bigl(\,(n+{1\over2})x\,\bigr)}\over 2\sin(x/2) }  
\biggr|
\le {{1\over |\sin(x/2)|} }.
$$
Now, if $x\in [\epsilon, 2\pi-\epsilon]$, then $x/2\in[\epsilon/2,  \pi-\epsilon /2]$
and it follows from  inequality $(1)$ that 
$$
|D_n(x)|\le {1\over \sin(\epsilon/2)}.
$$



 Dirichlet's Test:
Let $E\subset\Bbb R$ be a non-empty set  and let $f_k$, $g_k$ be functions from $E$ to $\Bbb R$.
If $$\biggl|\sum\limits_{k=1}^n f_k(x)\,\biggr|\le M<\infty$$ for all positive integers $n$ and all $x\in E$, and if  $g_k\searrow 0$ uniformly on $E$, then $\sum\limits_{k=1}^\infty f_k g_k$ converges uniformly on $E$.