4

I'm a bit confused here. When we take the derivative of $$f(x)=\begin{cases} x^2\sin{\biggl(\dfrac{1}{x}\biggr)}&x\neq0\\ 0 &x=0\\ \end{cases} $$ It's derivative is not defined at $x=0$ as $f(x)=2x\sin{\biggl(\dfrac{1}{x}\biggr)}-\cos{\biggl(\dfrac{1}{x}\biggr)}$.

However, approaching this problem through the limit form of the derivative gives the value of the derivative at $x=0$: $$f'(x)=\lim_{h\to 0}\dfrac{f(x+h)-f(x)}{h}$$ $$\implies f'(0)=\lim_{h\to0}\dfrac{h^2\sin{\biggl(\dfrac{1}{x}\biggr)}-0}{h}=0$$

What I'm curious about here is why differentiating $f(x)$ first and then entering $x=0$ is failing in contrast to finding the derivative through limits?

1 Answers1

4

The problem with the first approach is that it invokes the product rule in a case where it is not applicable, as well as reversing a particular implication. What the product rule actually says is that if $g$ and $h$ are differentiable at $x$, then so is $gh$ and we can compute $(gh)'(x)$ via a formula.

In this case, $x^2$ is differentiable at $0$ while $\sin(1/x)$ is not. As such, the product rule is not applicable and we cannot use it to compute $(x^2 \sin(1/x))'(0)$.

Moreover, we cannot say that non-differentiability of $g$ or $h$ implies non-differentiability of the product. That would be a converse of the product rule, which (as you've observed) is false.


Note that I am assuming here that you've defined $f(0) = 0$; otherwise, $f$ fails to be differentiable there.