Interior-value criterion for an attained maximum (source code)

= Interior-value criterion for an attained maximum

Let $f:[a,b]\to\mathbb R$ be bounded above and <continuous> on $(a,b]$. Suppose $\limsup_{x\downarrow a}f(x)\leq L<\infty$. If some $c\in(a,b]$ satisfies
$$
f(c)>\max\{L,f(a)\},
$$
then $f$ attains a <global maximum> on $[a,b]$, at a point other than $a$. The value $f(a)$ must be specified even though <continuity> there is not assumed.

Choose $\eta>0$ with $L+\eta<f(c)$. The <limit superior> hypothesis gives $\delta>0$, small enough that $a+\delta<c$, for which $f(x)<L+\eta$ whenever $a<x<a+\delta$. The <extreme value theorem> gives a maximizer on the <compact interval> $[a+\delta,b]$. Its value is at least $f(c)$, hence exceeds every omitted value and $f(a)$. This proves attainment despite a possible oscillatory discontinuity at the endpoint.