continuity, uniformly continuous I was wondering if you could help me with this:
$$
f(x)=\begin{cases} 
x^2\sin\left(\frac{1}{x}\right) & \text{ for } x \ne 0\\
0 & \text{ for } x=0
\end{cases}.
$$
I need to observe that f is continuous on $\mathbb{R}$ and then explain why it is uniformly continuous bounded subset of $\mathbb{R}$.
Finally, is $f$ uniformly continuous on $\mathbb{R}$? Do I take $f'(x)$?
I know that I should be using the theorem for f being continuous, which says that f is continuous for some $x_0$ and then evaluating it for the entire $\text{dom}(f)$.
Apologizes for the format of my post!
 A: Hint I'll prove continuity at $x=0$.
To prove it is continuous at zero, you need to prove $\lim_{x\to 0} f(x)=f(0)$.
You are given $ f(0)=0 \,.$ You need to prove the limit of the function is $0$ too. Now, notice this,
$$ \left |x^2\sin\left(\frac{1}{x}\right) \right|\leq |x^2|=x^2 \implies  x^2\sin\left(\frac{1}{x}\right) \to 0 \quad \mathrm{as}\,\,\, x\to 0 \,, $$
By the sandwich theorem. Note that the fact that $|\sin(x)|\leq 1$ has been used.
A: Mhenni has already proved continuity. To prove$ f$ is uniformly continuous on any bounded subset of $\mathbb{R}$, use the fact that a continuous function on a compact set is uniformly continuous on that set. Note that a bounded set in $\mathbb{R}$ is contained in a bounded interval, which is compact. 
To prove that $f$ is uniformly continuous on all of $\mathbb{R}$: note that $\displaystyle\lim_{x\to\infty} x^2 \sin(1/x) = \lim_{|x|\to\infty} x \frac{\sin(1/x)}{1/x} = x$ and $x$ is a uniformly continuous function. You can formalize this relatively easily.
