f(x)=∣x−2∣+x
First we check the continuity
At x=0, RHLf(0+h)=h→0lim∣0+h−2∣+(0+h) =∣−2∣=2 LHLf(0−h)=h→0lim∣0−h−2∣+(0−h) =∣−2∣=2
At x=2, RHLf(2+h)=h→0lim∣2+h−2∣+(2+h) =0+2+0=2 LHLf(2−h)=h→0lim∣2−h−2∣+(2+h) =0+2−0=2
and f(0)=2,f(2)=2
Hence, f(x), is continuous at x=0,2
Now, we check differentiability f(x)=⎩⎨⎧(−x+2−x)(−x+2+2+x)(x−2+2)x<00≤x≤22≤x f(x)=⎩⎨⎧2−2x,x<02,0≤x≤22x−2,2≤x
Now, f′(x)=⎩⎨⎧−2,x<00,0≤x≤22,2≤x
Hence, f(x) is not differentiable at x=0,2.