This is a question on Fourier series convergence. The problem is, in the applications of the Stone Weierstrass approximation theorem on [wikipedia](http://en.wikipedia.org/wiki/Stone%E2%80%93Weierstrass_theorem#Applications_2), 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?



Stone-Weierstrass theorem applied to Fourier series
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.


I hope this was helpful.


