Question:
$f(x)=\left\{\begin{array}{lll}1+x & \text {, if } & x \leq 2 \\ 5-x & \text {, if } & x>2\end{array}\right.$
at $x=2$
Solution:
We know that, f(x) is differentiable at x = 2 if
$L f^{\prime}(2)=R f^{\prime}(2)$
NoW,
$L f^{\prime}(2)=\lim _{h \rightarrow 0} \frac{f(2-h)-f(2)}{-h}$
$=\lim _{h \rightarrow 0} \frac{(1+2-h)-(1+2)}{-h}=\lim _{h \rightarrow 0} \frac{3-h-3}{-h}=\frac{-h}{-h}=1$
$R f^{\prime}(2)=\lim _{h \rightarrow 0} \frac{f(2+h)-f(2)}{h}$
$=\lim _{h \rightarrow 0} \frac{[5-(2+h)]-(1+2)}{h}=\lim _{h \rightarrow 0} \frac{3-h-3}{h}$
$=\frac{-h}{h}=-1$
So, $\quad L f^{\prime}(2) \neq R f^{\prime}(2)$
Thus, f(x) is not differentiable at x = 2.