TITLE: Differentiability of Overlapping Piecewise Functions
QUESTION [0 upvotes]: Suppose $f(x)$ is differentiable on $U=(-\infty, 0]$ and $g(x)$ is not differentiable at $V=[0,\infty)$ but is differentiable on $(0,\infty)$.  Is the following piecewise function $h(x)$ differentiable?
$$
h(x)=
\begin{cases}
f(x) \text{ for } x\in U\\
g(x) \text{ for } x\in V\\
\end{cases}
$$ Note $U\cap V=\{0\}$ and $f$ is differentiable at $0$ but $g$ is not.  Disclaimer, I'm not sure why you would want to consider a piecewise function with "overlapping pieces" but I was asked to.

REPLY [0 votes]: Hint: For $t > 0$, 
$$
\frac{h(0+t) - h(0)}{t} = \frac{g(0+t) - g(0)}{t}
$$
Also, it is common to construct a "global" function by piecing together smaller (often more "local") functions. So, this construction is not solely for the point of pedagogy.

REPLY [0 votes]: The condition on $g$ tells you that $g$ is not differentiable at the point $0$.
Then examine derivative from the right
$$
\lim_{x \rightarrow 0^+}\frac{g(x)-g(0)}{x}
$$ 
Which you already know does not exist.
{"set_name": "stack_exchange", "score": 0, "question_id": 1936460}