- Here https://math.stackexchange.com/q/76864 for example is the proof that a uniformly continuous function on a dense subset of a metric space to a compact space can be uniquely extended to the whole space.
- And, $f: \mathbb R \setminus 0 \to \mathbb R$ is continuous on its domain but doesn't have a continuous extension to all $\mathbb R$ (in which $\mathbb R \setminus 0$ is dense). One sees that $f$ is not uniformly continuous on its given domain and its range is not compact. So, this result is not unexpected in the context of (1).
- Then consider $f: \mathbb Q \to \mathbb R: f(q) = q^2$. Here $f$ is continuous but not uniformly so and the range is not compact. But $f$ does have a unique continuous extension to all $\mathbb R$, being the well known $f(x) = x^2$.
So my question is whether there is an easily stated condition for the extension of a densely defined continuous function which is not uniformly continuous ?
I note in case (3) that if one considers any closed interval $N = [-n, n] \subset \mathbb R$ then in the subspace topology, $f: \mathbb Q \cap N \to \mathbb R: f(q) = q^2$ we have $f$ is uniformly continuous and the range is a compact subset of $\mathbb R$. Then $f$ has a continuous extension on every interval $N$ and therefore on $\mathbb R$.
Does this generalize in some way ?