Let $f:[0, 1]×[0, 1] \rightarrow \Bbb{R}$ be continuous and assume that for all $x \in [0, 1]$ there is a unique $y_x$ such that $f(x,y_x)$ = $\max\{f(x,y):y∈[0, 1]\}$. If $g(x) =y_x$, then $g:[0, 1] \rightarrow [0, 1]$ is continuous.
Is this true? I believe compactness would play a role.
Any hints would be appreciated.
Let $\psi(x) = \sup_{t \in [0,1]} f(x,t)$, it is not hard to show that $\psi$ is continuous.
Suppose $x_n \to x$, then $\psi(x_n) \to \psi(x)$. Let $g_n$ be such that $\psi(x_n) = f(x_n,g_n)$.
Any subsequence of $g_n$ has an accumulation point $g$ and we must have $\psi(x) = f(x,g)$ by continuity.
By uniqueness, we see that, in fact, $g_n \to g$.
This shows that $g(x_n) \to g(x)$.