# Density of polynomials in $C^k(\overline\Omega)$

Let $\Omega$ be an open and bounded subset of $\mathbb{R}^2$ and let $C^k(\Omega)$, $1\leq k<\infty$, be the space of functions $f$ with continuous derivatives of order $\leq k$ in $\Omega$, endowed with the usual topology of semi-norms $$|f|_{K}=\sup_{|p|\leq k}~\sup_{x\in K}|(\partial/\partial x)^p f(x)|,$$ where $K$ runs over the compact subsets of $\Omega$. Then, the polynomials are dense in $C^k(\Omega)$, see e.g. Treves, Topological vector spaces, distributions and kernels.
Let us now consider the subset $C^k(\overline\Omega)\subset C^k(\Omega)$ of functions whose derivatives extend continuously up to the boundary of $\Omega$, endowed with the topology of the norm $$\|f\|_{\overline\Omega}=\sup_{|p|\leq k}~\sup_{x\in\overline\Omega}|(\partial/\partial x)^p f(x)|.$$ Is it true that the polynomials are dense in $C^k(\overline\Omega)$ ?
By Whitney extension theorem, if $\Omega$ has some smoothness, like quasi-convexity, functions of $C^k(\overline\Omega)$ can be extended, which implies density of polynomials, so my question is about general $\Omega$.
I would appreciate any reference, counter-example,...
I am also interested in the case of $C^\infty(\overline\Omega)$ defined as the intersection of all $C^k(\overline\Omega)$.

To answer the comment by ACL, here is an exemple of a domain $\Omega\subset\mathbb{R}^{2}$ and a function $f\in C^{1}(\overline\Omega)$ which cannot be extended to any neighborhood of $\overline\Omega$ :

Define the domain $\Omega$ to be the square centered at the origin, of length 2, from which a spine delimited by $y=\pm e^{-1/x}$, $x\geq 0$, has been removed. The function $f$ is the zero function except on the first quadrant where $f(x,y)=x^{2}$. Then $f$ is $C^{1}$, and $f$ and its derivatives of order 1 admit continuous limits on the boundary of $\Omega$, hence, by definition, $f\in C^{1}(\overline\Omega)$. If $f$ could be continued to a $C^{1}$ function on a neighborhood of $\overline\Omega$, it would be Lipschitz at 0, which is not the case since there is no constant $C$ such that $x^{2}\leq 2Ce^{-1/x}$ when $x\to 0$.

• I'm sorry i missed your (nonstandard?) definition of $C^k(\Omega)$. Thanks for the example.
– ACL
Jul 4, 2016 at 22:43

No, the polynomials will not be dense in general.

The following example is essentially one-dimensional. Let $$C\subset[0,1]$$ be the usual ternary Cantor set and $$g\colon[0,1]\to[0,1]$$ the Cantor function (a.k.a. Devil's staircase). Then $$g$$ is continuous and locally constant on the open set $$U := (0,1)\setminus C$$.

Set $$\Omega := U\times(0,1)$$ and let $$f\colon\Omega\to\mathbb{R}$$ be given by $$f(x,y)=g(x)$$. Obviously $$f\in C^\infty(\Omega)$$ and $$f$$ and all of its partial derivatives have continuous extensions to $$\overline{\Omega}=[0,1]\times[0,1]$$. So $$f\in C^\infty(\overline{\Omega})$$ by definition.

But $$f$$ cannot be approximated in $$C^1(\overline{\Omega})$$ by a sequence of polynomials $$(p_k)$$ as $$\partial_x p_k$$ would need to converge uniformly to $$0$$ on $$\overline{\Omega}$$, which is impossible since for any fixed $$y\in(0,1)$$ one then has both $$p_k(1,y)-p_k(0,y)=\int_0^1 \partial_x p_k(t,y)dt\to 0$$ and $$p_k(1,y)-p_k(0,y)\to g(1)-g(0)=1$$ as $$k\to\infty$$.

By a straightforward modification (add a horizontal box to the bottom of $$\Omega$$ and multipy $$f$$ with a suitable smooth cut-off function) one can obtain an example where $$\Omega\subset\mathbb{R}^2$$ is connected.

It is also possible to make $$\Omega$$ topologically regular, i.e. make it satisfy $$\operatorname{Int}(\overline{\Omega})=\Omega$$. This can be accomplished by punching tiny holes $$B_k$$ into $$\Omega$$ (so the $$B_k$$ are disjoint closed balls contained in the original $$\Omega$$) that accumulate exactly at $$C\times[0,1]$$. Note that the holes can made arbitrarily tiny to ensure that $$\sum_k\mathcal{H}^1(\partial B_k)<1/4$$, where $$\mathcal{H}^1$$ denotes the one-dimensional Hausdorff measure. In particular, one can still apply the above argument based on the fundamental theorem of calculus on some horizontal line that does not hit the holes.

• Thanks for this example, but when you extend $f$ to $[0,1]$ by continuity, you get the Cantor function which is not a $C^1$ function, I am missing something ? Mar 24, 2018 at 9:28
• @user111 Indeed, the function $g$ is not differentiable on $[0,1]$, but it is $C^\infty$ on $U$ and all of its derivatives on $U$ extend continuously to $\overline{U}=[0,1]$. So according to your definition, $g\in C^1(\overline{U})$. Your space $C^1(\overline{(0,1)\setminus C})$ is not the same as the usual $C^1([0,1])$. So I still think that this answers your question. Please clarify if I don't understand your definition/question correctly. Mar 24, 2018 at 14:02
• Indeed, you are right. So you found a very nice example ! The definition I used for $C^k(\overline{\Omega})$ is as in the book by Gilbarg and Trudinger on elliptic pde's. Your example makes me think that it would be natural to add to this definition of $C^k(\overline{\Omega})$ the fact that the functions are in $C^k(\text{Int}(\overline{\Omega}))$. A priori, I have no idea if density of polynomials would then hold with this extra condition. Also, is it straightforward to obtain a connected $\Omega$ from your example ? Many thanks again. Mar 24, 2018 at 16:12
• @user111 In order to obtain a connected example in $\mathbb{R}^2$ you can consider $\tilde{\Omega}:=\Omega\cup((0,1)\times(0,1/4))$ and $\tilde{f} := \varphi f$, where $\varphi$ is a suitable smooth cut-off function that is $1$ on a neighbourhood of $[0,1]\times[3/4,1]$ and $0$ on a neighbourhood of $[0,1]\times[0,1/2]$. Mar 24, 2018 at 16:35
• @user111 I added a paragraph to address the extra condition from your second comment (which is satisfied if $\Omega$ is topologically regular). I came up with these types of examples in order show that the closures of $W^{1,p}(\Omega)\cap\operatorname{Lip}(\Omega)$ and $W^{1,p}(\Omega)\cap C(\overline{\Omega})$ in the Sobolev space $W^{1,p}(\Omega)$ are different in general. Mar 24, 2018 at 17:18