Differentiability of function with respect to its continuity Let $f:\mathbb{R}\rightarrow\mathbb{R}$, with 
$$
f(x)=\begin{cases}
\dfrac{1-e^{-x}}{x}, & x<0\\[4px]
a, & x=0\\[6px]
\dfrac{\ln(1+x)}{x}, & x>0
\end{cases}
$$
where $a\in\mathbb{R}$.
First I have to prove that if $f$ is continuous then $f$ is also differentiable.
Then I have to prove that $f(x)\in(0,1)$, $\forall x>0$.
For the first proof I have calculated the left and the right derivative in $x=0$ but I don't know how continuity may influence differentiability in this point.
For the second proof I think we need the solutions of $f'(x)=0$, which I couldn't get yet.
Thank you in advance!
 A: Hint: 
For continuity: $\lim_{x\to 0^+} f(x) = \lim_{x\to 0^-} f(x) = f(0)$
Easy to show that $f(0) = 1$.
For differentiability: to show that at $x = 0$, the derivative exists, 
i.e. $lim_{x\to 0^+} (f(x)-f(0))/x = \lim_{x\to 0^-} (f(x)-f(0))/x $ (Because other branches(i.e. $(0,+\infty) $ and $(-\infty,0)$) has derivative.)
Then the first question is done.  
For the second question, consider the derivative on different branches implies what kind of monotony of function. And the second question is done.
EDIT: for the $(0,+\infty)$ part, the derivative is $(x - (1+x)ln(1+x))/x^2(1+x)$. The derivative of $(x - (1+x)ln(1+x))$ is $-log(x+1)$. Then $(x - (1+x)ln(1+x))$ is decreasing over $(0,+\infty)$. When $x=0$, $(x - (1+x)ln(1+x))$ = $0$, so $(x - (1+x)ln(1+x))/x^2(1+x)$<0 for all x > 0.
The other branch is in a same way to show its monotony. 
A: $$f(x)=\left\{\begin{matrix}
\frac{1-e^{-x}}{x}, x<0\\ 
a, x=0\\ 
\frac{\ln(1+x)}{x}, x>0
\end{matrix}\right.$$
$$\lim_{x\to 0^-}\frac{1-e^{-x}}{x}=2$$
but at $x=0$ it is given that it's $a$.
lets check at $$\lim_{x\to 0^+}\frac{\ln(1+x)}{x}=1$$ 
 It can be said that the curve is discontinuous hence not differentiable at $x=0$.
A: For your second question: If $g$ is strictly concave on $[0,1],$ then the slopes $(g(x) - g(0))/x$ strictly decrease as $x$ increases. Assuming $g'(0)$ exists, we see that these slopes lie strictly between $g'(0)$ and $g(1) - g(0)$ for $x\in (0,1).$ Apply this with $g(x) = \ln (1+x).$ You'll see that your $f(x)$ lies strictly between $1$ and $\ln 2,$ giving the result.
