Given function is
\(g(x) =\begin{cases}4 -x; \,x\le 1 \\2x +1 ;\,x>1\end{cases}\)
\(g^1(x) =\begin{cases}-1; \,x< 1 \\2 ;\,x>1\end{cases}\)
\(\therefore g^1(1^-) = -1 \) & \(g^1(1^+)= 2\)
\(\because g^1(1^-) \ne g^1(1^+)\)
\(\therefore\) Function g(x) is not differentiable at x = 1.
Alternative method:
\(g^1{(1^-)} =\lim\limits_{h \to0} g^{1} (1 - h) = \lim\limits_{h \to0} \frac{g(1-h) -g(1)}{1 - h - 1}\)
\(= \lim\limits_{h \to0}\frac{4 - (1-h) - (4 -1)}{-h}\)
\(= \lim\limits_{h \to0} \frac h{-h} = \lim\limits _{h\to0}-1 = -1\)
\(g^1{(1^+)} =\lim\limits_{h \to0} g^{1} (1 + h) = \lim\limits_{h \to0} \frac{g(1+h) -g(1)}{1 + h - 1}\)
\(= \lim\limits_{h \to0}\frac{2(1+h) +1-3}{h}\)
\(= \lim\limits_{h \to0} \frac{2h }{h} =2\)
\(\because g^1(1^-) \ne g^1(1^+)\)
\(\therefore\) Function g(x) is not differentiable at x = 1.