# Why can't we define the derivative at a point in a set (not necessarily an open one)

I'm reading a book which defines in the following manner differentiable functions:

The map $F:U\to \mathbb R^n$, defined in an open set $U\subset\mathbb R^m$ is differentiable at the point $a\in U$ when there exists a linear map $T:\mathbb R^m\to \mathbb R^n$ such that

$$f(a+v)-f(a)=T\cdot v+r(v),\text{where \lim_{v\to 0}\frac{r(v)}{v}}=0.$$

Let $X\subset\mathbb R^m$ be any set. We can say $f:X\to\mathbb R^n$ is differentiable if it's a restriction of a differentiable map $F:U\to \mathbb R^m$ defined in a open set $U\supset X$.

In the same book the author says:

In general the derivative of an map $f:X\to\mathbb R^n$ at a point $x\in X\subset \mathbb R^m$ isn't well-defined, because the possible extensions of $f$ to neighborhoods of $X$ can have different derivatives at the point $x$. (This is obvious, for example, in the case $X$ is only a point $x$.)

So I have the following doubts:

1. Why can't we define the derivative at a point contained in a general set? why is the open set so special that we can define the derivative in it?

2. What does the author mean with the example when $X=\{x\}$?

The idea of a derivative is that you're looking at behavior "near" a point. If your set is open, then "zooming in" far enough allows you to restrict your attention to places where $f$ is defined. But if $X$ isn't open, then at some points in $X$, it's not possible to take a small enough neighborhood to ignore the places where $f$ is undefined, which is a problem for the limit - the limit talks about "for all $v$ small enough...", not just the ones on which $f$ is defined.

When $X = \{x\}$, $T$ can be anything. For an example, take $n = 1$ and let $f(x) = 4$. $T$ is, say, $7$, because we can write $f(x + v) - f(x) = 7v + 0$ - since $x$ is the only point in existence, the only value of $v$ we have to consider is $0$. So the statement $f(x+v) - f(x) = 7v + 0$ is true for all allowable $v$, and $\lim_{v\to 0}\frac{0}{v} = 0$, so $7$ is the derivative. But we could pick any other number in place of $7$ - since there is only one point, $v$ is always zero, so the number doesn't matter. So the derivative takes on all values at this one point.

• Do you think we can define the derivative at $a$ if it's is a limit point of $X$, where $X$ is not open? – user42912 Feb 16 '17 at 19:24
• @user42912 We can (though we would have to slightly change the definition to include the phrase "when $x + v \in X$") but I'm fairly sure most of the useful theorems will be lost. – Reese Feb 17 '17 at 0:23

1. Well, it seems to me like the author did define the derivative at a point contained in a general set. Only, his definition does not guarantee that the derivative at such a point will be unique.

Naively, open set are special because at every point in an open set there is a lot of room. More precisely, if $a \in U$ and $U$ is open then you can find an open ball around $a$ that remains contained in $U$. Such an open ball around $a$ assures you that the equation $$f(a+v)-f(a)=T\cdot v+r(v)$$ makes sense for all $v$ with sufficiently small $\| v \|$. In particular, it makes the limit $$\lim_{v\to 0}\frac{r(v)}{v}=0 \tag{\star}$$ well-defined. Remember, $(\star)$ means that no matter what path $v$ takes in $\mathbb{R}^m$ to go to $0$, $\frac{r(v)}{v}$ will get as close as you want to $0$ following that path.

2. Now, let's consider the simple case $m=n=1$ to illustrate things.

If $X = \{0\}$, for example, then all you have is a function defined at one point. Suppose your function $f$ is such that $f(0)=0$.

Following the definition of the author, $f$ is differentiable at $0$ because it is the restriction of the constant function $g(t):=0$ defined on $\mathbb{R}$. The derivative $g'(0)$ is equal to $0$. So we could say $f$ has derivative $0$ at $0$.

Also following the definition of the author, $f$ is differentiable at $0$ because it is the restriction of the function $h(t):=t$ defined on $\mathbb{R}$. The derivative $h'(0)$ is equal to $1$. So we could say $f$ has derivative $1$ at $0$.

Now you see that since $0\neq1$ we lost the uniqueness of $f'$ at $0$.

This being said, sometimes, the "generalized" derivative will be unique. For example, consider the function $f:\mathbb{R}_{\leq0}\to\mathbb{R}$ defined by $f(t):=-t$. Note that the domain of $f$, which is $\mathbb{R}_{\leq0}$, isn't open in $\mathbb{R}$. However, at the point of interest $t=0$, the left derivative of $f$ exists and equals $-1$. Hence if $g$ is a function differentiable at $0$ such that $f$ is its restriction on $\mathbb{R}_{\leq0}$, then it must be the case that $g'(0)=-1$. Thus $f'(0)$ is unique and equals $-1$ according to the definition of the author.

By the way, in the last example. $(\star)$ doesn't make sense when $a=0$ because $r$ is not defined for $v>0$. Hence the limit in $(\star)$ can only be a left-side limit $\displaystyle\lim_{v\to0^-}$, which is a weaker condition than the full two-sided limit $\displaystyle\lim_{v\to0}$. What you get is the left derivative of $f$ at $0$. As you know, a function $f$ may have a left derivative at $a$ but fail to have a derivative at $a$.

• Do you think we can define the derivative at $a$ if it's is a limit point of $X$, where $X$ is not open? – user42912 Feb 16 '17 at 19:25