Solution:
Key idea: A function is continuous at x=a when LHL, RHL and f(a) are equal. It is differentiable at x=a when the left-hand derivative Lf′(a) and the right-hand derivative Rf′(a) exist and are equal, where, with h>0 and h→0,
Lf′(a)Rf′(a)=h→0lim−hf(a−h)−f(a)=h→0limhf(a+h)−f(a)
Step 1 — Write the value and the rule near 5.
Near x=5, f(x)=5−x on the left and f(x)=x−5 on the right, and the value at the point is f(5)=0.
Step 2 — Find the one-sided limits.
We put x=5−h and x=5+h in ∣x−5∣.
LHL=h→0lim∣−h∣=0
RHL=h→0lim∣h∣=0
Both limits equal the value f(5), so f is continuous at x=5.
Step 3 — Find the right-hand derivative.
For h>0, ∣5+h−5∣=h.
Rf′(5)=h→0limh∣5+h−5∣−0=h→0limhh=1
Step 4 — Find the left-hand derivative.
For h>0, ∣5−h−5∣=h.
Lf′(5)=h→0lim−h∣5−h−5∣−0=h→0lim−hh=−1
Step 5 — Compare the two derivatives.
Since Rf′(5) is 1 and Lf′(5) is −1, the two one-sided derivatives differ, so f′(5) does not exist.
Therefore, f is continuous at x=5 but f′(5) does not exist.