# Using Stone-Weierstrass Theorem to show that trig polynomials are dense in $L^2([0,2\pi])$

I am trying to show use Stone-Weierstrass Theorem to show that trig polynomials are dense in $$L^2([0,2\pi])$$, however the following things concerns me.

1. trig polynomails doesn't separate points since $$f(0) = f(2\pi)$$. My solution is to show that trig polynomial is dense in all $$[0,2\pi - \epsilon]$$, then let $$\epsilon \rightarrow 0$$, we could say that trig polynomials are dense almost everywhere in $$[0,2\pi]$$. (I doubt if this is correct)

2. Stone-Weierstrass theorem only provide density in $$C(K)$$ (all complex continuous functions on compact K). How could we extend this to the space of $$L^2$$?

I hope you could give me hints on these. Thank you!

• As far as I know a real trigonometric polynomial is a function of the form: $f(x) = a_0 + \Sigma_{j=1}^{n} a_n \cos(jx) + \Sigma_{j=1}^{n} b_n \cos(jx)$. This clearly shows that as an algebra it separates points. Feb 19, 2019 at 6:14
• As an aside note, not only they are dense but we have a formula for constructing this trig polynomials that approximate (a continuous function in this case) which is quite important. As Kavi Rama Murthy said, in $L^2$ the continuous functions are dense. See this post: math.stackexchange.com/questions/226049/… Feb 19, 2019 at 6:21

Apply Stone - Weierstrass Theorem to $$C(T)$$ where $$T$$ is the unit circle. Trig. polynomials do separate points here.
a) unform convergence implies convergence in $$L^{2}$$ and
b) $$L^{2}$$ functions can be approximated by continuous functions.
• Thank you for the answer! I wonder if you could further explain what it means to apply it to $C(T)$? and also could you provide the reference for the second fact? Thank you! Feb 19, 2019 at 19:43
• The circle $T$ is a compact Hausdorff space and a continuous periodic function $f$ on $[0,2\pi]$ corresponds to a continous function $g$ on $T$ by the formula $g(e^{it})=f(t)$. Part b) of my answer is very standard and a proof can be found in any book on real analysis. In particular Rudin's RCA has a proof. Feb 19, 2019 at 23:08