Show that f(x)=|x−5| is continuous but not differentiable at x=5
We have, f(x)=|x−5|∴ f(x)={−(x−5),if x<5x−5if x≥5
For continuity at x=5,
LHL=limx→5−(−x+5)=limh→0[−(5−h)+5]=limh→0h=0
RHL =limx→5+(x−5)=limh→0(5+h−5)=limh→0h=0∴f(5)=5−5=0
⇒ LHL=RHL =f(5)
Hence, f(x) is continuous at x=5
Now,
Lf′(5)=limx→5−f(x)−f(5)x−5=limx→5−−x+5−0x−5=−1Rf′(5)=limx→5+f(x)−f(5)x−5=limx→5+x−5−0x−5=1∴ Lf′(5)≠Rf′(5)
So, f(x)=|x-5| is not differentiable at x=5