Find a polynomial with rational coefficients in an open set of $[0,1]^{[0,1]}$ with the product topology. In topology I was told that the set $Q:=\{f\in\mathbb{Q}[x]:f([0,1])\subset[0,1]\}$ is dense in $[0,1]^{[0,1]}$ with the product topology.
If this is true, I should be able to find a sequence $f_n(x)$ where $f_n(\frac\pi4)\in(1-\frac1n,1]$ and $f_n(1-\frac\pi4),f_n(\frac12+\frac{\pi}{8})\in[0,\frac1n)$. 
I would use interpolating polynomials but the image of $[0,1]$ is outside of $[0,1]$ in every case I've tried. Is there a good strategy for finding such a "locally bounded" interpolating polynomial?
 A: (1). Let $f:[0,2]\to \mathbb R$ be continuous with $f(0)=f(2).$ Let $\sum_{n\geq 0}(A_n\cos \pi nx +B_n\sin \pi nx)$ be the (formal) Fourier series for $f(x).$ $$ \text {Let }\quad  F_n(x)=\sum_{j=0}^n(A_j\cos \pi jx+B_j \sin \pi jx).$$ $$\text {Let }\quad   G_n(x)= \frac {1}{n+1}\sum_{j=0}^n F_j(x).$$
Theorem. (Fejer). $G_n(x)$ converges uniformly to $f(x).$
Note that $f$ restricted to the domain $[0,1]$ can be any continuous function.
Now   each $(A_j\cos \pi jx+B_j\sin \pi jx)$ can be uniformly approximated, for $x\in [0,1],$ by a polynomial with rational co-efficients, by taking  enough terms of the power series, and by replacing $A_n$ and $B_n$ (if necessary) by sufficiently close rationals. By choosing a close enough approximation for each $j\leq n$ we can then obtain a uniform approximation (to within $1/(n+1)$ ) of $G_n(x)$ for $x\in [0,1]$  by a polynomial with rational co-efficients.This gives an explicit (but tedious) method for finding  a sequence     converging uniformly on $[0,1]$ to $f.$ 
(2). Let $S$ be a finite non-empty subset of $[0,1]$ and let us be given $h:S\to [0,1].$  For $r>0$  take $r'\in (0,r/2)\cap (0,1/2)$ such that  $$\forall x\in S\;(\;h(x)\not \in \{0,1\}\implies h(x)\in (r',1-r')\;).$$ 
For $x\in S$ define $h_r(x) $ as follows:
(i). Let $h_r(x)=h(x)$ if $h(x)\not \in \{0,1\}.$
(ii). If $h(x)=1$ let $h_r(x)=1-r'.$
(iii) If $h(x)=0 $ let $h_r(x)=r'.$ 
Extend $h_r$ to a continuous $h_r:[0,1]\to [0,1]$ such  that  $h_r(x)\in [r', 1-r']$ for all  $x\in [0,1] .$
Finally take a polynomial $p $ with rational co-efficients, such that $\sup \{|p(x)-h_r(x)| :x\in [0,1]\}< r' .$ 
Then $p(x)\in [0,1]$ for all $x\in [0,1] $  because $p(x)>h_r(x)-r'\geq r'-r'=0,$ and $p(x)<h_r(x)+r'\leq (1-r')+r'=1.$
And for $x\in S$ we have $$|p(x)-h(x)|\leq |p(x)-h_r(x)|+|h_r(x)-h(x)|<2r'<r.$$
