Show that there exists a constant $C\geq 0$ such that for all $n\geq 1$ : $$|S_n(x)|=|\sum _{j=1}^n \frac{\cos (2\pi jx)}{j}| \leq C -\log |\sin (\pi x)|, \quad \forall x\in ]0,1]. $$
Since $S_n(x)$ converge uniformly on each interval $[\epsilon , 1]$ with $\epsilon >0$, it is suffisant to show that the result is true on a neighbourhood of $0$.
I tried to use an Abel transformation and use the fact that $|\sum _{j=1}^n\cos (2\pi jx)|\leq C'|\sin (\pi x)^{-1}|$. But this majoration is too crude and it doesn't work.
This is indeed an exercise about Fourier series. We have that:
holds as an identity over $L^2((0,1))$, since: $$ \int_{0}^{1}\log\sin(\pi x)\,dx = -\log 2$$ follows from considering Riemann sums and the identity: $$ \prod_{k=1}^{n-1}\sin\frac{\pi k}{n}=\frac{2n}{2^n},$$ while over $|z|<1$ we have: $$\sum_{n\geq 1}\frac{z^n}{n} = -\log(1-z) $$ so we can evaluate the previous identity in $z=e^{2\pi i x}$ by Abel's lemma, then take the real part.