# Show every continuous function on [0,$\pi$] is the uniform limit of sequences of function of “polynomials of sin(kx)”(Stone Weierstrass theorem)

The exercise is 26E on Bartle´s Elements of Real Analysis.

It asks to use the fact that every continuous real valued function on $$[0,\pi]$$ is the uniform limit of a sequence of functions of the form: $$\sum_{k=1}^{m} a_kcos(kx)$$ To show that exery continuous real valued function $$f$$ on $$[0,\pi]$$ with $$f(0)=f(\pi)$$ is the uniform limit of a sequence of functions of the form: $$\sum_{i=1}^{n} b_ksin(kx)$$

The book also gives the next hint: If $$f(0)=f(\pi)=0$$, first approximate $$f$$ by a function $$g$$ vanishing on some intervals $$[0,\sigma]$$ and $$[\pi-\sigma,\pi]$$. Then consider $$h(x)=\frac{g(x)}{sin x}$$ for $$x \in (0,\pi); h(x)=0$$ for $$x=0,\pi$$

Because $$g(x)$$ vanishes in intervals near $$0$$ and $$\pi$$, $$h(x)$$ will be continuous on the closed interval $$[0,\pi]$$ (show this) so that we may approximate $$h(x)\approx \sum_{k=1}^ma_k\cos(kx)$$. Then $$g(x)\approx\sum_{k=1}^ma_k\sin(x)\cos(kx)$$. Now, you should find a way of expressing $$\sin(x)\cos(kx)$$ only in terms of $$\sin(ix)$$ for different natural numbers $$i$$ (hint: it should end up being a sum of two different such terms). Of course, the approximations above must be made precise, but I leave that to you.
• How would you prove $h(x)$ is continuous on $[0,\pi]$? That´s the only thing I´m missing. – PLanderos33 Oct 18 '19 at 14:58
• For $x\in (0,\sigma)$, $g(x)=0$ so that $h(x)=0$. Thus, $h(x)$ will be continuous at $0$ by setting $h(0)=0$. – user293794 Oct 18 '19 at 18:31