TITLE: A continuous function on the circle with divergent Fourier series.
QUESTION [5 upvotes]: I'm currently reading the Fourier analysis book and I have learned that every continuous function on the circle can be uniformly approximated by trigonometric polynomials, by using Fejer kernel.
After that, I have also read that there is a continuous function on the circle with divergent Fourier series at some point.
Then, what confuses me is that if the trigonometric polynomial uniformly approximate the given function then it must be converge to Fourier series, since Fourier series is the expression using orthonormal basis on the given Hilbert space and thus the best approximation in the mean square sense. Where am I wrong? Is the Fourier series just the best approximation in the mean square sense, not the uniform sense?

REPLY [2 votes]: Yes, the Fourier series does not generally give best approximations in the uniform sense.
For a simple example, consider
$f(x) = \cos(x) + \cos(2x)$.  The constant that best approximates this in the mean-square sense is $0$ (the constant term of the Fourier series).  This has
error $2$ at $x=0$.  But $1$ is a better uniform approximation.