# How to prove that a local extrema is an Absolute extrema on an open interval?

So I know how to find the Absolute extrema of a continuous function on a Closed interval by using the Extreme Value theorem. Additionally, I know how to find the set of local extrema by using the first and second derivative tests.

Since all Absolute extrema are local, How would I prove that a local extrema is an Absolute extrema on an open interval?

For example, If I would like to find the Absolute Max of a function over it's Domain. I'd find the critical points and check how the sign changes at the critical points to determine whether a local max is attained at f(c) where is c is a critical point. If we only have one local max is must the the absolute maximum.

But what would I do if we attain multiple local maxima? Would the Absolute Maximum just be the largest value of the set of local maxima? Or is there a whole other method of finding Absolute extrema on an open interval?

Any help would be appreciated.

Unlike closed interval, function on open interval (or any non-compact set for this matter) doesn't necessary have an absolute maximum. Simple example is unbounded function ($$\frac{1}{x}$$ on $$(0, 1)$$), more interesting is $$(1 - x) \cdot \sin \frac{1}{x}$$ on $$(0, 1)$$ - it has values arbitrarily close to $$1$$, but in no point is it equal (or greater) than $$1$$.