Find a continuous onto map from $(0,1]$ to $(-1,1)$. Find a continuous onto map from $(0,1]$ to $(-1,1)$.
My attempt: Would it be $f(x) = x^2 \sin\frac{1}{1-x}$? Am I correct?

$(1-x)\sin(1/x)$ works.
However, such a function can't have a limit at $0.$
Proof: Since $f(x)$ gets arbitrarily close to $1$, we can construct a sequence of values where it gets within $1/2^n$ of $1.$ Call this sequence $s_n.$ By the Bolzano-Weierstrass theorem, since it is bounded, it has a convergent subsequence $t_n.$ Let the limit of $t_n$ be $l.$ If $l \in (0,1],$ then $f(l) = 1.$ This is a contradiction, since $1$ is not in the range of $f.$ Therefore, $l$ must be $0.$ Therefore, $\lim_{x \to 0} f(x) = 1.$ By similar logic, we can get that $\lim_{x \to 0} f(x) = -1.$ This is a contradiction, so no such function exists.
