Function defined by cases is continuously differentiable I want to show that the function $f:\mathbb{R}\to\mathbb{R}$ given by
$f(x)=\begin{cases}\frac{x^2}{4}\quad\text{if $x>0$}\\ 0\quad\text{if $-2\leq x\leq 0$}\\ -\frac{(x+2)^2}{4}\quad\text{if $x<-2$}\end{cases}$
is for every $x\in\mathbb{R}$ continuously differentiable.
I am not so sure about the general method on how to prove this most efficiently.
Is it enough to give the derivative:
$f'(x)=\begin{cases}\frac{x}{2}\quad\text{if $x>0$}\\ 0\quad\text{if $-2\leq x\leq 0$}\\ -\frac{(x+2)}{2}\quad\text{if $x<-2$}\end{cases}$
and argue that this is continuous, by observing the limits at the 'glueing' points?
Or is there more to prove?
For example, is there the need to check if this function is differentiable in the first place?
It is clear that the limits from left and right at the interesting points exist and are equal, and as the function is piecewise differentiable it is then differentiable at $\mathbb{R}$. The only points in question are $x=0$ and $x=-2$.
My main concern with this question is that I am not sure what is necessary for a satisfactory answer.
What should I show and work out in more detail?
Thanks in advance.

Whatever you have done, that is correct.
But, first show existence of the derivative at $x=0$ and $x=-2$.
Then, show the derivative is continuous (what you did).
