Could someone please confirm if the following functions is differentiable for all x?

$\displaystyle f(x)=\left\{\begin{array}{cc}1-x,&\mbox{ if }

x<0\\1-x^2, & \mbox{ if } x\geq 0\end{array}\right.$

$\displaystyle g(x)=\left\{\begin{array}{cc}x+1,&\mbox{ if }

x<1\\3-x, & \mbox{ if } x\geq 1\end{array}\right.$

I think f(x) is differentiable for all x but not for g(x).

Could someone please confirm ASAP.

Thanks