Prove that the function f given by

Question:

Prove that the function given by

$f(x)=|x-1|, x \in \mathbf{R}$ is notdifferentiable at $x=1$.

Solution:

The given function is $f(x)=|x-1|, x \in \mathbf{R}$

It is known that a function f is differentiable at a point x = c in its domain if both

$\lim _{h \rightarrow 0^{-}} \frac{f(c+h)-f(c)}{h}$ and $\lim _{h \rightarrow 0^{+}} \frac{f(c+h)-f(c)}{h}$ are finite and equal.

To check the differentiability of the given function at x = 1,

consider the left hand limit of f at x = 1

$\lim _{h \rightarrow 0^{-}} \frac{f(1+h)-f(1)}{h}=\lim _{h \rightarrow 0^{+}} \frac{|1+h-1|-|1-1|}{h}$

$=\lim _{h \rightarrow 0^{-}} \frac{|h|-0}{h}=\lim _{h \rightarrow 0^{-}} \frac{-h}{h} \quad(h<0 \Rightarrow|h|=-h)$

$=-1$

Consider the right hand limit of $f$ at $x=1$

$\lim _{h \rightarrow 0^{+}} \frac{f(1+h)-f(1)}{h}=\lim _{h \rightarrow 0^{+}} \frac{|1+h-1|-|1-1|}{h}$

$=\lim _{h \rightarrow 0^{+}} \frac{|h|-0}{h}=\lim _{h \rightarrow 0^{+}} \frac{h}{h} \quad(h>0 \Rightarrow|h|=h)$

$=1$

Since the left and right hand limits of f at x = 1 are not equal, f is not differentiable at x = 1