Show that $f$ is Uniformly Continuous Let $f : [0,1] \to \mathbb{R}$ be defined by 
$$f(x) = \begin{cases}
{x  \sin \frac{1} {x}}, & \text{ }x \in  (0,1], \\
0, & \text{ }x  =  0.
\end{cases} $$
How can I show that $f$ is uniformly continuous on $[0,1]$. Also is $f$ differentiable at $x = 0$? 
 A: Well $f(x)$ is continuous on $[0,1]$ and since $[0,1]$ is compact then $f(x)$ is uniformly continuous on $[0,1]$.
A: Since $\sin(\text{anything})$ is between $-1$ and $1$ (inclusive), the function $x\sin\dfrac 1 x$ is between $-x$ and $x$.
Given $\varepsilon>0$, the function $f$, being continuous, is uniformly continuous on the compact set $[\varepsilon/2,1]$.  On the set $[0,\varepsilon/2)$, any two values differ by $< \varepsilon$ because of what was noted in the first paragaph above, i.e. setting $\delta=\varepsilon/2$ works.
A: $f(x)$ uniformly continuous on $[0,1]$:
Note that the function is continuous as long $x\ne 0$. Also, we have that $|x\sin\frac{1}{x}|\le x$, so we have $\lim_{x\to 0}=0$(Why?). We just proved that $f(x)$ continuous on $x=0$, and by Cantor's theorem, we can conclude that $f(x)$ is uniformly continuous on $[0,1]$
$f(x)$is not differentiable on $[0,1]$:
By definition,
$$ \frac{f(x)-f(0)}{x-0}=\frac{x\sin\frac{1}{x}}{x}=\sin\frac{1}{x}$$
Now, what you can say about $\lim_{x\to 0}\sin\frac{1}{x}$? 
A: For a somewhat more basic proof of  uniform continuity:
The "trick" is to consider two cases: 1) both $x$ and $y$ are near the origin; and 2) $x$ and $y$ are bounded away from the origin.  In  case 1), we can make a crude estimate of $|f(x)-f(y)|$, since both $f(x)$ and $f(y)$ will   be small (the graph of $f$ is sandwiched   between the graphs of $y=x$ and $y=-x$).  In   case 2), we can use the fact that the derivative of $f$ is bounded
on $[\delta,1]$ for $\delta>0$ to make our estimate of $|f(x)-f(y)|$.

So, on with the show:
Let $\epsilon>0$.
For $x$ and $y$ in the interval $[0,\epsilon/ 2)$,  we have 
$$\tag{1}
  |f(x)-f(y)|\le x+y<\epsilon.
$$
For $x$  in the interval $[\epsilon/4,1]$,  we have
$$
f'(x)=\sin{1\over x}-{1\over x}\cos{1\over x};
$$
and so for $x\in[\epsilon/4,1]$ 
$$
|f'(x)|\le 1+{1\over x}\le 1+{4\over\epsilon}={\epsilon+4\over\epsilon}.
$$
Thus, by the Mean Value Theorem, if  $x$ and $y$ are both in $[\epsilon/4,1]$, we have
$$\tag{2}
|f(x)-f(y)|\le {\epsilon+4\over\epsilon}|x-y|.
$$

Now, given $\epsilon>0$, choose $\delta=\min\{\epsilon/4, \epsilon^2/(4+\epsilon)\}$.  
Then if $|x-y|<\delta$, either 
$\ \ \ 1)$ $x$ and $y$ are both in the interval $[0,\epsilon/2)$ 
or 
$\ \ \ 2)$ $x$ and $y$ are both in the interval $[\epsilon/4,1 ]$.
In case $1)$, we have by $(1)$ that $|f(x)-f(y)|<\epsilon $. 
In   case $2)$ we have by $(2)$ that
$|f(x)-f(y)|\le\textstyle{4+\epsilon\over\epsilon} |x-y|
< ( \textstyle{ \epsilon+4\over\epsilon})\cdot{\epsilon^2\over 4+\epsilon}=\epsilon $.

For differentiability at 0, just consider the definition of $f'(0)$:
$$
\lim_{h\rightarrow 0}{f(h)-f(0)\over h}= 
\lim_{h\rightarrow 0} {h\sin{1\over h}-0\over h} =\lim_{h\rightarrow 0} \sin{1\over h}.
$$
Does this limit exist?
