Show that function

Question:

Show that function

$f(x)=\left\{\begin{array}{l}(1-x), \text { when } x<1 ; \\ \left(x^{2}-1\right), \text { when } x \geq 1\end{array}\right.$ is continuous but not differentiable at $x=1$

Solution: