every function in $C^k_0(U)$ is $C^k_0(\mathbb{R}^d)$ Often in many proofs we treat functions in $C^k_0(U)$ (the set of $C^k$ functions with compact support where $U$ is an open set in $\mathbb{R}^d$) as functions in $C^k_0(\mathbb{R}^d)$.They extend it by zero without saying why this new function if of compact support.
$$
\DeclareMathOperator{\supp}{\operatorname{supp}}
\begin{align}
C^k_0 &=\{f\in C^k(U):\: \supp(f) \text{ is compact }\} \\
\supp(f) & =\overline{\{x\in U,f(x)\neq 0\}}
\end{align}
$$
Here are my questions that might help me understand. I

*

*Is the closure in the definition of the support taken relatively to $\mathbb{R}^d$ topology, or to the induced topology over $U$?

*Is it true that $\supp(f)$ need not to be closed in $\mathbb{R}^d$  if it is taken relatively to the subspace topology, because
$$
\supp(f)=\overline{\{x\in U,f(x)\neq 0\}}^{\,U}=\overline{\{x\in U,f(x)\neq 0\}}^{\,\mathbb{R}^d}\cap U
$$
and if we take the colsure in $\mathbb{R}^d$ then $\supp(f)$ might be going outside $U$?

Thank you.
 A: Actually, it's impossible for the support to go outside $U$ in either case, if $U$ is open and the support is assumed compact. If a function $f$ has compact support $K = \text{supp}(f)$ in $U$ then the distance from $K$ to $\partial U$ is strictly positive. This is because, viewed as subsets of $\mathbb{R}^d$, $K$ compact, $\partial U$ closed implies the distance between the two sets is attained by some $p \in K, q \in \partial U$. If the distance were zero, then $p = q$ and $K \cap \partial U \neq \emptyset$. But as $K \subset U$, where $U$ is open, this says that $U \cap \partial U \neq \emptyset$, a contradiction (open sets don't intersect their boundaries). Therefore the distance from $K$ to $\partial U$ is strictly positive. It follows from this that compactness of the support in $U$ under the subspace topology is equivalent to compactness of the support in the topology of $\mathbb{R}^d$ (I think this also follows from general topological arguments). As you point out, this is not true for closedness of the support. This is one indication that compactness is stronger/more important in some senses than closure.
