# Why does the shortcut method for checking differentiability not working here?

I had learnt about the shortcut method of checking differentiability from a certain book few months back.

I am illustrating the shorcut method I had learnt here using an example:

Is $|x-1/9|^3$ differentiable at $x=1/9$

For $x>1/9$ $f(x)=(x-1/9)^3$ Differentiate w.r.t x and put $x=1/9$.Say the value of the derivative is $a$.

For $x<1/9$ $f(x)=-(x-1/9)^3$ Differentiate w.r.t x and put $x=1/9$.Say the value of the derivative is $b$.

If $a=b$ then it is differentiable at $x=1/9$

This method works because $f(x)$ is continuous at $x=1/9$

But recently I came across a function like:

$f(x)= \begin{cases} 0 & x= 0 \\ 2x+x^2\sin(\frac{1}{x}) &x \neq0 \end{cases}$

Even though $f(x)$ is continuous at $x=0$ the shortcut method does not seem to work here.

For $x>0$ $f'(x)=2+2x\sin(\frac{1}{x})+x^2\cos(\frac{1}{x})(\frac{-1}{x^2})$.

But here when I put $x=0$, $f'(x)$ becomes undefined.

However using the limit definition of derivative I am getting the value of derivative at $x=0$ as $2$.

Why isn't the shortcut method not valid here ? On the other hand why is the limit definition of derivative valid and working ? Does the derivative of $f(x)$ really exist at $x=0$ ?

• You need that the limit of $f'$ at $x=0$ exists and $f$ is continuous in $0$. You misunderstood the shortcut. – user251257 Dec 3 '16 at 15:07
• Why should the limit of f' exist at x=0 ? Can you point me to any online resource which says so ? Or could you explain the reason behind it ? @user251257 – user220382 Dec 3 '16 at 15:13
• look in the proof of your shortcut – user251257 Dec 3 '16 at 15:14
• @user251257 I don't have the proof of my shortcut. I can't remember where I learnt it from. – user220382 Dec 3 '16 at 15:15
• then ask a new question for the proof or use the search function. – user251257 Dec 3 '16 at 15:23