  ### Home > APCALC > Chapter 4 > Lesson 4.4.1 > Problem4-137

4-137.

Graph $y = g\left(x\right)$, given below, and determine if $g$ is differentiable at $x = 2$.

$g ( x ) = \left\{ \begin{array} { c c } { ( x - 1 ) ^ { 2 } } & { \text { for } x < 2 } \\ { 2 \operatorname { sin } ( x - 2 ) + 1 } & { \text { for } x \geq 2 } \end{array} \right.$

Differentiability implies continuity. If you are checking for differentiability, you also need to check for continuity.

To check for continuity:

$\text{Verify that:}\lim \limits_{x\rightarrow 2^{-}}g(x)=\lim \limits_{x\rightarrow 2^{+}}g(x)$

$\text{And verify that:}\lim \limits_{x\rightarrow 2}g(x)=g(2)$

$\lim \limits_{x\rightarrow 2^{-}}g(x)=\lim \limits_{x\rightarrow 2^{-}}(x-1)^{2}=1$

$\lim \limits_{x\rightarrow 2^{+}}g(x)=\lim \limits_{x\rightarrow 2^{+}}2\text{sin}(x-2)+1=1$

$g\left(2\right)=2\left(\sin\left(2−2\right)\right)+1=1$

$\lim \limits_{x\rightarrow 2^{+}}g(x)=g(2)$

$g\left(x\right)$ is continuous at $x = 2$.

To check for differentiability:

$\text{Verify that:}\lim \limits_{x\rightarrow 2^{-}}g'(x)=\lim \limits_{x\rightarrow 2^{+}}g'(x)=g'(2)$

$\lim \limits_{x\rightarrow 2^{-}}g'(x)=\lim \limits_{x\rightarrow 2^{-}}(2x-2)=2$

$\lim \limits_{x\rightarrow 2^{+}}g'(x)=\lim \limits_{x\rightarrow 2^{+}}2\text{cos}(x-2)=2$

$g'\left(2\right)=2\cos\left(2-2\right)=2............................$

Since both $g\left(x\right)$ and $g^\prime\left(x\right)$ are continuous at $x = 2, g\left(x\right)$ is differentiable at $x = 2$.