Function spaces $C^k(\overline{U})$ and $C^k(U)\cap C(\overline{U})$

Let $U\subset \mathbb{R}^n$ be a domain. $C^k(\overline{U})$ is defined as $$C^k(\overline{U})=\{f\ \in C^k(U) \ | \ D^\alpha f \text{ is uniformly continuous for all } |\alpha|\le k\}.$$ I wonder how this function space is different from $C^k(U)\cap C(\overline{U})$. Could anyone give me an example which illustrate how these are different?

-
Sorry the latter space should be $C^k(U)\cap C(\overline{U})$, instead of $C^k(U)\cap C(U)$. – M. K. Oct 10 '12 at 3:53
Then $x \sin \left( \frac{1}{x} \right)$ is an example of a function in $C^1((0,1)) \cap C([0,1]$ but not in $C^1([0,1])$. – levap Oct 10 '12 at 5:35

The difference is between mere continuity and uniform continuity. Let $U \subset \mathbb{R}^n$ be an open subset. Define the following vector spaces:

1. $C^k(U) = \{ f : U \rightarrow \mathbb{R} \; | \; f \; \mathrm{has\;continuous\;derivatives\;}D^{\alpha}f \mathrm{\;of\;all\;orders\;} |\alpha| \leq k \}$
2. $C_B^k(U) = \{ f \in C^k(U) \; | \;\sup_{x \in U}|(D^{\alpha}f)(x)| < \infty, \;\; \forall |\alpha| \leq k \}$
3. $C_B^k(\overline{U}) = C^k(\overline{U}) \cap C^k_B(U)$

The thing to have in mind is that the difference between all the spaces above is the "amount of control" you have at the boundary. Consider first $k = 0$.

1. $C^0(U)$ consists of all continuous functions on $U$. Take $f \in C^0(U)$. If $K \subset \subset U$ is a compact subset of $U$, then you know that $\sup_{x \in K} |f(x)|$ is finite. But if you take "larger" and larger compact subsets that are contained in $U$, as you approach the boundary of $U$, the $\sup$ over $K$ might grow unbounded. And indeed, this space contains also unbounded continuous functions.
2. $C_B^0(U)$ consists of all the continuous and bounded functions on $U$. They don't blow up as you approach the boundary, and you have some control. The expression $||f||_{\infty} = \sup_{x \in U} |f(x)|$ is well defined on all members of $C_B^0(U)$ and is a norm that turns the space into a Banach space.
3. $C^0(\overline{U})$ consists of all uniformly continuous functions on $U$. Such functions necessarily can be extended to the closure $\overline{U}$, hence the notation. If the domain $U$ is bounded, then the extension will be a continuous function on a compact set and hence bounded, so $C^0(\overline{U}) \subset C_B^0(U)$ (and is a closed subspace of $C_B^0(U)$). To see this might be a proper inclusion, you can take $U = (0,1)$, $f(x) = \sin \left(\frac{1}{x}\right)$. So you get even more control - functions in this space are bounded and can be extended to the boundary. If the domain $U$ is unbounded, then you can still extend functions to the closure, but it doesn't imply that the functions are bounded and so $C^0(\overline{U}) \subsetneq C^0_B(U)$.
4. $C_B^0(\overline{U})$ consists of all uniformly continuous and bounded functions and so they extend to bounded functions on the boundary. This is a Banach subspace of $C^0_B(U)$.

So to summarize - you generally have: $$C_B^0(\overline{U}) \subsetneq C^0_B(U) \subsetneq C^0(U).$$ If $U$ is bounded, you have $C_B^0(\overline{U}) = C^0(\overline{U})$. If $U$ is unbounded, then you can have functions in $C^0(\overline{U})$ which are not in $C^0_B(U)$.

You can impose even more "control at the boundary", by considering functions that vanish at infinity (here, the boundary), compactly supported functions, etc. When $k > 0$, you can replace in the description above "functions" with "functions together with their derivatives" and play with examples such as $x \sin \left( \frac{1}{x} \right)$.

-
Thank you for the detailed answer. This is excellent and contains everything I wanted to know! Now that I have a better understanding of these function spaces and even familiar with them. – M. K. Oct 10 '12 at 18:38