Assume $f$ is convex but not constant with the domain $X$ is also convex set, let $\hat{x} \in X$ is the maximizer, then it is not necessary that $\hat{x}$ is an extreme point.
I cannot see this is true, intuitively, if $\hat{x}$ is a maximizer then it should be an extreme point. Could anyone give me an example? Thank you very much.
Hint:
$f$ can be constant on a line on the boundary, like $$ f(x,y) = |x| $$ for $(x,y)\in [-1, 1]^2$.