Given a differentiable function for every $x \geq 0$, define a differentiable function for every $x$ Given $f(x)$:


*

*$f(0)=1$

*Positive for every $x \geq 0$

*Differentiable for every $x \geq 0$


Let $g(x)=
 \begin{cases}
  f(x)    & \text{$x \geq 0$}\\
  1/f(-x) & \text{$x \leq 0$}
 \end{cases}
$
Is $g(x)$ differentiable for every $x$?
I believe that the answer is yes, because the only questionable point is at $x=0$.
And since $\displaystyle{\lim_{x \to 0^-}{g(x)} = \lim_{x \to 0^+}{g(x)} = 1}$, function $g(x)$ is differentiable  at that point.
For $x>0$, function $g(x)$ is differentiable because function $f(x)$ is differentiable.
For $x<0$, function $g(x)$ is differentiable because function $1/f(-x)$ is differentiable.
Is this correct, or am I missing something (a counterexample would be appreciated in this case)?
 A: You're correct that the only point where differentiability is an issue is $x=0$. But as user7530 pointed out, the sentence you wrote that ends "$g(x)$ is differentiably at the point" is actually a proof of continuity, not differentiability.
The limit you need to consider is $\lim_{h\to0} \frac{g(0+h)-g(0)}h = \lim_{h\to0} \frac{g(h)-1}h$. Since $g$ is defined differently on either side of $x=0$, you'll need to consider left- and right-hand limits separately. For the left-hand limit, you might want to reread the proof of the quotient rule for inspiration.
Finally, you write that the function $f$, which is defined only for $x\ge0$, is differentiable for $x\ge0$. In particular, what do you mean to say $f$ is differentiable at $x=0$? Do you mean the one-sided variant of the difference-quotient limit exists there? Does, for example, $f(x)=1+\sqrt x$ qualify?
EDITED TO ADD: No matter how $f(x)=1+\sqrt x$ is extended to the region $x<0$, it will not be differentiable at $x=0$. This is because
$$
\lim_{h\to0+} \frac{f(0+h)-f(0)}h = \lim_{h\to0+} \frac{1+\sqrt h-1}h = \lim_{h\to0+} \frac1{\sqrt h} = \infty.
$$
