For \( x \leq 1 \), \( f(x) = x^2 \), and for \( x<1 \), \( f(x) = x \).
Checking differentiability at \( x = 1 \):
\[
\lim_{x \to 1^-} f'(x) = 2(1) = 2, \quad \lim_{x \to 1^+} f'(x) = 1
\]
Since left and right derivatives are different, \( f(x) \) is not differentiable at \( x = 1 \), but it is continuous everywhere.