The function f(x)=max{(1−x),(1+x),2},x∈(−∞,∞) is
হানি নাটস
f(x)=⎩⎨⎧1−x,x≤−12,−1<x≤11+x,x>1
x→−1−limf(x)=x→−1−lim(1−x)=2=x→−1+limf(x)
and, x→1limf(x)=2, so f is continuous at all points.
f′(−1−)=h→o−lim−hf(−1−h)−f(−1)=h→o−lim−h1+1+h−2=−1
f′(−1+)=0.
Similarly, f′(1−)=0 and f′(1+)=1,
so f differentiable everywhere except at x=−1,1.