Is the graph of $f(x)=\sin(\frac 1x)$ closed? Let $f:X\to Y$ be a function in the metric spaces $X,Y$. The graph of $f$ is the set: $$G(f)=\{(x,f(x));x\in X\}$$ And we say that the graph of $f$ is closed, if the set $G(f)$ is closed in $X\times Y$ by product topology.
Now consider the function $f:[-\frac{2}{\pi},\frac{2}{\pi}] \to [-1,1]$ by: $$ f(x) =
\begin{cases}
\sin(\frac1x),  & \text{if $x\ne 0$ } \\
0, & \text{if $x=0$}
\end{cases}$$ My question is this: Is the graph of $f$ closed? I think the answer is no. Since if the graph of $f$ is closed, it is bounded in $\mathbb R^2$ and so, should be compact. But if $G(f)$ is compact and the domain of $f$ be compact,  then $f$ is continuous (see here). Clearly $f$ isn't continuous at $x=0$. It's enough to consider the sequence $x_n=\frac{1}{n\pi}$ and $w_n=\frac{1}{\frac{\pi}{2}+2n\pi}$. Then, $\lim x_n=\lim w_n =0$ as $n\to \infty$ but $\lim f(w_n)=1$ and  $\lim f(x_n)=0$ as $n\to \infty$.
Is my analysis correct?

Hint.
You're right the graph $G(f)$ is not closed. The point $(0,1)$ belongs to the complement of $G(f)$ in $\mathbb R^2$. However, you can prove that a sequence of point of the graph converges to $(0,1)$.
