I have this continuous function: $f(x) = x\sin(\frac{1}{x})$ if $x \neq 0$, $f(x) = 0$ if $x = 0$, and I need to show that $f$ is uniformly continuous. What sort of method should I use for this proof?
Edit: I should have mentioned that $f: \mathbb{R} \rightarrow \mathbb{R}$.
On an interval that contains $0$, like $[-2,2]$, $f$ is continuous and thus uniformly continuous by compactness.
For $y,x>1$, by the Mean Value Theorem there exists $c$ between $x$ and $y$ with \begin{align} |f(y)-f(x)|&=|f'(c)|\,|y-x|=\left(\sin\frac1c+c\,\frac{(-1)}{c^2}\,\cos c\right)\,|y-x|\\ \ \\ &\leq\left(|\sin\frac1c|+|\frac{(-1)}{c}\,\cos c|\right)\,|y-x|\\ \ \\ &\leq\left(1+\frac1c\right)\,|y-x|\leq2|y-x|. \end{align}