# Graph of Topologist's Sine Curve

I'm looking for whether the graph of topologist's sine curve and closed topologist's sine curve are closed or not. But due to some misconception, I'm facing problems with this.

$$\underline{\text{Question} : 1}$$ Here it proves that if $$f\colon X\to Y$$ continuous and $$Y$$ is Hausdorff, then the graph $$G_f$$ of $$f$$ is closed.

$$f(x)=\sin\frac1x,x\in(0,1]$$ is continuous and $$\mathbb R^2$$ is Hausdorff, this means $$G_f$$ is closed, but $$G_f\ne\bar{G_f}$$, implying $$G_f$$ is not closed.

$$\underline{\text{Question} : 2}$$ Here it proves that the graph $$G_f$$ of $$f\colon X\to Y$$ is closed in $$X\times Y$$, then $$f$$ is continuous if $$Y$$ is compact.

The closed topologist's sine curve is closed in $$\mathbb R^2$$. If we take a compact subset of $$\mathbb R^2$$ containing this graph, for example take $$[-\frac12,1]\times[-2,2]$$, then the whole curve lies there. And hence $$f\colon[0,1]\to Y$$ is continuous, which is surely not.

As a beginner in topology, I'm certainly missing something, but can't able to see what. It would be great if someone please point out where I'm going wrong.

Question 1: what do you take $$X$$ here to be? If $$X$$ is $$\Bbb{R}$$, then $$f$$ is not defined on all of $$X$$ (it is only defined in $$(0,1]$$). IF $$X$$ is $$(0,1]$$, then the graph should be considered as a subset of (say) $$(0,1]\times \Bbb{R}$$. And there it is indeed a closed subset.
Question 2: The "The closed topologist's sine curve" is not a graph of any function: there is more than one $$y$$ with $$(0,y)$$ in it. So this result cannot be applied.
For $$f(x)=\sin(\frac{1}{x})$$ with domain $$(0,1]$$, we do have that $$G_f$$ is closed as a subset of $$(0,1]\times [0,1]$$ which is consistent with the continuity of $$f$$ on that domain.
If we extend $$f$$ to a function on $$[0,1]$$ then whatever value $$t\in [-1,1]$$ we use for $$f(0)$$, the resulting $$f$$ has a non-closed graph $$G_f$$ in $$[0,1] \times [-1,1]$$, as $$\{0\} \times [-1,1]$$ is in the closure of $$G_f$$, whatever $$f(0)$$ might be, again consistent with the non-continuity of an extended $$f$$ on $$[0,1]$$.
The total "topologist's sine curve", which includes $$\{0\} \times [-1,1]$$, is compact, connected, but is not the graph of any function, so we cannot apply a closed graph theorem to it, directly.