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 — Remove the modulus.
We write ∣x−4∣ without the modulus sign on each side of x=4.
f(x)={4−x,x−4,x<4x≥4
So the value at the point is f(4)=0.
Step 2 — Find the one-sided limits.
We put x=4−h in 4−x and x=4+h in x−4.
LHL=h→0lim[4−(4−h)]=h→0limh=0
RHL=h→0lim[(4+h)−4]=h→0limh=0
Both limits equal the value f(4), so f is continuous at x=4.
Step 3 — Find the right-hand derivative.
For h>0 we have ∣h∣=h.
Rf′(4)=h→0limh∣h∣−0=h→0limhh=1
Step 4 — Find the left-hand derivative.
For h>0 we have ∣−h∣=h.
Lf′(4)=h→0lim−h∣−h∣−0=h→0lim−hh=−1
Step 5 — Compare the two derivatives.
The left-hand derivative −1 is not equal to the right-hand derivative 1, so f′(4) does not exist. The graph has a sharp corner at x=4.
Therefore, f is continuous at x=4 but not differentiable there.