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*}
$$
First observe that \(f\) is continuous at \(0\). We can show this using an epsilon/delta proof by setting \(\delta = \epsilon\) or we can observe that the left limit is
$$
\begin{align*}
\lim_{x \to 0+} |x| = \lim_{x \to 0+} x = 0.
\end{align*}
$$
while for \(x \to 0-\), then \(|x| = -x\) and so
$$
\begin{align*}
\lim_{x \to 0-} |x| = \lim_{x \to 0-} -x = 0.
\end{align*}
$$
Since the limits agree, then by the squeeze theorem the limit is 0. However, to show that it’s differentiable at \(0\), we first compute the quotient:
$$
\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
- Introduction to Analysis, An, 4th edition by William Wade
- Lecture Notes by Professor Chun Kit Lai