Show that polynomials $P(x,y)=p(x)q(y)$ are dense in $C([0,1]^2,\mathbb{R})$ (i.e. the set of continous functions in two variables).
My attempt:
Based on inspiration from Multivariate Weierstrass theorem?
$M=[0,1]\times[0,1]$, $A=\{p:[0,1]\times[0,1] \rightarrow \mathbb{R}, \text{p are polynomials}\}$
Since $M$ is a compact metric space and $A\subset C([0,1]^2,\mathbb{R})$ is a function algebra that separates points and that vanishes nowehere, then by Stone-Weirestrass, $A$ is dense in $C([0,1]^2,\mathbb{R})$.
That A is closed under addition, multiplication, and scalar multiplication is clear. To show that it separates points, take $(r_1,r_2),(s_1,s_2) \in M $ not equal. Then $P(x,y)=xy$ separates points. The $P(x,y)=1$ vanishes nowhere.
I think that this is a correct proof of the statement.
However, I also think that there is a way of using only the Weirestrass approximation theorem since the special structure of the polynomials are $P(x,y)=p(x)q(y)$. Following Rudin, how would you in that case choose the polynomials that in one variable looks like $Q_n(x)=c_n(1-x^2)^n$,?
Best Answer
For convenience let $\prod$ (for "product") denote the set of all polynomials of the form $p(x)q(y)$. In fact $\prod$ is not dense in $C([0,1]^2)$. Your algebra $A$ is dense, by the S-W theorem, but $\prod$ is a proper subset.
Details: First, note that if $P\in\prod$ then $$P(0,0)P(1,1)=P(0,1)P(1,0).$$So if $P_n\in\prod$ and $P_n\to f$ then $f(0,0)f(1,1)=f(0,1)f(1,0)$; hence $f(x,y)\ne x+y$.