Example
\(f(x)=|x|\) is not differentiable at \(x=0\)

Proof

Let

$$ \begin{align*} f(x) = |x| = \begin{cases} x, & \text{if } x > 0,\\ -x, & \text{if } x < 0,\\ 0, & \text{if } x = 0. \end{cases} \end{align*} $$

Now observe that when \(a = 0\)

$$ \begin{align*} \frac{f(a+h) - f(a)}{h} = \frac{f(h) - f(0)}{h} = \frac{|h| - 0}{h} = \frac{|h|}{h} \end{align*} $$

But now notice that

$$ \begin{align*} \frac{|h|}{h} = \begin{cases} 1 & \text{if } h > 0, \\ -1 & \text{if } h < 0. \end{cases} \end{align*} $$

Hence

$$ \begin{align*} \lim\limits_{h \to 0+} \frac{f(0+h) - f(0)}{h} = 1 \end{align*} $$

and

$$ \begin{align*} \lim\limits_{h \to 0-} \frac{f(0+h) - f(0)}{h} = -1 \end{align*} $$

Therefore, \(\lim\limits_{h \to 0} \frac{f(0+h) - f(0)}{h}\) doesn’t exist. \(\ \blacksquare\)


References