prove that the following function is differentiable at x=0 using first principles:

f(x)= e^x when x<0
x=1 when x>0 or x=0

also is f(x) differntiable for all real x?