Global maximizer (source code)

= Global maximizer
{title2=$x_*$}

A <global maximizer> of $f:X\to\mathbb R$ is a point $x_*\in X$ satisfying $f(x_*)\ge f(x)$ for every $x\in X$. The <global maximum> is the attained value $f(x_*)$; <argmax> collects all points attaining that value:
$$
\operatorname*{arg\,max}_{x\in X}f(x)=\{x\in X:f(x)\ge f(y)\text{ for every }y\in X\}.
$$
The set can be empty or contain many points. For $f(x)=\cos x$ on the <real line>, the <global maximum> is one and the <global maximizers> are $2\pi k$, $k\in\mathbb Z$. No single representative is specified by the optimization problem.

A <stationary point> is a different kind of condition. For a <differentiable function> on an open real <interval>, an interior <global maximizer> has zero <derivative>, but the converse fails: $f(x)=x^3$ has zero <derivative> at zero without a <local maximum>. A boundary <global maximizer> need not have zero <derivative> either; $f(x)=x$ on $[0,1]$ attains its largest value at the right endpoint.

The <extreme value theorem> supplies a useful sufficient existence condition: a <continuous function> on a nonempty <compact set> attains its maximum. Compactness is sufficient, rather than necessary; the <cosine> example attains a <global maximum> on the noncompact <real line>.