Is this piecewise function differentiable at $x = 0$

calculusderivativeslimits

The question:

I am new here, so excuse if I am messing something up. Now I have a question about this piecewise function

$$f(x)=\begin{cases} x^2sin\frac{1}{x}, &\text {if $x$ ≠ 0} \\ 0, &\text{if $x$ = 0} \end{cases}$$

What I did:


so what I did was, by using the derivative's definition and substituting 0 as x I came to this final conclusion:

$$f'(0) = \lim_{h\to 0}hsin\frac{1}{h}$$

I looked into integrating the derivative I got and the function into desmos aaaand, I am confused now as if it is differentiable or not because based on the graph it doesn't look like, from the squeeze theorem we get 0, and then does that mean that it is differentiable at 0 and that it will be also 0 when we look for f(0)?

any insight is appreciated thanks!

Best Answer

You're right up to $$f'(0) = \lim_{h\to 0} h\sin \frac{1}{h}.$$

Now since the sine function is bounded (to wit, $-1 \leq \sin t \leq 1$ for all $t$), we have $$\left|h\sin\frac{1}{h}\right| \leq |h|,$$ which clearly goes to $0$ as $h$ does. Thus $$f'(0) = 0.$$

Related Question