Given:
$$f(x) = \begin{cases} x^3 &&& x<2 \\x+6 && &x \geq 2 \end{cases} $$
I need to prove that $f(x)$ is not differentiable at $x=2$, what should I do? $$\lim_{x \to 2^+} \frac{f(x) -f(2)}{x-2} =\lim_{x \to 2^+} \frac{x+6-8}{x-2} = 1 $$ $$\lim_{x \to 2^-} \frac{f(x) -f(2)}{x-2} =\lim_{x \to 2^+} \frac{x^3 -8}{x-2} = 6 $$ Is taking limits for the two functions and showing that those two are not equal correct?
You can also do the alternative, which is take the symbolic derivative of $f(x)$. The result is:
\begin{align} f'(x) = 3x^2 & , 1 \\ f'(2) = 12 & , 1 \end{align} and $12 \neq 1$.