I've been watching the Khanacademy videos on Calculus and in this video, at 4:18:

Spoiler: Khanacademy - Minima, maxima and critical points

He talks about relative minima and maxima in an interval. He says that the relative extrema can't be at the endpoints.

As far as I understand, in that case the interval would have to be an open one, but my question is what is the problem in having a closed interval and hence allowing them (to the relative extrema) to be at the endpoints?

By having a closed interval:

1) I can ''define'' the absolute extrema in it, since we don't care about what is happening outside that interval.
2) The absolute extrema can be at the endpoints.

Why do we care about what is happening outside an interval when finding relative extrema?

I watched the whole thing and, no, he doesn't say that! He says that he is only talking about those relative extrema that are not endpoints. He is NOT saying that endpoints cannot be relative extrema only that what he is saying in this particular video does not deal with them.

Okay, it looks like some people define relative extrema so that they can't be end-points. But, their definition of absolute extrema does admit end-points. I'm not sure why you would do this. So, if f is defined on [a, b], then f can have absolute extrema at a and/or b, but not relative extrema.

I would define relative extrema differently so that end-points can be (and usually are) relative extrema. And, any absolute extremum is also a local extremum. But, I guess, there may be reasons to do things differently.

The lesson is that you have to take care with how a particular author is defining things.

What the author is trying to do is ensure that f is defined on an open interval containing c (for c to be a local extremum). And, thus exclude the end-points. This all gets a bit messy if you ask me. I would tend to say simply that ##c \ne a \ or \ b## if you want to exclude the end-points.

If I have a closed interval of a continuous function, by the Extreme Value Theorem I know there will be absolute extrema in that domain. And since I'm including the endpoints, those can be absolute extrema too. But since absolute extrema are also considered relatives ones, then the endpoints can be relative extrema, and hence can have a closed interval (well, that's is what I think because in that case I'm allowed to test the endpoints with the derivative).

In the function ##\sin((x + \frac{1}{25})\pi) + \cos(3(x + \frac{1}{25})\pi)## below I have the closed interval ##[0, 1.28]## where I can find endpoints that are relative extrema:

The former is differentiable everywhere. The latter is differentiable on ##(0, \pi)##

I would say that ##f_2## has absolute/local minima at 0 and ##\pi##. The alternative definition you found would say that ##f_2## has absolute minima at 0 and ##\pi## but these are not local minima.

And so the fact that the endpoints can be absolute extrema is other matter, right? (I think I got confused because of the Closed Interval Method. I can see that in the process followed in finding the absolute extrema of a closed interval I never evaluated the derivative at the endpoints |: ).

Yep. Now it makes sense to me (it's differentiable if I can differentiate it coming from the left and the right).

Finally, I think I'm beginning to understand this.