Show that $x \sin (\frac {1 } {x } ) $ is uniformly continuous on $(0,1) $ I want to prove that $f(x)=x \sin (\frac {1 } {x } ) $ is uniformly continuous on $0<x<1$.
If we consider the same function with the extra condition that $f $ is defined to equal zero at $x=0 $. then this new function would be continuous on $[0,1 ] $ and thus uniformly continuous.
Now my function isn't defined outside $(0,1)$ is it possible to claim that $f $ is uniformly continuous on $(0,1) $ from this?
Thanks in advance!
 A: In general if a function $f(x)$ is continuous on $(a,b)$ such that both $\displaystyle\lim_{x\to a+}f(x)$ and $\displaystyle\lim_{x\to b-}f(x)$ exists then $f$  is uniform continuous on $(a,b)$ 
A: The function $$\bar{f} (x) =\begin{cases} 0 \mbox{ if } x=0 \\ x\sin\frac{1}{x} \mbox{ if } 0<x\leq 1\end{cases}$$ is continuous and hence uniformly continuous since $[0,1]$ is compact set. Now since $f=\bar{f}|_{(0,1)}$ the function $f$ is uniformly continuous.
A: Yes it's fine; being uniformly continuous on a set implies it is on any subset. I believe being able to extend a continuous function on $(a,b)$ to a continuous function on $[a,b]$ is actually equivalent to being uniformly continuous on $(a,b)$.
A: Let us prove the conjecture in Matt Rigby's answer.

Let $f : (a, b) \to \Bbb R$ be any function. Then, $f$ is uniformly continuous on $(a, b)$ iff $f$ can be extended to a continuous function on $[a, b]$.

Proof. $(\Leftarrow)$ is obvious. (At least from the other answers.)
$(\Rightarrow)$ Suppose $f$ is uniformly continuous on $(a, b)$. We first show that the limit $$\lim_{x \to b^-} f(x)$$ exists. To this end, let $(x_n)_n$ be any sequence in $(a, b)$ converging to $b$. Then, $(x_n)_n$ is Cauchy. Since $f$ is uniformly continuous, the sequence $(f(x_n))_n$ is Cauchy as well and hence, converges. Thus, $\lim_{x \to b^-} f(x)$ exists.
Similarly, $\lim_{x \to a^+} f(x)$ exists. Now, extend $f$ to $[a, b]$ by defining the values at the endpoints to be the appropriate limits. This is now a continuous function. $\qquad \Box$
