Let $f:[0,\infty)\to\mathbb{R}$ be defined by: $$\begin{cases}&x\sin(\frac{1}{x}) \, \, &\text{if}\, \, x > 0\\ & 0, &\text{if} \, \, x = 0\end{cases}$$
Show that $f$ is continuous on $[0,\infty)$ and differentiable on $(0,\infty)$. Also, show that $f$ has no local maximum or minimum in the endpoint $x = 0$ of the domain of $f$.
I can manage to prove continuity on a single point using the epsilon-delta technique, although the intervals here were a surprise, how do you go about proving such a thing? And any hints about the second part of the problem would also be appreciated.
An alternative way to show that $f$ is continuous at $x=0$ is to use the sandwich theorem with $$ -|x| \le f(x) \le |x|, $$ where $\pm|x|\to 0 $ as $x\to 0$. Differentiability of $f$ on $(0,\infty)$ is obvious.
For the second part, we want to show that for any $\varepsilon>0$, the point $x=0$ is neither a maximum nor minimum on $[0,\varepsilon)$. Choose $n$ large enough so that $\frac 1{2\pi n+\pi/2}<\varepsilon$, then $$ f\left(\frac 1{2\pi n+\pi/2}\right) = \frac 1{2\pi n+\pi/2}>0 = f(0) $$ so $x=0$ is not a maximum. You should be able to modify this a bit to prove that $x=0$ is not a minimum either. (Hint: we want $\sin(1/x)=-1$)