I was looking for an elementary proof (without use of Fourier series) that $$\sum_{n=1}^\infty \frac{\sin(nx)}{n}$$ converges to $(\pi-x)/2$ for $x\in (0,2\pi)$. I have managed to demonstrate that the series converges for $x\in[0,2\pi]$ and converges uniformly on $[\epsilon, 2\pi-\epsilon]$ for any $\epsilon>0$ (the series doesn't converge uniformly on $[0,2\pi]$). I've also proven that $$\lim_{N\to\infty}\int_0^{2\pi}\left(\frac{\pi-x}{2}-\sum_{n=1}^N \frac{\sin (nx)}{n}\right)^2\,dx=0$$ What I want to do next is to interchange the limit and integral so that we have $$\int_0^{2\pi}\lim_{N\to\infty}\left(\frac{\pi-x}{2}-\sum_{n=1}^N \frac{\sin (nx)}{n}\right)^2\,dx=\int_0^{2\pi}\left(\frac{\pi-x}{2}-\sum_{n=1}^\infty \frac{\sin (nx)}{n}\right)^2=0$$ Because we have uniform convergence of the series on $[\epsilon, 2\pi-\epsilon]$, I believe we can show that the limit of the series must by continuous on $(0,2\pi)$. Using this, I think you can show that $$\frac{\pi-x}{2}-\sum_{n=1}^\infty \frac{\sin (nx)}{n}=0 \text{ for }x\in(0,2\pi)$$ The issue is that I don't know how to justify switching the integral and limit. I understand that if we had uniform convergence on $[0,2\pi]$, this would be justified, but unfortunately this isn't the case. Any help would be greatly appreciated.
Edit: I've realized that I can split up the above limit. If we call $$f_N(x)=\left(\frac{\pi-x}{2}-\sum_{n=1}^N \frac{\sin (nx)}{n}\right)^2$$ then $$\lim_{N\to\infty}\int_0^{2\pi}F_N(x)\,dx=\lim_{N\to\infty}\int_0^\epsilon F_N(x)\,dx+\lim_{N\to\infty}\int_\epsilon^{2\pi-\epsilon}F_N(x)\,dx+\lim_{N\to\infty}\int_{2\pi-\epsilon }^{2\pi} F_N(x)\,dx$$ This is assuming that the limits on the right hand side actually exists. If they do, then we can prove that each limit must equal $0$, implying $$\lim_{N\to\infty}\int_\epsilon^{2\pi-\epsilon}F_N(x)\,dx$$ From here, I could carry out the proof outlined above giving the result $$\frac{\pi-x}{2}-\sum_{n=1}^\infty \frac{\sin (nx)}{n}=0 \text{ for }x\in[\epsilon,2\pi-\epsilon]$$ I think this is equivalent to the final result I was looking for, but there is still the issue of showing that the limits above actually exist.
You must be familiar with summation by parts which is used frequently in Fourier series. You can show that the series $\sum \frac {\sin x} x$ is boundedly convergent in the sense its partial sums are uniformly bounded on $[0,2\pi]$. Hence you can apply Dominated Convergence Theorem.