Given
$g(x) = \begin{cases} -1-2x & \text{if }x< -1,\\ x^2 & \text{if }-1\leq x\leq1,\\ x & \text{if }x>1, \end{cases} $
determine at which values $g(x)$ is differentiable.
The approach I have taken with this question is to determine the values at which it is not differentiable, which will tell me all other values will be. I know that the function will not be differentiable where the limit at a given value does not exist. If I differentiate this function I get:
$ g'(x) = \begin{cases} -2 & \text{if }x< -1,\\ 2x & \text{if }-1\leq x\leq1,\\ 0 & \text{if }x>1. \end{cases} $
I am a little bit lost as to how to proceed with this question - if I can show that the left hand and right hand limits disagree, then I can determine where the function is not differentiable, and therefore where it is differentiable. Am I heading in the right direction here?