The derivative of a function defined by a series Let $$f(x)=\sum\limits_{n=1}^{+\infty}\frac{\sin nx}{n^{2}}$$ Prove that $f$ is differentiable on $(0,2\pi)$.
My attempt:
the series converges to $f$ uniformly but if we differentiate by term and get $$\sum\limits_{n=1}^{+\infty}\frac{\cos nx}{n}$$which does not converge uniformly. What should I do?
 A: Well, for starters $f(x)=\sum_{n\geq 1}\frac{\sin(nx)}{n^2}$ is clearly continuous as an absolutely convergent series of continuous functions.
For any $x\in(0,2\pi)$ we may consider $\varepsilon$ such that $[x-\varepsilon,x+\varepsilon]\subset(0,2\pi)$ and study
$$ \frac{f(x+\varepsilon)-f(x-\varepsilon)}{2\varepsilon} = \sum_{n\geq 1}\frac{\cos(nx)}{n}\cdot\frac{\sin(n\varepsilon)}{n\varepsilon}. $$
For any suitable $\varepsilon$ the RHS is convergent by Dirichlet's test / summation by parts, and by the dominated convergence theorem
$$ \lim_{\varepsilon\to 0}\frac{f(x+\varepsilon)-f(x-\varepsilon)}{2\varepsilon}=\sum_{n\geq 1}\frac{\cos(nx)}{n} $$
which again exists by Dirichlet's test / summation by parts. The crucial inequality here is just
$$ \forall x\in(0,2\pi),\;\forall N\geq 1,\qquad \left|\sum_{n=1}^{N}\cos(nx)\right| \leq \frac{1}{2}+\frac{1}{2\sin\frac{x}{2}}\,.$$
You may also have a look at page 58 of my notes where a strictly related question is tackled from the perspective of contour integration and Fourier series.
