Let $M$ be an $m$-dimensional manifold and $N$ be an $n$-dimensional manifold *[with boundary](https://en.wikipedia.org/wiki/Manifold#Manifold_with_boundary)*. Suppose also that the topology on $N$ can be described by a metric. Thus, the set $C(M,N)$ can be endowed with the topology of [uniform convergence on compacta](https://en.wikipedia.org/wiki/Compact_convergence). 


Intuitively it seems that every continuous function $f:M\rightarrow N$ can be approximated by continuous functions of the form $g:M\rightarrow\operatorname{int}(N)$; where $\operatorname{int}(N)=N- \partial N$, $\partial N$ denoting the boundary of $N$. But is this formally true? I.e., is it true that


$$
\overline{C(M,\operatorname{int}(N))} = C(M,N)?
$$




---


Prototype construction: Let $N=[0,b)$ then any function $f$ can be approximated by:
$$
f\_n= \min\left(\frac1{n},f\right)
,
$$
of course, these are continuous but not smooth (since we don't need smoothness this is not an issue). I expect this type of construction can be generalized.



Density of continuous functions to interior in set of all continuous functions
A boundary of a paracompact manifold has a collar neighborhood, i.e. $U\subset N$ that includes $\partial N$ and is homeomorphic to $\partial N\times [0,1)$ via a map $\psi$ that maps $\partial N$ onto $\partial N\times \{0\}$. Therefore, I will be talking about the points in $U$ as if they were in $\partial N\times [0,1)$.


For $n>1$ define a sequence of continuous maps $\varphi\_{n}:N\to int(N)$ which is the identity on $N\backslash (\partial N\times [0,\frac{1}{n}))$, and such that $\varphi\_{n}(x,t)=(x,\frac{1}{n})$, if $(x,t)\in \partial N \times [0,\frac{1}{n})$. Clearly, $\varphi\_{n}$ converges to the identity map in the compact-open topology.


Now, if $f:M\to N$, the sequence $\varphi\_n\circ f$ converges to $f$ in the compact open topology, since composition of map is a continuous operation with respect to the compact-open topology.




---


Note that the fact that $M$ is a manifold is not used, while the fact that $N$ is a manifold is used rather lightly. I wonder under which condition on a connected metric spaces $M$, $N$ and $F\subset N$ the set $C(M,N\backslash F)$ is dense in $C(M,N)$?


Originally (without putting much thought into it) I suggested $F$ to be merely closed nowhere dense and not separating $N$, but @Pietro Majer swiftly refuted that "conjecture".


