# Show that $h(x)=\max \{f(x,y) : y \in [0,1] \}$ is continuous

Let $f(x,y) \$ be a continuous real-valued function on the unit square $[0,1] \times [0,1]$.

Show that $$h(x)=\max \{\,f(x,y) : y \in [0,1] \},$$ is also continuous.

Answer. Since $f(x,y)$ is continuous, then $\max \{f(x,y) \}$ is also continuous on $[0,1 ] \times [0,1]$.

Thus for any fixed values of $y \in [0,1] \$ , $\max \{f(x,y) \}$ is also continuous .

i.e., $\max \{f(x,y): y \in [0,1] \}=h(x) \$ is also continuous.

But I need a $\varepsilon-\delta \$ proof. Is there any?

• Do you happen to know about uniform continuity (on compact sets)? Oct 5, 2017 at 8:25
• max${f(x,y)}$ would need some clarification on meaning because I dont think your 'answer' correct. Is it a constant function in $x$ and $y$? Oct 5, 2017 at 22:25

Since $f$ is continuous, then for every $\varepsilon>0$, there exists a $\delta>0$, such that $$|x_1-x_2|+|y_1-y_2|<\delta\quad\Longrightarrow\quad |\,f(x_1,y_1)-f(x_2,y_2)|<\varepsilon$$

Consider $x_1,x_2\in[0,1]$, with $|x_1-x_2|<\delta$. Then there exists $y_1,y_2\in [0,1]$, such that $$|h(x_1)-h(x_2)|= \Big|\max_y f(x_1,y)-\max_y f(x_2,y)\Big|= | f(x_1,y_1)-f(x_2,y_2)|.$$ Clearly,

$0 \le f(x_1,y_1)-f(x_2,y_1)<\varepsilon\quad$ and $\quad 0\le f(x_2,y_2)-f(x_1,y_2)<\varepsilon$.

Thus, $$f(x_1,y_1)<f(x_2,y_1)+\varepsilon\le f(x_2,y_2)+\varepsilon \tag{1}$$ and $$f(x_2,y_2)<f(x_1,y_2)+\varepsilon\le f(x_1,y_1)+\varepsilon \tag{2}$$ Combining (1) and (2), we obtain $$-\varepsilon< f(x_1,y_1)-f(x_2,y_2)<\varepsilon$$ or equivalently $$|h(x_1)-h(x_2)|<\varepsilon.$$

You need to use this inequality.

$$|max \ f(x) - max \ g(x)| \le max|f(x) - g(x)|$$

Then, write the difference below.

$$|h(x)-h(x_0)|=|max\{f(x,y):y\in [0,1]\}-max\{f(x_0,y):y\in [0,1]\}|$$

Note that the two maximum functions, in the expression above, can be considered as $f(x)$ and $g(x)$ that we used in the inequality. So, using the inequality, the expression becomes

$$|max\{f(x,y):y\in [0,1]\}-max\{f(x_0,y):y\in [0,1]\}| \leq max\{|f(x,y)-f(x_0,y)|:y\in [0,1]\}$$

then, we use the continuity of $f(x,y)$ to say

$$\forall\epsilon \hspace{1mm}\exists \hspace{1mm} \delta|\hspace{1mm} |d(x-x_0,y-y)|=|d(x-x_0,0)|=|x-x_0|<\delta \implies |f(x,y)-f(x_0,y)|<\epsilon$$

Now, you need to choose the delta to be as below, knowing that for a data point $(x,y)$, $\delta$ is a function of $\epsilon$. So write $\delta(\epsilon,x,y)$

$$\delta(\epsilon) = inf\{\delta(\epsilon,x,y)|x,y\}$$

with this delta, you can go in the inverse direction.

Suppose that $h$ is not continuous at some point $x_0.$ then there exists a number $\varepsilon >0$ and a sequence $x_n \to 0$ such that $$|h(x_n ) -h(x_0 )|\geq \varepsilon.$$ Since the functions $\xi_n (y) =f(x_n ,y )$ are continuous on $[0,1],$ thus for any $n$ there exists $y_n$ such that $h(x_n )= \xi_n (y_n) =f(x_n , y_n ).$ But the interval $[0,1]$ is compact therefore $y_{n_j} \to y_0 \in [0,1],$ for some sequence $(n_j ).$ Hence $$f(x_{n_k} , y^{\chi} )-f(x_0 ,y^{\chi})\leq f(x_{n_k} , y_{n_k} )-f(x_0 ,y^{\chi})\leq -\varepsilon \vee f(x_{n_k} , y^{\chi} )-f(x_0 ,y^{\chi})\geq f(x_{n_k} , y_{n_k} )-f(x_0 ,y^{\chi})\geq \varepsilon$$ where $y^{\chi}$ is such that $h(x_0 ) = f(x_0 ,y^{\chi} ) .$ But the last implies that $$0=f(x_0 , y^{\chi} )-f(x_0 ,y^{\chi})\leq f(x_0 , y_0 )-f(x_0 ,y^{\chi})\leq -\varepsilon \vee 0=f(x_0 , y^{\chi} )-f(x_0 ,y^{\chi})\geq f(x_0 , y_0 )-f(x_0 ,y^{\chi})\geq \varepsilon$$ Contradiction