I'm having a hard time with this certain problem.
Suppose that $S=\{(x,y): x^2 + y^2\leq 4\}$ and define $f:S\rightarrow\mathbb{R}$ as $f(x,y)=-x-2y-2y^2+cos(x\pi /4)$.
How can we produce a (3d) plot, in MATLAB or Mathematica, that shows whether this function is convex or concave (or neither)?
Thanks in advance for your help.
Here is the plot using wolfram alpha over $[0,2]^2$:
Clearly looks concave.