Is the space of polynomials $\mathcal{P}(\mathbb{R}^n)$ dense in $\mathscr{C}(\mathbb{R}^n)$? By the Stone-Weierstrass theorem, it is easy to see that the polynomials on a compact Hausdorff space and dense in the space of continuous functions on that same compact Hausdorff space. 
The space $\mathbb{R}^n$ is not compact though. Is it still true that $\mathcal{P}(\mathbb{R}^n)$ is a dense subset of $\mathscr{C}(\mathbb{R}^n)$?
 A: Assuming you mean to give $\mathscr{C}(\mathbb{R}^n)$ the topology of uniform convergence, then $\mathcal{P}(\mathbb{R}^n)$ is very far from being dense.  For instance, if $f\in\mathscr{C}(\mathbb{R}^n)$ is any bounded continuous function, then it is infinitely far away from any nonconstant polynomial in the supremum "norm", since any nonconstant polynomial is unbounded.  Since any limit of constant functions is constant, this means a bounded function $f$ cannot be uniformly approximated by polynomials unless $f$ is constant.
A: Adding to what others have said, it's worth noting the result holds if we equip $\mathscr{C}(\mathbb R^n)$ with the topology of local uniform convergence. That is, $f_k \rightarrow f$ provided for all $K \subset \mathbb R^n$ compact, we have $f_k \rightarrow f$ uniformly on $K.$
Indeed given $f \in \mathscr{C}(\mathbb R^n),$ for each $k \in \mathbb N$ by Stone-Weierstrass we can find $f_k \in \mathcal{P}(\mathbb R^n)$ such that for all $x \in [-k,k]^n,$ $|f_n(x)-f(x)| \leq 1/k.$ Then for all $K \subset \mathbb R^n$ comapct, we can find $k_0 \in \mathbb N$ such that $K \subset [-k,k]^n$ for all $k \geq k_0.$ Hence $f_k \rightarrow f$ uniformly on $K$ as $k \rightarrow \infty.$
A: It is not even true that any continuous function on $\mathbb{R}$ can be uniformly approximated by a sequence of polynomials: consider $\frac{1}{x^2+1}$, for instance. However, if your question is meant to be

Given a continuous function $f:[0,1]^n\to\mathbb{R}$, can we find a sequence of polynomials in $n$ variables providing a uniform approximation of $f$ on $[0,1]^n$?

The answer is affirmative. Let us consider just the case $n=2$ for simplicity. If we consider some large $N\in\mathbb{N}$ and the "generalized Bernstein polynomial"
$$ P_{j,k}(x,y)=\binom{N}{k}\binom{N}{j}x^j(1-x)^{N-j}y^k(1-y)^{N-k} $$
we have that $P_{j,k}(x,y)$ is non-negative over $[0,1]^2$, has a unit integral and is concentrated at $\left(\frac{j}{N},\frac{k}{N}\right)$. Then it is not difficult to prove that the sequence of polynomials
$$ Q_N(x,y) = \sum_{j,k=0}^{N} P_{j,k}(x,y)\cdot f\left(\frac{j}{N},\frac{k}{N}\right)$$
gives a uniform approximation of $f$ over $[0,1]^2$. 
For short: it is not difficult to extend Bernstein's proof of the Weierstrass approximation Theorem to the multi-dimensional case.
