I posted several questions about the continuity of $max$ functions.
Let me assume that the function $f(x,y,z,w)$ is continuous. Is the $\max_{w} f(x,y,z,w)$ continuous?
Continuity proof for compact domain
I combined the answers about the continuity and the condition that the domain is convex or compact is not sufficient for showing that the $\max_{w} f(x,w)$ is continuous.
However, in Continuity proof for compact domain, Hans Engler gave me a comment that $\max_{w} f(x,w)$ is continuous if the domain is a Cartesian product.
So I want to know how to prove: "If $f(x,w)$ is continuous and $x\in [0,x_1]\times[0,x_2]\times[0,x_2]\times[0,x_2]\times[0,x_4]$, $w\in[0,w_1]$, $\max_{w}f(x,w)$ is continuous. ($x_1,x_2,x_3,x_4$ and $w_1$ is real number.)"
Good news, this should be true!
We denote the domain for $x$ by $X$ and the domain for $w$ by $W$. We also define $$ g(x):= \max_{w \in W} f(x,w). $$
For proving continuouity of $g$ at a point $\bar x$, let $x_n$ be a sequence such that $x_n\to \bar x$. We have to show that $g(x_n)\to g(x_0)$. Let $w_n$ be such that $g(x_n)=f(x_n,w_n)$. Since $w_n$ is from a compact domain, it has a convergent subsequence $w_{n_k}$ with limit $w$. Then it follows that $$ g(x_0)\geq f(x_0,w) = \lim_k f(x_{n_k},w_{n_k}) = \lim_k g(x_{n_k}). $$ By using the same argument for a suitable subsequence of $x_n$, it follows that $$ g(x_0)\geq \limsup_n g(x_n). $$
Let $w_0$ be such that $g(x_0)=f(x_0,w_0)$. It remains to show that $g(x_0)\leq \liminf_n g(x_n)$. But this is true due to the following calculation. $$ g(x_0) = f(x_0,w_0) = \liminf_n f(x_n,w_0) \leq \liminf_n g(x_n). $$ This completes the proof.
some comments: Note that we only need the compactness of $W$ (for the existence of maximizers and converging subsequence). For $X$ we do not need compactness. We also dont need any convexity (neither for $X$ nor for $W$).