In finding the optimal value of some function we look for a global minimum or maximum, depending on the problem. How do we know that one exists? The Extreme Value Theorem says: If a function f is continuous on the closed interval a ≤ x ≤ b, then f has a global minimum and a global maximum on that interval.
Try the following:
The first graph shows a piece of a parabola on a closed interval. Clearly there is a global minimum and maximum.
Select the second example from the drop down menu. This shows a sine curve with an interval set to a couple of cycles. There is clearly a global minimum and maximum, although in this case they aren't unique. EVT doesn't guarantee uniqueness of global extrema, just that at least one minimum and one maximum will exist.
Select the third example, showing the same piece of a parabola as the first example, only with an open interval. Since the endpoints are not included, they can't be the global extrema, and this interval has no global minimum or maximum. Hence EVT requires a closed interval to avoid this problem.
Select the fourth example, showing an interval of a hyperbola with a vertical asymptote. There is no global extrema on this interval, which is one reason why the EVT requires a continuous interval.
Select the fifth example, showing a different type of discontinuity. Here, there is no global maximum, showing another reason why EVT requires continuity on the interval.