Stone-Weierstrass theorem applied to Fourier series

This is a question on Fourier series convergence. The problem is, in the applications of the Stone Weierstrass approximation theorem on wikipedia, there's stated that as a consequence of the theorem the space of trigonometrical polynomials is dense (with the sup norm) in the space of continous functions in [0,1] - i.e. for every continous function its fourier series converges. This boggles me: isn't continuity not enough for the convergence (let alone uniform) of a Fourier series? What about du-Bois Reymond [and many others] example of continous function with non convergent Fourier series in a point?

-
Nothing tells you that the sequence of trigonometrical polynomials you can choose for approximating your function uniformly is in any way related to the Fourier series, and indeed it can't be in general, as you argue. – Theo Buehler Jul 14 '11 at 16:03
The Stone-Weierstrass theorem also tells us that the space of ordinary polynomials is dense in $C[0,1]$. "But wait - aren't there smooth functions whose Taylor series doesn't converge pointwise?" – Paul Siegel Jul 14 '11 at 16:21
@Paul: Yes. A great advantage of the Fejer kernel is that it is nonnegative, making estimates easy. That bad old Dirichlet kernel is much worse to work with. – Gerald Edgar Jul 14 '11 at 16:26
A natural analogue is the classical Weierstrass theorem. Do the Taylor polynomials necessarily approximate even a fairly smooth function? No, but the Bernstein polynomials do! (But not terribly well, admittedly.) – Nikita Sidorov Jul 14 '11 at 18:27

The key point is that you're confusing uniform convergence and $L^2$ convergence ; indeed as $\mathcal{C}([0;1])$ is both a subspace of $\mathcal{B}([0;1])$ with $|.|_\infty$ and of $L^2([0;1])$ with $|.|_2$, you get two norms on the same vector space.

But as it isn't a finite-dimensional space, it can have non-equivalent norms - and indeed, those two norms definitely aren't equivalent, which in particular means that a sequence which has a good behaviour for the $L^2$ norm (the partial sums of the Fourier series) doesn't necessarily have a good $|.|_\infty$ behaviour.

EDIT: I should have said a little more ; there's an obvious inequality between the two norms (the mean inequality) so they are not that unrelated. But there is no reverse inequality, as can be shown by considering a sequence of piecewise linear functions : for $n\in\mathbb N$, consider $f_n$ as $t\mapsto n^\alpha-n^{\alpha+\beta}t$ on $[0;n^{-\beta}]$ and zero elsewhere ; if you choose $\alpha,\beta>0$ carefully, then you'll get a sequence which converges to zero for the $L^2$ norm, and won't converge uniformly.

-

The density of trigonometric polynomials in $C[0,1]$ with respect to the sup norm does not imply that the Fourier Series of some $f\in{}C[0,1]$ must converge pointwise.

Let $e_k:=e^{2\pi{}ikx}$ for $k\in{}\mathbb{Z}$. Then it can be shown that

1. $\{e_k|k\in\mathbb{Z}\}$ is an orthonormal basis for $L^2[0,1]$ with respect to the $L^2$ norm. That is, <$e_j,e_k$>$=\delta_{jk}$ and the span of the $e_k$ is dense in $L^2[0,1]$.
2. If $f\in{}L^2[0,1]$ and $V_n:=span\{e_k|k=-n,...,n\}$, then the nth partial sum of the Fourier Series of $f$, $P_{n}f:=\sum_{k=-n}^{n}$<$f,e_k$>$e_k$ is the $L^2$ projection of $f$ onto $V_n$, i.e. for any $g\in{}V_n$ we have $||P_{n}f-f||$$_{2} \leq ||g-f||$$_{2}$

So the partial sums of a Fourier Series are a good approximation of a general $L^2$ function, and hence of $C[0,1]$ function, but only in the $L^2$ sense. To get pointwise convergence, one needs a stronger condition than continuity (e.g. differentiability), as you pointed out.

What goes wrong in an attempted proof? One would like to argue that

1. if for some trigonometric polynomial $p\in{}V_n$ and $f\in{}C[0,1]$ we have $||p-f||<\varepsilon$ (sup norm), then for the nth partial sum $P_{n}f$, $||P_{n}f-f||<\varepsilon$.
2. $||P_{n+1}f-f||\leq{}||P_{n}f-f||$ for all $n$

The fact (2) above facilitates these arguments in the case of the $L^2$ norm, but not for the sup norm.