Showing that if f(a)=g(a) then f'(a)=g'(a)

Homework Statement

Show that if ##a\in D##, ##f,g : D\to \mathbb{R}## are both differentiable and ##x=a##, ##f(a)=g(a)##, and ##f(x)\le g(x)## for all ##x\in D##, then ##f'(a)=g'(a)##

The Attempt at a Solution

I have a proof for this problem already, but I have a naive question. If the two functions are differentiable at ##a## and ##f(a)=g(a)##, why can't we just take the derivative of both sides to show that ##f'(a)=g'(a)##

DrClaude
Mentor
Try ##f(x) = x## and ##g(x) = x^2## at ##a = 0## or ##a = 1##.

Mr Davis 97
Try ##f(x) = x## and ##g(x) = x^2## at ##a = 0## or ##a = 1##.
I see. What at the general conditions that would allow this to be true?

DrClaude
Mentor
Maybe you are confused by the fact that
$$f(x) = g(x) \quad \forall x$$
implies that
$$f'(x) = g'(x)$$
but that doesn't mean that ##f(a) = g(a)## implies ##f'(a) = g'(a)##. If you come back to the definition of the derivative,
$$f'(x) = \lim_{h \rightarrow 0} \frac{f(x+h) - f(x)}{h}$$
you see that it is "non-local," it depends on the the value of ##f## at different points. That it why an equality at a single point, ##f(a) = g(a)##, doesn't mean that the derivatives will be the same at that point.

fresh_42
Mentor
I have a proof for this problem already, but I have a naive question. If the two functions are differentiable at ##a## and ##f(a)=g(a)##, why can't we just take the derivative of both sides to show that ##f'(a)=g'(a)##
What you get wrong here is, that the derivative is a local statement: a property about the behavior in a small neighborhood of a point, here ##x=a##, whereas ##f(a)=g(a)## is only a statement about a single location.
I see. What at the general conditions that would allow this to be true?
That ##f(x)## and ##g(x)## coincide at least in a small neighborhood of ##x=a##.

LCKurtz
Homework Helper
Gold Member
@Mr Davis 97 Since your "theorem" is false I'm wondering where you got it. If it is from some text, please check what the exact statement in the text is. If it's a conjecture you made up, better luck next time. The conjecture reminds me of the theorem that if ##f(a)=g(a)## and ##f'(x)<g'(x)## for ##x>a##, then ##f(x) < g(x)## for all ##x>a##. Are you trying to come up with some sort of "converse" of that?

Dick
Homework Helper
@Mr Davis 97 Since your "theorem" is false I'm wondering where you got it. If it is from some text, please check what the exact statement in the text is. If it's a conjecture you made up, better luck next time. The conjecture reminds me of the theorem that if ##f(a)=g(a)## and ##f'(x)<g'(x)## for ##x>a##, then ##f(x) < g(x)## for all ##x>a##. Are you trying to come up with some sort of "converse" of that?

I think it's ok. Can you give a counterexample? I'm assuming ##D## contains an open set around ##a##, though it wasn't explicitly stated.

fresh_42
Mentor
I think it's ok. Can you give a counterexample? I'm assuming ##D## contains an open set around ##a##, though it wasn't explicitly stated.
I agree, it looks right, and this open neighborhood is essential. It follows from differentiability, i.e. two equal limits.

Me, too, first thought that @DrClaude 's example had been meant as a counterexample, but it isn't, given the restrictions differentiability invokes.

LCKurtz