Let $a_n$ be a nonnegative and decreasing sequence. Show that $\sum_{n=1}^\infty\,a_n\sin nx$ converges uniformly on $\mathbb{R}$ if and only if $\lim_{n \to \infty}\,na_n = 0$.
$(\Rightarrow)$ Assume the series $\sum_{n=1}^\infty\,a_n\sin nx$ converges uniformly on $\mathbb{R}$. Then for every $\epsilon > 0$, there is an $N \in \mathbb{N}$ such that $$\left\sum_{k=m}^n\,a_k\sin kx\right < \epsilon \hspace{0.2in} \mbox{for all $x \in \mathbb{R}$ whenever $n > m> N$}.$$ Let $n > 2N, m =[n/2 +1]$. Then $m > n/2> N$. Choosing $x = \pi/2n$, we have $$\left\sum_{k=m}^n\,a_k\sin(k\pi/2n)\right < \epsilon. \tag{1}$$ When $m \leq k \leq n$, we have $$\frac{\pi}{4} < \frac{m\pi}{2n} \leq \frac{k\pi}{2n} \leq \frac{\pi}{2}.$$ Now (1) implies that $$ \epsilon > \sum_{k=m}^n\,a_k\sin(k\pi/2n) \geq \sin\frac{\pi}{4}\sum_{k=m}^n\,a_k \geq \frac{\sqrt{2}}{2}\,(nm+1)a_n \geq \frac{\sqrt{2}}{4}\,na_n.$$ This proves that $\lim_{n \to \infty}\,na_n = 0$.
$(\Leftarrow)$ Assume that $\lim_{n \to \infty}\,na_n = 0$. Let $$\alpha_n = \sup_{k \geq n}\,\{ka_k\}.$$ Then $\alpha_n$ is decreasing and converges to zero as $n \to \infty$. Let $$S_{m, n}(x) = \sum_{k=m}^n\,a_k\sin kx.$$ we want to show that $$S_{m, n}(x) \leq (\pi + 3)\alpha_{m}\hspace{0.2in} \mbox{for every $x \in \mathbb{R}$}. \tag{2}$$ Notice that $S_{m, n}(x)$ is an odd and periodic function with period $2\pi$. It suffices to show that (2) holds on $[0, \pi]$. To do so, we divide $[0, \pi]$ into $[0, \pi/n], [\pi/n, \pi/m], [\pi/m, \pi]$ and show that (2) holds on each such subinterval.
(a). If $0 \leq x \leq \pi/n$, then $kx \in [0, \pi]$ for all $m < k \leq n$. Using $\sin\theta \leq \theta$ yields $$S_{m, n}(x) = \sum_{k=m}^n\,a_k\sin kx \leq x\,\sum_{k=m}^n\,ka_k$$ $$\leq x\,\sum_{k=m}^n\,\alpha_k \leq \frac{\pi}{n}(nm+1)\alpha_{m} \leq \pi\alpha_{m}.$$
(b). If $\pi/n \leq x \leq \pi$, in view of that $\sin\theta \geq \frac{2}{\pi}\,\theta$ for $\theta \in [0, \pi/2]$, we have $$\left\sum_{k=m}^n\,\sin kx\right = \frac{\cos(n1/2)x \cos(m+1/2)x}{2\sin(x/2)} \leq \frac{1}{\sin(x/2)} \leq \frac{\pi}{x} \leq m.$$ By Abel's lemma, we have $$S_{m, n}(x) = m(a_m + 2a_n) \leq 3ma_m \leq 3\alpha_m.$$
(c). If $\pi/n \leq x \leq \pi/n$, then $m \leq \pi/x \leq n$. Let $L = [\pi/x]$. We have \begin{eqnarray*} S_{m, n}(x) & = & \sum_{k=m+1}^L\,a_k\sin kx + \sum_{k=L+1}^n\,a_k\sin kx = S_{m, L}(x) + S_{L+1, n}(x). \end{eqnarray*} Since $L \leq \frac{\pi}{x} < L +1$, it follows that $x \leq \frac{\pi}{L}$. The result of (a) implies that $$S_{m, L}(x) \leq \pi\alpha_m.$$ For $\frac{\pi}{L+1} < x \leq \frac{\pi}{m}$ and $L +1 > \frac{\pi}{x} \geq m$, by (b) and the decreasing of $\alpha_n$, we have $$\leftS_{L+1, n}(x)\right \leq 3\alpha_{L +1}$$ and so $$\leftS_{m, n}(x)\right \leq (3 + \pi)\alpha_m.$$ In summary, we have proved that (1) holds for every $x \in [0, \pi]$. Therefore, the series converges uniformly on $\mathbb{R}$.
Remark. This result does not apply to $\sum_{n=1}^\infty\,a_n\cos nx$. Can you give a counterexample?
