# Weierstrass approximation theorem in two dimensions

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$$,?

• Well, $xy$ may not separate some points i may pick... Aug 9, 2021 at 13:50
• @dan_fulea I guess (1,2) and (2,1) would both give P(x,y)=2, right? Aug 9, 2021 at 13:52
• Your $A$ is dense, by S-W, fine. But $A$ is not the same as the set of polynomials of the form $p(x)q(y)$! For example $x+y\ne p(x)q(y)$. And in fact the set of all polynomials of that form is not dense... Aug 9, 2021 at 13:53
• There is not so simple to follow Rudin, since Rudin has written a lot... Which particular construction is meant? Please state a clear question with a clear setting, best without a long introduction, if this introduction has no meaning for the question.... How to choose $Q_n$ so that what happens... ?! Aug 9, 2021 at 13:53
• @dan_fulea In Baby Rudin, when he proofs Stone-Weierstrass, he chooses polynomials $Q_n$ as above and then convolve them with the continous function f to find a polynomial $P_n(x)$ that is later shown to approximate the original function f Aug 9, 2021 at 13:58

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$$.
• Great. Then this is a proof that the professor must have missed a "not dense" the question. I have one (probably basic) question about this example. Where did $P(0,0)=0$ come from and doesn't that assume that at least one of $p(x)$ and $q(y)$ have no constant, right? So how does the final conclusion that it is not dense follow from this? My knowledge on this area is pretty shaky right now Aug 9, 2021 at 15:38
• and the only way I have seen to show that something is not dense, is to show that an element (in this case a continous founction) is not a limit point of $P(x,y)$. As previous stated, one such example I guess would be $x+y$ which is not in $P(x,y)$ Aug 9, 2021 at 15:50