(Repost from MO, where the question will eventually be closed.)
This question is related to lectures I have to make concerning differential calculus in one variable, but the students are quite advanced, and prepare themselves to be high school teachers.
Requiring a function to be defined on an interval is not sufficient (think of 𝑥↦1/𝑥), nor is it sufficient to only consider open subsets of $\mathbf R$ (think of a function defined on $[0;1]$).
In principle, that no point is isolated suffices to define the derivative, but this may sound as a too far-fetched hypothesis.
To add a bit of context, let me recall that the standard French curriculum for calculus is particularly touchy on hypotheses. For example, there are 3 Taylor formulas (Lagrange, Young, with integral remainder), each with its precise formulation, and, as a consequence, students are supposed to pay attention whether one assumes derivability on the interior only, or everywhere…
So what do you feel is the reasonable context for a function defined over a subset of the reals, to discuss differentiability and higher derivatives of functions in 1 variable?