I am trying currently why we (the mathematicians) imply that whenever the derivative of a real function $f$ is involved, always the domain $D\_f$ of $f$ should be open interval or at least semi-open (then we talk about the right or left derivative). $Thanks$ $in$ $advance$.



derivative of a real function without open domain
Hassler Whitney proposed a definition for $C^1$ function (and more generally $C^k$ and $C^\infty$) for a function defined on a subset of $\mathbb R^n$ that is not necessarily open. 


Whitney, Hassler, 
Trans. Amer. Math. Soc. 36 (1934), no. 1, 63–89.  

[LINK](http://www.ams.org/journals/tran/1934-036-01/S0002-9947-1934-1501735-3/home.html) 


In case of a $C^1$ function on a set $A \subseteq \mathbb R$, the definition specializes to this:


The function $f : A \to \mathbb R$ is said to be $C^1$ on $A$ iff there is a function $f\_1 : A \to \mathbb R$ such that
$$\begin{align}
f(x') &= f(x')+f\_1(x) \;(x'-x) + R\_0(x',x),
\\
f\_1(x') &= f\_1(x) + R\_1(x',x),
\end{align}$$
where $R\_0, R\_1$ satisfy: given any point $x^0 \in A$ and any $\epsilon \gt 0$, there is a $\delta > 0$ such that if $x,x'$ are any two points of $A$ with $|x-x^0|<\delta$ and $|x'-x^0|<\delta$, then
$$
|R\_1(x',x)| \le \epsilon,\qquad
|R\_0(x',x)| \le |x'-x|\;\epsilon .
$$


