Take the closed interval [0,1] and open interval (1/3,2/3). Let K = [0,1]\ (1/3,2/3). For x ∈ [0,1] define f(x) = d(x, K) where d(x, K) = inf{|x − y||y ∈ K}. Then
1
f: [0,1] → ℝ is differentiable at all points of (0,1)
2
f: [0,1] → ℝ is not differentiable at 1/3 and 2/3
3
ƒ: [0,1] → ℝ is not differentiable at 1/2
4
f: [0,1] → ℝ is not continuous