A Continuous Function with a Divergent Fourier Series

This is one of the reasons functional analysis is a useful thing: Giving an explicit example is not easy (there's one in Zygmund, due to Fejer), but proving the existence using a little bit of Banach-space theory is very simple.

We need the following special case of the Uniform Boundedness Principle, aka the Banach-Steinhaus Theorem:

Theorem (UBP, Special Case) Suppose $X$ is a Banach space and $S\subset X^*$. If $\sup_{\Lambda\in S}||\Lambda||=\infty$ then there exists $x\in X$ with $\sup_{\Lambda\in S}|\Lambda x|=\infty$.

Now define $\Lambda_n\in C(\Bbb T)^*$ by saying $\Lambda_n f$ is the $n$-th partial sum of the Fourier series at the origin: $$\Lambda_n f=s_n(f,0)=\frac{1}{2\pi}\int_0^{2\pi}f(t)D_n(t)\,dt,$$where $D_n$ is the Dirichlet kernel $$D_n(t)=\sum_{k=-n}^ne^{ikt}=\frac{\sin\left((n+\frac12)t\right)}{\sin\left(\frac12 t\right)}.$$Suppose we can prove two things: $$||D_n||_1\to\infty\quad(n\to\infty)$$and $$||\Lambda_n||_{C(\Bbb T)^*}=||D_n||_1.$$Then UBP says there exists $f\in C(\Bbb T)$ such that $\Lambda_n f$ is unbounded and we're done.

Showing that $||D_n||_1\to\infty$ is easy: $$\int_0^\pi|D_n(t)|\,dt\ge2\int_0^\pi\frac{\left|\sin\left((n+\frac12)t\right)\right|}{t}\,dt=2\int_0^{(n+1/2)\pi}\frac{|\sin(t)|}{t}\,dt.$$

The fact that $||\Lambda_n||_{C(\Bbb T)^*}=||D_n||_1$ is immediate from the Riesz Representation Theorem, plus the fact that the norm of an $L^1$ function is the same as its norm as a complex measure. One can also see it directly: Choose $\phi_n\in C(\Bbb T)$ so that $|\phi_n|\le 1$, and such that $\phi_n=1$ on "most" of the set where $D_n>0$ while $\phi_n=-1$ on most of the set where $D_n<0$.