Continuity and Differentiability
We state the continuity and differentiability of a function as follows:
A function f(x) is continuous in the closed interval [a,b] and it is differentiable in the open interval (a,b) such that a<b.
This means that f(x) is defined at the end points a and b but it is not differentiable at these points.
It is necessary because a function is differentiable in an interval when it is differentiable at every point in that interval.
Now at the end point a, the left hand derivative of f(x) is not defined as the function is not available for x<a.
Similarly, at the end point b, the right hand derivative of f(x) is not defined as the function is not available for x>b.
Hence we choose a closed interval for defining continuity and an open interval for defining differentiability.