Differentiability and Continuity on an open interval

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.

• What does the phrase "local maximum or minimum in the endpoint" mean? – BigbearZzz Dec 8 '18 at 10:10
• According to the definition in the book am using, "A local maximum (minimum) can occur as an end point of the domain of $f$: a point $x$ in the domain of $f$ that does not belong to an open interval lying completely inside the domain". Yeah am equally as confused too :) – kareem bokai Dec 8 '18 at 10:19
• I don't quite understand what you want to prove here. Perhaps you want to show that $x=0$ is neither a local maximum nor a local minimum? – BigbearZzz Dec 8 '18 at 10:21
• Yeah, I think the way they formulated the question is horrible, we just have to show that $x = 0$ is neither a local max or min – kareem bokai Dec 8 '18 at 10:25

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$$)
It'v very easy to show that for any bounded function $$g$$, defined on a neighbourhood of $$0$$, the function $$f(x)=x\cdot g(x)$$ is continuous at $$x=0$$.
For the differentiability of $$f$$ notice that $$(f(x)-f(0))/(x-0)=g(x)$$. Now if $$\lim_{x\to0}g(x)$$ doesn't exist, $$f$$ isn't differentiable at $$x=0$$.