Official solution
From graph you can see,
(1) when x < 0 then y = x2 is greater than y = x. That is why for f(x) that curved part is chosen.
(2) when 0 \[ \le \] x < 1 then y = x is greater than y = x2. That is why for f(x) part of that straight line is chosen.
(3) when x \[ \ge \] 1 then y = x2 is greater than y = x. That is why for f(x) that curved part is chosen.
Here on the graph of f(x) there is two sharp corner at x = 0 and x = 1. As we know no function is differentiable at the sharp corner. So f(x) is not differentiable at those two sharp corner.