Approximating $C^2$ functions with compactly supported $C^2$ functions

319 Views Asked by At

Let $C^2$ be the space of twice-continuously differentiable functions from $\mathbb{R}^n$ to $\mathbb{R}$ and $C^2_K$ be the subset of functions in $C^2$ with compact support (that are zero outside some compact set). Given any $f\in C^2$ can we always find a sequence $(f_n)\subset C^2_K$ such that

$$f_n(x)\to f(x),\quad\quad \frac{\partial f_n}{\partial x_i}(x)\to \frac{\partial f}{\partial x_i}(x),\quad\quad \frac{\partial^2 f_n}{\partial x_i\partial x_j}(x)\to \frac{\partial^2 f}{\partial x_i\partial x_j}(x)$$

as $n\to\infty$ for every $i,j$ and $x\in\mathbb{R}^n$ and such that

$$|f(x)|+\sum_{i}\left|\frac{\partial f_n}{\partial x_i}(x)\right|+\sum_{i,j}\left|\frac{\partial^2 f_n}{\partial x_i\partial x_j}(x)\right|\leq \alpha\left(|f(x)|+\sum_i\left|\frac{\partial f}{\partial x_i}(x)\right|+ \sum_{i,j}\left|\frac{\partial^2 f}{\partial x_i\partial x_j}(x)\right|\right)+\beta$$

for every $x\in\mathbb{R}^n$ and some constant (independent of $n$) $\alpha,\beta\geq0$? Or do we need some extra assumptions on $f$?

What about the if we replace $C^2$ with the space of smooth functions $C^\infty$ and $C^2_K$ with the space of compactly supported smooth functions $C^\infty_K$?

My initial thought was setting $f_n(x):=e^{-||x||_1/n}f(x)$, however these are not smooth (differentiability fails at $x=0$) and I couldn't then see how to approximate the $f_n$ with functions in $C^2_K$ (or $C^\infty_K$)).

Any references to a source where this type of results are discussed are very welcome.