TITLE: to show $f(t)=g(t)$ for some $t\in [0,1]$
QUESTION [7 upvotes]: Let $f,g:[0,1] \rightarrow \mathbb{R}$ be non-negative, continuous functions so that
$$\sup_{x \in [0,1]} f(x)= \sup_{x \in [0,1]} g(x).$$
We need To show $f(t)=g(t)$ for some $t\in [0,1].$
Thank you for help.

REPLY [7 votes]: Let
$$
f(x_1)=\max_{0 \leq x \leq 1} f(x), \quad g(x_2) = \max_{0 \leq x \leq 1} g(x).
$$
If $x_1=x_2$, we are done. Otherwise, suppose that $x_1<x_2$. Look at $f(x_2)$: clearly $f(x_2) \leq g(x_2)$. If $f(x_2)=g(x_2)$, we are done. Otherwise $f(x_2)<g(x_2)$. Swapping $f$ and $g$, we can conclude that $f(x_1)>g(x_1)$. By the intermediate value theorem, there must exist a point $\bar{x} \in (x_1,x_2)$ such that $f(\bar{x})=g(\bar{x})$.