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 — Find the value at x = 1.
At x=1 the rule x2 applies, because it holds for x≤1.
f(1)=12=1
Step 2 — Find the one-sided limits.
We put x=1−h in x2 and x=1+h in x1.
LHL=h→0lim(1−h)2=1
RHL=h→0lim1+h1=1
Both limits equal f(1), so f is continuous at x=1.
Step 3 — Find the left-hand derivative.
We expand (1−h)2=1−2h+h2 and cancel h.
Lf′(1)=h→0lim−h(1−h)2−1=h→0lim−h−2h+h2=h→0lim(2−h)=2
Step 4 — Find the right-hand derivative.
We combine 1+h1−1 into one fraction and cancel h.
Rf′(1)=h→0limh1+h1−1=h→0limh(1+h)−h=h→0lim1+h−1=−1
Step 5 — Compare the two derivatives.
The left-hand derivative 2 is not equal to the right-hand derivative −1, so f is not differentiable at x=1.
Therefore, f is continuous at x=1 but not differentiable there.