Let $U$ be a non-empty bounded open set of $\mathbb{R}^n$ ($n \geqslant 2$) and $f: U \to \mathbb{R}$ of class $\mathcal{C}^2$. Let $f$ be a function continuous on $\bar{U}$. Show that $f$ attains a maximum at some point $x_0 \in \bar{U}$.
Let $U$ be a non-empty bounded open set of $\mathbb{R}^n$ ($n \geqslant 2$) and $f: U \to \mathbb{R}$ of class $\mathcal{C}^2$. Let $f$ be a function continuous on $\bar{U}$. Show that $f$ attains a maximum at some point $x_0 \in \bar{U}$.