# Show that a function is uniformly continuous. Where to start?

Show that the following function is uniformly continuous on $(-1,1)$

$$f(x) = \begin{cases} {x \sin \frac{1} {x}}, & \text{ } x\in(-1,0)\cup(0,1) \\ 0, & \text{ }x = 0. \end{cases}$$

We cannot use the theorem that a continuous function on a compact set K is continuous on K, because we don't have a compact set. I was told the following hint: "if a function is uniformly continuous on a set then it is also uniformly continuous on any subset of this set". I don't know exactly what to do with this information, can you help me ? :)

I know the definition of uniform continuity, I (should) know what open, closed, compact sets are.

Hint: Show that you can extend the definition to $[-1,1]$ and that it is continuous on the closed interval. Then use the theorem about uniform continuity.
• Very fast way to have the conclusion (+1). Good to know that $f(x)=\sin(1/x)$ fails to be U.C. in $(-1,1)$. – mrs Oct 20 '12 at 19:14
• Yes, there is no problem with that. The "magic" happens at $x=0$ anyway. – Hagen von Eitzen Oct 20 '12 at 19:39