How to show a function can or cannot be extended to a compactification?

This comes from Munkres 38.2. Let $Y$ be the compactification of $(0,1)$ induced by $h(x) = (x,\sin(1/x))$. Show that $g(x) = \cos(1/x)$ cannot be extended to this compactification $Y$.

Also I wonder in general how to show a function can or cannot be extended to a compactification induced by some other function.

Here is my attempted solution under the hint of Brian Scott:

Let $Y$ denote the compactification of $(0,1)$ induced by $h(x) = (x,\sin (1/x))$. Let $Y_0$ be $H(Y)$ where $H$ is the extension of $h$. Suppose we can extend $g$ to a continuous function $G: Y\to \mathbb{R}$, then the function $G\circ H^{-1}: Y_0 \to \mathbb{R}$ is also continuous. Consider the sequence $\{h(\frac{1}{k\pi})\}_{k\in\mathbb{Z}_+} = \{(\frac{1}{k\pi}, 0)\}_{k\in\mathbb{Z}_+}$ in $Y_0$, then $h(\frac{1}{k\pi}) \to (0,0)$ in $Y_0$, by continuity of $G\circ H^{-1}$ we must have $\lim_{k\to\infty}G(H^{-1}(h(\frac{1}{k\pi}))) = \lim_{k\to\infty} G(\frac{1}{k\pi}) = G(0)$. However, $G(H^{-1}(h(\frac{1}{k\pi}))) = g(\frac{1}{k\pi}) = (-1)^k$ does not converge, which is a contradiction. Hence $g$ cannot be extended to a continuous map on $Y$.


HINT: Consider the sequence $\langle x_n:n\in\Bbb Z^+\rangle$ in $(0,1)$, where $x_n=\frac1{n\pi}$.

  • What is the sequence $\langle h(x_n):n\in\Bbb Z^+\rangle$? Does it converge in $Y$?
  • What is the sequence $\langle g(x_n):n\in\Bbb Z^+\rangle$?

Remember, if we can extend $g$ to a function $G:Y\to\Bbb R$, we must have $G\big(h(x)\big)=g(x)$ for each $x\in(0,1)$. And in order for $G$ to be continuous, it must be true that if a sequence $\langle y_n:n\in\Bbb Z^+\rangle$ in $Y$ converges to some point $y\in Y$, then $\langle G(y_n):n\in\Bbb Z^+\rangle$ converges to $G(y)$.