Let $f(x,y):\mathbb{R^n}\rightarrow \mathbb{R}$ be a convex function in $x$ for each $y\in U$. Then, the pointwise supremum, written as $$g(x)=\sup_{y \in U}f(x,y)$$ is a convex function. The proof that I have written(and also found it online) goes like this-
Let $x_1,x_2 \in \mathbb{R^n}$, and $ t\in[0,1]$. Then we can write $$g(tx_1+(1-t)x_2)=\sup_{y\in U}f(tx_1+(1-t)x_2, y)$$ By the property of supremum, we can write for any $\epsilon >0$ $$\sup_{y\in U}f(tx_1+(1-t)x_2, y) \leq f(tx_1+(1-t)x_2, y_{\epsilon})+\epsilon$$ From convexity condition, we can write
$$f(tx_1+(1-t)x_2, y_{\epsilon})+\epsilon \le tf(x_1,y_{\epsilon})+(1-t)f(x_2,y_{\epsilon})+\epsilon\\ \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\leq t\sup_{y\in U}f(x_1,y)+(1-t)\sup_{y\in U}f(x_2,y) + \epsilon \\ \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, =tg(x_1)+(1-t)g(x_2) + \epsilon$$
Finally, we can write $$g(tx_1+(1-t)x_2) \leq tg(x_1)+(1-t)g(x_2) + \epsilon$$ Letting $\epsilon \to 0$, we get the desired result.
I have two questions regarding the above proof-
1) I'm not able to grasp the last statement 'Letting $\epsilon \to 0$, we get the desired result'. There is still a positive number epsilon for which we get the desired result, therefore how can we let $\epsilon \to 0$?
2) Will the above proof hold if we replace $\sup$ with $\max$?
I am a beginner in Real Analysis, so please pardon me if these questions are a little stupid.
Here is my answers,
1) It likes if $a_n \geq b_n$ for all $n$ then $\lim_{n \to \infty} a_n \geq \lim_{n \to \infty} b_n$. You can take $\epsilon = 1/n$ then take the limits on both side.
2) We can always use "sup" but for using the word "max" you need to achieve this maximum. We do not know there exist or not $y_0 \in U$ such that $f(x,y_0) \geq f(x,y)$ $\forall y \in U$, i.e., $\underset{y \in U}{\arg\max}f(x,y) \neq \emptyset $ so we should not replace "sup" by "max".