>>6
There are two ways I've seen this handled:
1) Only define differentiability on the interior of the function's domain.
2) Define differentiability everywhere on the function's domain.
#2 presents the somewhat non-intuitive notion that a function which is differentiable on a set S may not be differentiable on all points of S in a superset of S. For instance, y = |x| is differentiable on [0,1] (including at 0), but not on [-1,1].
#1 avoids this problem - any function which is differentiable on the interior of a set S is differentiable on all points of the interior of S in a superset of S. However, you are no longer able to talk about the differentiability of the function on the boundary of the domain.