I know that f is not continuous at 0 or at 5.
The definition of "f is continuous from the right at a" is:
Thus f is continuous from the right at 0.
The definition of "f is continuous from the left at b" is:
Thus f is continuous from the left at 5.
The definition of "f is continuous on the closed interval [a,b]" is that f is continuous on (a,b) and f is continuous from the right at a and f is continuous from the left at b.
Thus, by definition of continuity on a closed interval, f is continuous on the closed interval [0,5], since it is continuous on the open interval (0,5), continuous from the right at 0, and continuous from the left at 5.
If someone were to ask, "For what values of x is f continuous?" then I know that I would answer this, because f is discontinuous at 0 and 5:
But if someone were to say "Describe the intervals on which f is continuous," then how can I possibly dispute it if a student answers this?
We have in fact demonstrated that f is continuous on the closed interval [0,5], even though f is not continuous at either of the values 0 or 5.
My frustration is that as I have been combing the internet for example problems of continuity on closed intervals, I keep coming across examples like this, where f is not even defined outside of that closed interval:
But what about the example at the top of this post, where the function is defined beyond the closed interval in question, and is in fact discontinuous at the endpoints of that interval? Can we still say that f is continuous on that closed interval?