Weierstrass Approximation Theorem Question Is it possible to prove the trigonometric version of the Weiestrass Approximation Theorem (functions in $S^1$) using the regular Weierstrass Approximation Theorem (functions in $\mathrm{C}([a,b], \mathbb{R})$) by composing the polynomial with a mapping from $[a,b]$ to $[0,2\pi]$ ? If yes, can you show such mapping?
Edit:sorry, I wanted to say $S^1$.
 A: For $f\in C[0,2\pi]$ with $f(0)=f(2\pi),$ let $f_1(x)=(f(x)+f(\pi -x))/2$ and $f_2(x)=(f(x)-f(\pi -x))/2.$
The function $h_1(x)=\cos^{-1} x$ is a continuous bijection from $[-1,1]$ to $[0,\pi].$ So both $h_1$ and $h_1^{-1}$ are continuous.  The function $g_1(y)=f_1(h_1(y))$ is continuous on $[-1,1]$. Now $g_1(y)=g_1( -y)$ for all $y, $ so $g_1$ can be uniformly approximated by a polynomial $p_1$  with $p_1(-y)=p_1(y)$ for all $y.$ Therefore $f_1(z)$, for all $x\in [0,2\pi]$ is uniformly approximated by    $p_1(h^{-1}(x))=p_1(\cos x).$ 
Similarly, $h_2(x)=\pi /2+\sin^{-1}x$ is a continuous bijection from $[-1,1]$ to $[0,\pi]$ so we can uniformly approximate $g_2(x)=f_2(h_2(x))$ by $p_2(\sin x)$ with some polynomial $p_2$  such that $p_2(-y)=-p_2(y)$ for all $y$.  So $f_2(x)$ is uniformly approximated by $p_2(\sin x)$ for all $x\in [0,2\pi].$  
So $f=f_1+f_2$ is uniformly approximated by $p_1(\cos x)+p_2(\sin x)$ over $x\in [0,2\pi ].$
Appendix: Regarding approximating even (odd) functions by even (odd) polynomials: For $g\in C[-1,1] :$
(1). If  $g$ is even: Approximate $g(\sqrt {|x|})$ for $x\in [0,1]$   by polynomial $q(x).$ Then $g(x)=g((\sqrt {|x|})^2)$ is approximated by $q(x^2)$ for $x\in [-1,1].$
(2). If g is odd: Approximate $g(x)$ by polynomial $q_1(x)$ for $x\in [0,1].$ Then $q_2(x)=q_1(x)-q_1(0)$ approximates $g(x)$ for $x\in [0,1]$ because $g(0)=0.$ Now $q_2(x)=xq_3(x)$ with $q_3$ polynomial,  because $q_2(x)=0.$ Let $j(x)=q_3(|x|)$ for $x\in [-1,1].$ By (1), $ j(x)$ is approximated by $q_4(x^2)$ for some polynomial $q_4.$  So $xq_4(x^2)$ approximates $g(x)$ for $x\in [-1,1].$ 
