Differentiation

Show that the function $f\left(x\right)= \begin{cases} \left|x-3\right|, & x \geq 1 \\ \dfrac{x^2}{4}-\dfrac{3x}{2}+\dfrac{13}{4}, & x <1 \end{cases}$
is continuous as well as differentiable at $x=1$.


$\begin{aligned} \text{Left Hand Derivative } = Lf'\left(1\right) & = \lim\limits_{h \to 0} \; \dfrac{f\left(1-h\right)-f\left(1\right)}{-h} \\ & = \lim\limits_{h \to 0} \; \dfrac{\dfrac{\left(1-h\right)^2}{4}-\dfrac{3\left(1-h\right)}{2}+\dfrac{13}{4}-\left|1-3\right|}{-h} \\ & = \lim\limits_{h \to 0} \; \dfrac{1-2h+h^2-6+6h+13-8}{-4h} \\ & = \lim\limits_{h \to 0} \; \dfrac{h^2 +4h}{-4h} \\ & = \lim\limits_{h \to 0} \; \dfrac{h+4}{-4} \\ & = -1 \end{aligned}$

$\begin{aligned} \text{Right Hand Derivative} = Rf'\left(1\right) & = \lim\limits_{h \to 0} \; \dfrac{f\left(1+h\right)-f\left(1\right)}{h} \\ & = \lim\limits_{h \to 0} \; \dfrac{\left|1+h-3\right|-\left|1-3\right|}{h} \\ & = \lim\limits_{h \to 0} \; \dfrac{2-h-2}{h} = -1 \\ & \left[\begin{aligned} \text{Note:} & \because h \to 0, \; \text{h is a very small number} \\ & \therefore \; h-2<0 \implies \left|h-2\right|=-\left(h-2\right) \end{aligned}\right] \end{aligned}$

Since $Lf'\left(1\right)=Rf'\left(1\right)=-1$, $f\left(x\right)$ is differentiable at $x=1$.

Since the function is differentiable at $x=1$, it is continuous at $x=1$.