Connectedness of $\{(x,\sin(\frac{1}{x})); x \in ]0,1]\}$ Let $A = \{(x,\sin(\frac{1}{x})); x \in ]0,1]\}$
I need to show that $A$ is connected. I am trying to use the following theorem:

If $(X,d_1)$ and $(Y,d_2)$ are two metric spaces, and $f: X \longrightarrow Y$ is continuous, then the image by $f$ of any connected subset of $X$ is a connected subset of $Y$.

I took $f:$ $]0,1] \longrightarrow \mathbb R^2$, defined by $f(x) = (x, \sin(\frac{1}{x}))$ (which is a very natural choice).
If I can just prove that $f$ is continuous, then we are done. But I have some problems with this:
$1)$ Can I just say that since $g(x) = x$ and $h(x) = \sin(\frac{1}{x})$ are continuous on $]0,1]$, then so is $f$? If not, then what's an instance where this fails?
$2)$ Suppose that I want to prove continuity by showing that if $(x_n)_n$ is a sequence in $]0,1]$ converging to some point $a$, then $(f(x_n))_n$ converges to $f(a)$. There's is no problem when $a$ is in $]0,1]$, but what if $a = 0$? Isn't $a$ adherent to $]0,1]$ and could possibly be $0$? What if I take $x_n = \frac{1}{n}$? This is a sequence in $]0,1]$, converging to $0$, though $f(x_n)$ does not converge in $\mathbb R^2$. It's either that this $f$ is not continuous, or $a$ isn't allowed to be $0$. But if the latter, then why?
 A: (1) Yes, a function $X\to Y\times Z:f(x)=(g(y),h(z))$ (where $X$, $Y$, $Z$ are metric spaces) is continuous if and only if the coordinate functions is.
You can show this directly from the $\varepsilon$-$\delta$ definition: Given an $\varepsilon$ that we want to bound the variation in $f(x)$ about a point, find $\delta_1$ such that $g$ varies by at most $\varepsilon/2$ and $\delta_2$ such that $h$ varies by at most $\varepsilon/2$. Within a distance of $\min(\delta_1,\delta_2)$, the variation in each of the coordinates is at most $\varepsilon/2$, so the variation of all of $f$ cannot exceed $\varepsilon$.
(2) You don't need to handle $a=0$ because $0$ is explicitly not in the domain of $f$. There's no requirement that $f(x_n)$ must converge unless the $x_n$ themselves converge to a point in the domain.
This is not any different from the fact that $x\mapsto 1/x$ is continuous on $]0,\infty[$.
A: *

*The argument is correct. If the functions $h$ and $g$ are continuous, then the function $f = (h,g)$ is also continuous. 

*Since $0 \notin (0,1]$, the sequence $\{\frac{1}{n}\}$ does not converge in $(0,1]$. You do not have to worry about the sequences which are converging to $0$.

