# Differentiability of Overlapping Piecewise Functions

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.

• What have you tried so far? What do you think the answer is? Does your intuition tell you that $h$ is differentiable or not? How would you go about proving what your intuition tells you? – James Sep 22 '16 at 0:48

Hint: For $t > 0$, $$\frac{h(0+t) - h(0)}{t} = \frac{g(0+t) - g(0)}{t}$$
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.