TITLE: Continuity on closed intervals - differentiability on open intervals
QUESTION [11 upvotes]: In our lectures notes, continuous functions are always defined on closed intervals, and differentiable functions, always on open intervals. For instance, if we want to prove a property of a continuous function, it would go as "Let $f$ be a continuous function on $[a,b] \subset \mathbb R$" .. and for a differentiable function it would be $(a,b)$ instead.
Why is that?

REPLY [8 votes]: Closed (and bounded) intervals in $\mathbb{R}$ are compact. This implies that continuous functions defined on such intervals have several nice properties such as the following:

They are bounded.
They actually achieve their bounds.
They are uniformly continuous.
They map convergent sequences to convergent sequences.

In general, other intervals do not yield the same properties to continuous functions defined on them.
As far as differentiable functions on open intervals:
If all that is needed is differentiability on the interior of the interval, so much the better. Intuitively, for a real valued function on $\mathbb{R}$ to be differentiable, it means that at each point the graph of the function locally looks like a line. On an open interval every point is an interior point, so this intuition holds fine. If a function is differentiable at the boundary point of a closed interval the graph will locally look like a ray.
As other questions on this site (e.g. Functions with discontinuous derivative at the endpoints of an open interval ) show, this topic can get a bit nasty.