Global Maximum of $f(x,y)$ on a set $M$. I want to investigate the function $f(x,y) = 4x^2 + 9y - \frac{1}{3}y^3$ on the set $M:= \{(x,y) \in \mathbb{R}^2 : y \geq |x|\}$. In particular, I want to

a) proof the existence of a global maximum on the set $M$,
b) find all points in $M$ where this maximal value is reached.

First of all I did draw a picture of the set $M$. (Since $M$ is not very hard to illustrate I do not post it here.)
I really struggle with a). The only real theorem I know is that every continuous function on a compact set has a Min/Max. Since $M$ is not compact, I don't see how I can proof a). I thought about quadratic expansion, but that did not work.
Considering b), I first took a look at the gradient
\begin{align}
\operatorname{grad} f(x,y) = \begin{pmatrix} 8x \\ 9 - y^2\end{pmatrix}
\end{align}
which is zero for $(0,3)$ and $(0,-3) \notin M$. Using the Hessian Matrix $\mathcal{H}_f$ and evaluating it at $(0,3)$ leads to the fact that $(0,3)$ seems to be a saddle point. Hence, there looks to be no inner point, which might be interesting for the question.
Looking at the boundaries of $M$, as Fra suggested in his answer, I looked at
$$f|_{\partial M}(x,y) = \begin{cases} g(x) := 4x^2 +9x - \frac{x^3}{3}, & \mbox{if } x \geq 0\\
h(x) := 4x^2 -9x + \frac{x^3}{3}, & \mbox{if } x < 0
\end{cases}$$
and found that $g$ has a maximum, namely $\max\{4x^2+9x - \frac{x^3}{3}\} = 162$ for $x = 9$. $h$ as well has a maximum, $\max\{4x^2-9x + \frac{x^3}{3}\} = 162$ for $x = -9$.
So my answer to b) is $\{(9,9), (-9,9)\}$ with value $162$.
Can someone provide a solution/explanation for a)? Furthermore I would be glad if my solution for b) can be verified.
 A: You should check at the boundary of $M$
$$f|_{\partial M}(x,y) = \begin{cases} g(x) := 4x^2 +9x - \frac{x^3}{3}, & \mbox{if } x \geq 0\\
h(x) := 4x^2 -9x + \frac{x^3}{3}, & \mbox{if } x < 0
\end{cases}$$
Just maximize $g : [0,\infty) \rightarrow \mathbb{R}$ and $h :(\infty,0)  \rightarrow \mathbb{R} $
ADDENDUM:
For the proof of $(a)$ you can argue as follow:
since $\lim_{y \to \infty} f(x,y) = -\infty$ uniformly wrt to $x$ the following fact holds:
for every $L \geq 0$ there exist $K = K(L) > 0$ such that $f(x,y) < -L$ for every $x$ if $ y > K$, take $L = 1$ and let $M' := \{(x,y) \in M\,|\,y \leq K\}$. By construction we have:
$$\sup_{M'}f \leq \sup_M f$$
but since $f < -1$ outside $M'$ and $f(0) = 0 > -1$ it holds also that
$$\sup_{M'}f \geq \sup_M f$$
Now since $M'$ is compact and $f$ is continuous it has a maximum on $M'$ and since $$f(x_0,y_0) = \max_{M'}f > -1$$
then
$$f(x,y) \leq \max_{M'}f = f(x_0,y_0)$$ for every
$(x,y) \in M$. So $f$ has a maximum on $M$.
The part $(b)$ seems correct to me
A: Considering $y \ge |x|\ge 0$
$$
f(x,y) = 4x^2+9y-\frac 13y^3\le 4y^2+9y-\frac 13y^3\le 162
$$
The stationary points can be determined using the lagrange multipliers technique.  Considering
$$
L(x,y,\lambda,s) = 4x^2+9y-\frac 13y^3+\lambda(y-\sqrt{x^2}-s^2)
$$
The slack variable $s$ was introduced to transform the inequality restriction into an equation. The stationary points are determined as the solutions for
$$
\nabla L = 0 = \left\{
\begin{array}{l}
 8 x-\frac{\lambda  x}{\sqrt{x^2}} \\
 \lambda -y^2+9 \\
 -s^2-\sqrt{x^2}+y \\
 -2 \lambda  s \\
\end{array}
\right.
$$
with solutions
$$
\left[
\begin{array}{ccccc}
f & x & y & \lambda & s \\
 162 & -9 & 9 & 72 & 0 \\
 162 & 9 & 9 & 72 & 0 \\
\end{array}
\right]
$$
Here $s=0$ denotes that the stationary points are located at the feasible region boundary.  Follows a plot showing in light blue the feasible region and in black the level curves for $f(x,y)$. In red are indicated the stationary points. Note the tangency between the boundary and the level curves associated to the stationary points.

