# Show that if two maximal values are equal on continuous functions, then there exists $\psi \in [a,b]$ with $f(\psi) = g(\psi)$

Let $f,g : [a,b] \rightarrow \mathbb{R}$ be continuous. We know that $f$ and $g$ have maximal values, as they are continuous on a closed interval. Let $M_f$ be the maximal value of $f$, and $M_g$ the maximal value of $g$. Show that if $M_f$ = $M_g$, then there exists $\psi \in [a,b]$ with $f(\psi) = g(\psi)$

Would it suffice to show that $\psi$ = maximal values, and show that this is an example which shows the exist of such a $\psi$?

• If they take on their maximal values at the same point then we are done. If this is not the case, then use IVT on $f-g$. Oct 21, 2016 at 18:11

Suppose $f(x_1) = M_f$ and $g(x_2) = M_f = M_g$.
If $x_1 = x_2$, you're done.
Otherwise, consider the interval $[x_1, x_2]$ (or $[x_2, x_1]$ if $x_2 < x_1$). The function $f-g$ is continuous on this interval, it's nonnegative at $x_1$, and nonpositive at $x_2$. Thus there must be a point in the interval where $f-g$ is zero. This point is your $\psi$.
Suppose that $f(x_1) = M_f$ and $g(x_2) = M_g$ and assume without loss of generality that $x_1 < x_2$. Now consider $h:=f-g$ restricted to the interval $[x_1,x_2]$. Note that $$h(x_1) = f(x_1) - g(x_1) = M_g - g(x_1) \geq 0$$ and $$h(x_2) = f(x_2) - M_f \leq 0$$ So if $h(x_1) = 0$ or $h(x_2) = 0$ we are done. Else, the intermediate value theorem applies.