# How to check the differentiability of $f(x) = x|x|$ at $x_0 = 0$?

How do I check the differentiability of a $$f(x) = x|x|$$ at $$x_0=0$$?

I used the definition of a derivative and came up with \begin{align} f^\prime &= \lim_{x\to0}\dfrac{f(x)-f(x)}{x-0}\\ &= \lim_{x\to0}\dfrac{x|x|-0|0|}{x-0}\\ &= \lim_{x\to0}\dfrac{x|x|}{x}\\ &= \lim_{x\to0}|x| \end{align}

I know $$f(x)=|x|$$ is not differentiable at $$0$$. However, would this be? If one plugs in $$0$$ to $$|x|$$, one would get $$0$$, which is finite. But, if one takes the the limit from $$-\infty$$ and $$+\infty$$, the limits wouldn't exist.

• Why would you take the limit to $\;\pm\infty\;$ at all? The limit is when $\;x\to0\;$ ...and that's all! – DonAntonio Nov 17 '18 at 21:28

Why are you mentioning $$\pm\infty$$? What you did is correct. Since $$\lim_{x\to0}\lvert x\rvert=0$$, $$f'(0)=0$$.
• Would $$\lim_{x\to0^+} |x|=\lim_{x\to0^-} |x|?$$ That is why I mentioned coming from either infinity to 0. – kaisa Nov 17 '18 at 21:29
• Both of those limits are equal to $0$. In other words, $\lim_{x\to0}\lvert x\rvert=0$. – José Carlos Santos Nov 17 '18 at 21:32