I am looking for a simple reference to the following fact:



> 
> If $f:\Omega\to\mathbb{R}$ is continuous, where $\Omega\subset H$ is an open subset of a separable Hilbert space $H$, then for any $\varepsilon$ we can find a $C^\infty$ smooth function $f\_\varepsilon:\Omega\to\mathbb{R}$ such that $|f(x)-f\_\varepsilon(x)|<\varepsilon$ for $x\in\Omega$.
> 
> 
> 


This result is stated on page 758 in [2] and it follows from results of [1] and the existence of a smooth partition of unity in $H$.


Is there any more direct and more recent reference? It is quite hard to read the original paper of Bonic and Frampton since they discuss much more general results and I believe there should be a much more straightforward reference to this fact.


**[1] R. Bonic, J. Frampton,** Smooth functions on Banach manifolds. *J. Math. Mech.* 15 (1966), 877–898.


**[2] J. Eells,** A setting for global analysis. *Bull. Amer. Math. Soc.* 72 (1966), 751–807.



Density of smooth function in Hilbert spaces
I think the paper of Bonic and Frampton is a good reference, but it is true that for a specific result like the one you are after, there is some amount of lingo that one can bypass. Here is my take on their proof, very heavily inspired by their Theorem 1. I must add that there might very well be a more readable proof of the fact in a classical book, I did not go through an extensive search.


Let $H$ be a separable Hilbert space,¹ and fix $\phi:\mathbb R\to\mathbb R\_+$ a smooth function with $\{\phi>0\}=(0,\infty)$, for instance $t\mapsto\mathbf 1\_{t>0}\exp(-1/t)$.



> 
> **Lemma 1 (bump function).**
> There exists a smooth function $f:H\to\mathbb R$ with bounded support.
> 
> 
> 


In particular, we immediately get (using translations and dilations, and considering squares) that the collection of open sets $\{f>0\}$, for $f:H\to\mathbb R\_+$ smooth, is a basis.


*Proof.*
The function $Q:x\mapsto|x|\_H^2/2$ is smooth (its derivatives are $D\_xQ=\langle x,\cdot\rangle\_H$, $D\_x^2Q = \langle\cdot,\cdot\rangle\_H$, $D\_x^kQ=0$ for $k\geq3$), so $x\mapsto\phi(1-Q(x))$ is such a function by smoothness of composite functions.



> 
> **Lemma 2 (Partition of unity).**
> Let $\mathscr U$ be a collection of open sets in $H$ with union $\Omega$. There exists sequences of open sets $U\_n\in\mathscr U$ and smooth functions $f\_n:H\to\mathbb R\_+$ such that
> 
> 
> 1. $\operatorname{supp}(f\_n)\subset U\_n$;
> 2. every point $x\in\Omega$ admits a neighbourhood $V\_x$ such that $\{f\_n>0\}$ intersects $V\_x$ only for finitely many $n$.
> 3. the function $\sum\_{n\geq0}(f\_n)\_{|\Omega}$ (well-defined and smooth according to the previous point) is constant equal to 1.
> 
> 
> 


*Proof.*
It suffices to find sequences that satisfy 1. and 2., together with the fact that for every $x\in\Omega$, $f\_n(x)>0$ for at least one $n$. Indeed, if $\mathscr V$ is the collection of every open ball whose closure belongs to some $U\in\mathscr V$, and $\tilde f\_n$ is given by the modified lemma, then the collection of $f\_n:=\tilde f\_n/\sum\_{m\geq0}\tilde f\_m$ satisfies 1., 2. and 3. (the sum might not be well-defined and smooth out of $\Omega$, but it is fine in a neighbourhood of $\operatorname{supp}(\tilde f\_n)$ by definition of $\mathscr V$).


We know from the bump function lemma that open sets of the form $\{g>0\}$ for $g:H\to\mathbb R\_+$ and $\operatorname{supp}(g)\subset U\in\mathscr U$ cover $\Omega$. Passing to a countable subcover,² we find a countable collection of smooth non-negative functions $g\_n$ such that for every $x\in\Omega$, we have $g\_n(x)>0$ for at least one $n$.


Define
$$f\_n:x\mapsto g\_n(x)\prod\_{m<n}\phi\big(2^{-n}-g\_m(x)\big).$$
Let us show that for an appropriate choice of $U\_n$, it satisfies 1., 2. and the modified 3. It is clearly non-negative and smooth. We have
$$\{f\_n>0\} = \{g\_n>0\}\cap\bigcap\_{m<n}\{g\_m<2^{-n}\},$$
so $\operatorname{supp}(f\_n)\subset\operatorname{supp}(g\_n)\subset U\_n$ for a well-chosen $U\_n\in\mathscr U$; this is point 1. For fixed $x\in\Omega$, if $n(x)$ is the first $n$ such that $g\_n(x)>0$ (which exists by the above), then clearly $x\in\{f\_{n(x)}>0\}$; this is point 3. Now setting
$$V\_x = \{g\_{n(x)}>g\_{n(x)}(x)/2\},$$
clearly $V\_x$ is an open neighbourhood of $x$. Moreover, for all $n>n(x)$ large enough, $2^{-n}<g\_{n(x)}(x)/2$ and $\{f\_n>0\}\subset\{g\_{n(x)}<2^{-n}\}$ cannot intersect $V\_x$. This is point 2.


Using the lemma, the result you state is classical.



> 
> **Proposition.**
> For $\Omega\subset H$ open, $u:\Omega\to\mathbb R$ continuous and $\varepsilon>0$, there exists $u\_\varepsilon:\Omega\to\mathbb R$ smooth such that $|u-u\_\varepsilon|\_\infty<\varepsilon$.
> 
> 
> 


*Proof.*
Let $\mathscr U$ be the collection of open balls in $\Omega$ such that $|u-u(\text{centre})|\_\infty<\varepsilon/2$ over said ball. Since $u$ is continuous, it is an open cover of $\Omega$. By the lemma, there exists sequences $(f\_n)$, $(x\_n)$, $(r\_n)$ satisfying points 1., 2. and 3. with $U\_n=B\_{x\_n}(r\_n)$ the open ball with centre $x\_n$ and radius $r\_n$. The sum
$$u\_\varepsilon:=\sum\_{n\geq0}u(x\_n)f\_n$$
satisfies $|u-u\_\varepsilon|\_\infty<\infty$, since
$$|(u-u\_\varepsilon)(x)| = \left|\sum\_{n\geq0}\big(u(x)-u(x\_n)\big)f\_n(x)\right|\leq\sum\_{n\geq0}\varepsilon f\_n(x)=\varepsilon.$$




---


¹ It is possible that the result is true for $H$ larger (not separable), using things like: from every cover $\mathscr U$ of $H$, we can extract a (possibly uncountable) subcover $\mathscr V$ with a map $\mathscr V\mapsto\mathbb N$ such that all $U,V\in\mathscr V$ with the same label are disjoint. This is true in every paracompact space, but I am not entirely sure we can modify Lemma 2 to get this general case.


² $H$ is separable, hence it admits a countable basis, and the same holds for $\Omega$. For every pair $U\subset V$ of elements in the countable basis, take one $W$ in the support-of-smooth-functions basis such that $U\subset W\subset V$, if it exists; the result is a countable subcover. This relies on choice as is, but if the countable dense subset is given one can find a (big) explicit such countable cover.


