Why derivatives are usually defined for interior points? Let $f:D\to\mathbb{R}$ be a function with $D\subseteq\mathbb{R}$. In calculus, one usually assumes that $D=\mathbb{R}$ or $D\subset\mathbb{R}$ is an interval defined as one of the cases below.
\begin{align*}
[a,b]&=\{x\in\mathbb{R}|a\leq x\leq b\}, \quad && [b,+\infty)=\{x\in\mathbb{R}|x\ge b\}, \\
[a,b)&=\{x\in\mathbb{R}|a\leq x< b\}, \quad && (b,+\infty)=\{x\in\mathbb{R}|x> b\}, \\
(a,b]&=\{x\in\mathbb{R}|a< x\leq b\}, \quad && (-\infty,a)=\{x\in\mathbb{R}|x< a\}, \\
(a,b)&=\{x\in\mathbb{R}|a< x< b\}, \quad && (-\infty,a]=\{x\in\mathbb{R}|x\leq a\}.
\end{align*}
Definition. Suppose that the following limit exists
$$\lim_{t\to x}\frac{f(t)-f(x)}{t-x}=L,\tag{1}$$
where $L\in\mathbb{R}$. Then, derivative of $f$ at point $x\in D$ is defined to be $Df(x):=L$. An equivalent definition follows from the change of variables in limits, e.g., Theorem 2 in this post.
$$f'(x)=\lim_{\Delta x\to 0}\frac{f(x+\Delta x)-f(x)}{\Delta x},\tag{2}$$
The $\epsilon-\delta$ translation for the definition in $(1)$ is
$$\exists L \in \mathbb{R},\,\,\forall\epsilon>0,\,\,\exists\delta>0,\,\forall t,\,\, t\ne x \land t\in D\cap B_{\mathbb{R}}(x,\delta) \implies \frac{f(t)-f(x)}{t-x}\in B_\mathbb{R}(L,\epsilon).$$
I usually see in real analysis books that one defines the derivative for interior points of $D$. However, looking at $(3)$, I don't understand why such a restriction is usually made. As an example, consider $D=[a,b)$ and let $x=a$. The above definition then turns into
$$\exists L \in \mathbb{R},\,\,\forall\epsilon>0,\,\,\exists\delta>0,\,\forall t,\,\, t\ne a \land t\in [a,b)\cap B_{\mathbb{R}}(a,\delta) \implies \frac{f(t)-f(a)}{t-a}\in B_\mathbb{R}(L,\epsilon),$$
which by assuming that $0<\delta <b-a$ is equivalent to
$$\exists L \in \mathbb{R},\,\,\forall\epsilon>0,\,\,\exists\delta>0,\,\forall t,\,\, t\in(a,a+\delta) \implies \frac{f(t)-f(a)}{t-a}\in B_\mathbb{R}(L,\epsilon),\tag{3}$$
that I think totally makes sense. Is there any specific reason for confining derivative to interior points? Can some well-known theorems in calculus fail if we don't consider such a restriction?
 A: What you relate as $(3)$ is known as right derivative. See semi-differentiability for more details.
The issue if you define a map to be differentiable if it is only left or right differentiable at the end points of its interval of definition is that indeed some theorems are no more valid.
For example the map $f : x \mapsto x$ defined on $[0,1]$ has extreme points. $0$ and $1$ namely. However the derivative doesn't vanish at those points.
A: The question of the derivative on a boundary point of a closed set has been asked in slightly different ways many times. You may be able to find enlightenment in the answers to some of these questions:
Are derivatives defined at boundaries?
differentiablility over open intervals
Derivative at Endpoint
Why is continuity permissible at endpoints but not differentiability?
derivative on endpoints
Some takeaways:


*

*It certainly is possible to define derivatives in such a way that you can have a differentiable function on a closed interval.

*A suitable definition of a derivative on a closed interval requires more sophistication than you might be able to support in an introductory calculus course.

*Some functions on closed intervals are differentiable everywhere except at the endpoints, so you have to restrict the function to the interior in order to make it differentiable. (Of course this is no worse a situation than having to restrict it to the interior by definition of the derivative).

*In multivariable analysis, it may be possible that the Jacobian of a function is not unique at some points on the boundary of the closed domain $D$ of the function, although the function is differentiable if you restrict it to the interior of $D.$

*For a lot of purposes, differentiability on open domains is enough, so that's how the definition is written for those purposes.
