I have a solution to the following exercise, and would like to confirm if I am proceeding correctly:
Suppose that $g(x)$ is differentiable at $x=0$, and that $g(0)=g'(0)=0$. Show that $$f(x)=\begin{cases} g(x)\sin(x) && x\neq 0 \\ 0 && x=0\end{cases}$$ is differentiable at $x=0$.
My attempt: To show that $f(x)$ is differentiable at $x=0$, we would like to show that $\lim_{h\to 0}\frac{f(h)-f(0)}{h}$ exists. We have that \begin{align*} \lim_{h\to 0}\frac{f(h)-f(0)}{h} & = \lim_{h\to 0} \frac{g(h)\sin(1/h)-0}{h} \\ & = \lim_{h\to 0}\frac{g(h)}{h}\cdot\sin(1/h) \end{align*} Since $g'(0)=0$, we have that $\lim_{h\to 0}\frac{g(h)-g(0)}{h}=\lim_{h\to 0}\frac{g(h)}{h}=0$. Therefore, $$\lim_{h\to 0}\frac{g(h)}{h}\cdot\sin(1/h)=0\cdot\lim_{h\to 0}\sin(1/h)=0$$ Hence, $f'(0)=0$.
I am unsure whether I can say that $0\cdot\lim_{h\to 0}\sin(1/h)=0$.
The limit $\lim_{h\to 0}\sin(1/h)$ does not exist !
But since $|\frac{g(h)}{h}\cdot\sin(1/h)| \le |\frac{g(h)}{h}|$ and $\lim_{h\to 0}\frac{g(h)}{h}=0$, we see that $\lim_{h\to 0}\frac{f(h)-f(0)}{h}=0$.