I am trying to understand a concept, so I will use an example. The following function is given:
[\left { \begin{matrix} 3x^{2} &x\leq 1 \\ ax+b & x>1 \end{matrix} \right.]
I wish to find for which values of a and b, it is differentiable at x=1.
I was taught that the way to do it, is to show that it is continuous, i.e., to compare the limits of the function from right and left of 1, and then since continuity is not sufficient for differentiability, compare the limits from the right and left of the derivative. I do not understand the rationale behind this. Why comparing the limits of the derivative is sufficient to claim differentiability ?