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?
 A: 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 


*

*$\{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]$.

*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 


*

*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$.

*$||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.
I hope this was helpful.
A: 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.
