Prove that g is differentiable Question: Suppose f, g, and h are defined on (a,b) and $a < x_0 < b$. Assume f and h are differentiable at $x_0$, $f(x_0) = h(x_0)$, and $f(x) \le g(x) \le h(x)$ for all x in (a,b). Prove that g is differentiable at $x_0$ and $f'(x_0) = g'(x_0) = h'(x_0)$.
I know the case where $g(x) = f(x)$ or $h(x)$ makes this problem very simple so we don't need to look at that one.
Other than that, all I really know is, based on the definition, that 
$lim_x \to x_0$$(f(x)-f(x_0))/(x-x_0)$ and the same for $g(x)$ but I'm not really sure where to go from there.
Thanks for the help!
 A: We have $h(x)-f(x) \ge 0$, and $h(x_0)-f(x_0) = 0$, so $h-f$ is minimized at $x_0$, hence we must have $h'(x_0) -f'(x_0) = 0$. In particular, for all $\epsilon>0$ there exists some $\delta>0$ such that if $|x-x_0| < \delta$,
we have $|h(x)-f(x)| \le \epsilon |x-x_0|$ (by definition of the derivative).
We have $0 \le g(x)-f(x) \le h(x)-f(x)$ and so
$|g(x)-f(x)| \le |h(x)-f(x)|$ for all $x$.
Let $\epsilon>0$, and let $\delta$ be the $\delta$ above, then if
$|x-x_0| < \delta$, we have 
$|g(x)-f(x)| \le \epsilon |x-x_0|$. In particular, this shows that
$x \mapsto g(x)-f(x)$ is differentiable at $x_0$, with $(g-f)'(x_0) = 0$.
Since $g = f + (g-f)$, and $f$, $g-f$ are differentiable, it follows that
$g$ is differentiable at $x_0$, and $g'(x_0) = f'(x_0)$.
A: Another hint: 
Take $\epsilon > 0$, there is a neighbohood of $x_0$ where (by definition of $\lim$ and $f'(x_0)$):
$$ f(x_0)+(x-x_0)(f'(x_0)-\epsilon/3) \le f(x) \le f(x_0) + (x-x_0)(f'(x_0)+\epsilon/3)$$
Same for $h$. 
Combine with $f(x) \le g(x)$ and the fact that it is true for $x-x_0 \not = 0$ and every $\epsilon > 0$ and you obtain $f'(x_0) \le h'(x_0)$.
Since $f$ and $h$ are continuous, you can also find a neighborood of $x_0$ where $h(x)-\epsilon/3 \le f(x) + \epsilon/3$. The same trick as above should allow you to conclude that $h'(x_0) \le f'(x_0)$ and hence $f'(x_0) = h'(x_0)$.
Now use $f(x) \le g(x) \le h(x)$ again and you should now get, for a neighborhood of $x_0$ : 
$$ g(x_0)+(x-x_0)(f'(x_0)-\epsilon/3) \le g(x) \le g(x_0) + (x-x_0)(f'(x_0)+\epsilon/3)$$
and you conclude.
A: Well,the second part is easy. If $f(x_0) = h(x_0)$, and $f(x) \le g(x) \le h(x)$ for all x in (a,b), then $f(x_0) = h(x_0)\le g(x) $ and $g(x) \le h(x)$ for all x in (a,b). Then there's obviously no choice,$g(x_0) = h(x_0)$. A similar arguement shows $f(x_0)=g(x_0)$  So $f(x_0) =g(x_0) = h(x_0)$. We're given that f(x) and h(x) are both differentiable at every x on the interval. Therefore if we can show g(x) is differentiable, we're done because this will imply $f'(x_0) = g'(x_0) = h'(x_0)$. It's very important to prove this result,because without it, we cannot garuntee g is continuous at xo, which is a prerequisite for the derivative existing there. Now that we've proven that g(xo) exists and is equal to the limits of f and h, we don't even have to construct the derivative explicitly for g' at this point. Since g is defined at the point, the Squeeze theorem now implies g is continuous at xo. Since f and h are differentiable, a second application of the squeeze theorem shows that the limit of the derivative also exists and is equal at xo for f g and h. But this means  $f’(x_0) = g’(x_0) = h’(x_0)$ and we’re done! 
Everyone else here gave either an explicit or implicit epsilon-delta arguement. Once it's established that $f(x_0) = g(x_0) = h(x_0)$, given that f and h are differentiable and g is defined at $x_0$, the Squeeze theorem does the hard work for us! 
Anyone disagree?  
A: We have: $f(x_0) \leq g(x_o) \leq h(x_0)$, and $f(x_0) = h(x_0)$, this implies $f(x_0) = g(x_0) = h(x_0)$, you can continue. From this we have: $f'(x_0^{+}) \leq g'(x_0^{+}) \leq h'(x_0^{+})$, and also $f'(x_0^{-}) \geq g'(x_0^{-}) \geq h'(x_0^{-})$. But $f'(x_0^{+}) = f'(x_0^{-}) = f'(x_0) = h'(x_0) = h'(x_0^{+}) = h'(x_0^{-}) \to g'(x_0^{+}) = g'(x_0^{-}) = g'(x_0) = f'(x_0) = h'(x_0)$. 
A: First prove that $f'(x_0) = h'(x_0)$.  This is easy (and has been stated by another answer).  We have the following inequality: $f(x) \leq h(x)$ which leads us to $f(x) - h(x) \leq 0$.  The maximum value is clearly $0$ and must occur when $f(x_0) = h(x_0)$ and therefore $f'(x_0) - h'(x_0) = 0$ (it's possible that there are also local minimums of $f(x) - h(x)$, but we know that $x_0$ is a local max by the original inequality and thus must satisfy the equation $f'(x_0) - h'(x_0) = 0$), therefore $f'(x_0) = h'(x_0)$ where $x_0$ is such that $f(x_0) = h(x_0)$.
So now we have that $f'(x_0) = h'(x_0) = L$.
Assuming that $g'(x_0)$ exists (I realize this needs to be proved), there is a simple proof by contradiction that shows that $g'(x_0) = f'(x_0) = h'(x_0) = L$.
Assume that $g'(x_0) = L + \Delta L$, such that $\Delta L > 0$.  In the linear approximation, this means that for small $\Delta x > 0$, we would have:
$$
g(x_0 + \Delta x) \approx g(x_0) + (L + \Delta L)\Delta x \\
f(x_0 + \Delta x) \approx f(x_0) + L\Delta x \\
h(x_0 + \Delta x) \approx h(x_0) + L\Delta x \\
$$
Since we are given that $g(x_0) = f(x_0) = h(x_0)$, we would find that $g(x_0 + \Delta x) \approx h(x_0 + \Delta x) + \Delta L \Delta x \geq h(x_0 + \Delta x)$ which is a contradiction to our given, which is that $g(x) \leq h(x)$, therefore it's not true that $\Delta L > 0$ and you can prove the same for $\Delta L < 0$ using $f(x)$, therefore it must be the case that $\Delta L = 0$ and thus $g'(x_0) = L = f'(x_0) = h'(x_0)$.
Granted, this is missing the component of actually proving that $g'(x_0)$ exists, but it may be helpful.  I think this sets up the $\epsilon$-$\delta$ proof that is necessary (but I might be wrong).
