Consider continuous real valued functions $f$ and $g$, defined over interval $I$. In $I$, $f$ and $g$ each take on $a$ and $b$, and therefore, take on values in $[a,b]$. I would like to prove that there must be an $x$ in $I$ where $f(x) = g(x)$. Intuitively, this is obvious by definition of continuity; however, I've been unable to prove it.
Here is what I have been able to do so far:
Consider $h(x) = f(x) - g(x)$. WLOG, assume that at the start of $I$, $f > g$, so that $h > 0$. Now, if I can show that at some point $g >= $f, QED, by Intermediate Value Theorem. However, I haven't been able to prove that there exists a point where $g >= $f.
I can make an intuitive argument that this is so, because if $g$ is always bounded by $f$ and never equal to $f$, $g$ will be "trapped" and not able to take on $b$. Yet, even this is not clear, because perhaps $f > $g, and $g$ reaches $b$ when $f > b$.
An alternative approach is that since there exists a minimum $\epsilon$ such that $f = g + \epsilon$. Show that $\epsilon$ must go to zero; again, I'm not sure how to prove this.
Finally, it seams to me that the Mean Value Theorem might be useful here, but, again, I can't figure out a means to use it.
A few notes:
I thought of this problem while considering the well known brain teaser of a person climbing down a mountain on day 1, and a person climbing up the same mountain on day 2, that there must be a spot where both people were at at the same time.
If I misused any terminology in writing this problem, please edit and correct.
Would my assertion be true if I relaxed the initial conditions to be only all values in $(a,b)$? And, does it matter if the interval $I$ is open or closed (I think it doesn't.)
UPDATE
To address the comments, I will clarify the given conditions. If there exists better terminology that would not necessitate correction, please help me to use it.
- Interval $I$ is an open or closed interval from $p$ to $q$
- $f$ and $g$ are continuous real valued functions defined on $I$
- There exists values $r,s,t,u$ in $I$ such that $f(r) = a, f(s) = b, g(t) = a, g(u) = b$. I've called this "f and g each take on a and b"; if there is better terminology, please tell me.
- By virtue of #3 and the Intermediate Value Theorem, I conclude that for all $v$ in $[a,b]$, there exists a $w$ and $z$ in $I$ such that $f(w) = g(z) = v$. This is what I mean that "f and g take on all values in [a,b]".
To respond to the questions:
- It seems that I must assume that $I$ is finite.
- $[a,b]$ is a subset of $f(I)$, not necessarily equal.
And, thank you to the commenters, who pointed out that I need another key condition: f and g are bounded by $[a,b]$.