Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I was looking up the definition of the derivative in several books, and what was making me uneasy was the first sentence, generally along the lines of "let $f$ be defined on...". They don't seem to be able to agree on what $f$ should be defined on. Most books say "interval"; one says "open set"; another just says "let $f$ be a real-valued function"; etc. So I decided to do a little investigation.

At the end of the day, we always define the derivative as the limit of a difference quotient (two versions), so we need to look into limits of functions. It turns out that the limit of $f$ at $a$ is only defined for $a \in (\operatorname{dom} f)'$ (we'll denote the set of cluster points of $A$ by $A'$ for convenience), because otherwise, the $0 < |x - a| < \delta$ part of the definition can be made false by choosing $\delta$ small enough to isolate $a$, thereby making the implication vacuously true, which gives non-unique limits, but we don't want that. So at this point, we know that $a$ must be a cluster point of the domain of the difference quotient.

A slight digression: It's easy to show that if $B$ is a finite set, then $A' = (A \cup B)' = (A \setminus B)'$. (That is, "adding" or "subtracting" a finite number of points doesn't affect the "stickiness" of a set.)

Let $A \subseteq \mathbb R$ and let $f: A \to \mathbb R$. For each $a \in A$, we can define a difference quotient function $q_a: A \setminus \{a\} \to \mathbb R$ by $$q_a(x) = \frac{f(x) - f(a)}{x - a}.$$

Now, (in a rather perverted pseudo-self-referential manner), we can define $$f': \{a \in A \cap A': \lim_{x \to a} q_a(x) \in \mathbb R \} \to \mathbb R \qquad \text{by} \qquad f'(a) = \lim_{x \to a} q_a(x).$$

We need $a \in A$ because $f(a)$ is needed to evaluate $q_a$, and we need $a \in A' = (A \setminus \{a\})' = (\operatorname{dom} q_a)'$ for the limit to be defined. So really, derivatives can be defined on sets that are much more general than intervals: we really only need $\operatorname{dom} f \cap (\operatorname{dom} f)' \neq \varnothing$ in order to talk about the derivative of $f$ at some point (of course, the derivative itself need not exist, but at least we can talk about it not existing).

And then I started getting worried... The function $f: \mathbb R \to \mathbb R$, defined by $$f(x) = \begin{cases} x, & x \in \mathbb Q, \\ 0, & x \notin \mathbb Q, \end{cases}$$ has no derivative anywhere. But if we restrict the domain to $\mathbb Q$, then suddenly every point is differentiable with derivative $1$? Now I'm starting to wonder if I made some stupid mistake in the development above, but I can't seem to find it.

So the question is, is the bolded statement above true?

share|improve this question
1  
@BabyDragon I disagree. Derivative is unique when it exists. The following statements are true: $f$ has no derivative anywhere; $f_{|\mathbb Q}$ is differentiable according to chester's definition; $f_{|\mathbb R\setminus \mathbb Q}$ is also differentiable according to chester's definition. These are three different functions. (Recall that by definition, a function is just a set of ordered pairs $(x,y)$ that satisfies certain conditions. Restricting the values of argument removes some elements from this set, and thus makes it a different set.) –  user31373 Jun 23 '12 at 1:24
6  
It does not bother me. After all, $|x|$ is obtained by gluing $x$ and $-x$; you just have a more extreme form of this phenomenon, due to a very permissive definition of derivative. By the way: you can talk about derivatives on $\mathbb Q$ and such sets all you want. But if you want to use derivatives, you need Mean Value Theorem. And the proof of MVT requires an interval. No interval, no MVT, no calculus. –  user31373 Jun 23 '12 at 1:35
2  
@Baby Dragon: the function $g$ is differentiable at zero with $g'(0)=0$, and this is true for any function in the universe satisfying $\mid g(x)\mid \leq x^2$ . –  Georges Elencwajg Jun 23 '12 at 6:55
1  
The point of a derivative (to me) is to characterize behavior of $f$ locally. Local (again, to me) seems to imply some significant portion of a neighborhood. Significant would seem to at least include intervals so some value can be derived from the derivative, so to speak... –  copper.hat Jun 23 '12 at 7:12
1  
From S. Lang, Undergraduate Analysis, 2nd ed., p. 66: "Let $f$ be a function defined on an interval having more than one point, say, $I$. We shall say that $f$ is differentiable at $x$ if the limit of the Newton quotient $$\lim_{h\to 0} \frac{f(x+h)-f(x)}h$$ exists. It is understood that the limit is taken for $x+h \in I$. Thus if $x$ is, say, a left end point of the interval, we consider only values of $h > 0$. We see no reason to limit ourselves to open intervals." [last emphasis mine] –  cardinal Jun 24 '12 at 18:00
show 6 more comments

4 Answers

I personally think it is a bad idea to define the derivative of a function at a point if no neighborhood of that point is contained in the domain. The whole point is that we want a linear approximation $$f(a + h) = f(a) + f'(a) h + O(|h|^2)$$

to hold in a neighborhood of $a$ (hence for $h$ in some open ball) and if there are no such neighborhoods you aren't really talking about the derivative in a conventional sense, but in some weirder sense.

In other words, my inclination would be to restrict to open sets.

share|improve this answer
    
I think it is worth adding that this generalized notion of "derivative" may be interesting for sufficiently nice subsets of $\mathbb{R}$ (or $\mathbb{R}^n$) that are not necessarily open. For example, it is useful to define a notion of "derivative" for a function defined on a rectangle $\prod_{i=1}^{n} [a_i,b_i]\subseteq \mathbb{R}^n$ at a boundary point of the rectangle especially in the theory of smooth manifolds with boundary. I am sure that there are other similar situations as well. –  Amitesh Datta Jun 23 '12 at 5:37
    
@Amitesh: sure, but in the theory of smooth manifolds with boundary you at least have half-neighborhoods. The OP wants to define derivatives on $\mathbb{Q}$! –  Qiaochu Yuan Jun 23 '12 at 6:13
    
@QiaochuYuan Keep in mind that if you consider a function with domain $\mathbb{Q}$ you also have to consider the subspace topology on $\mathbb{Q}$ derived from the topology on $\mathbb{R}$. So (for example) every set $]a-\epsilon;a+\epsilon[\cap \mathbb{Q}$ is an open neighborhood for every $a\in\mathbb{Q}$ (although $]a-\epsilon;a+\epsilon[\cap \mathbb{Q}$ is not open in $\mathbb{R}$ - but our underlying set is $\mathbb{Q}$). Reminder that concepts like "open and closed sets" and "neighborhood" depend on the underlying topology space. –  tampis Jun 23 '12 at 20:16
    
@tampis: I am well aware of this. But those neighborhoods are not homeomorphic to open intervals. –  Qiaochu Yuan Jun 23 '12 at 21:14
    
@QiaochuYuan Why need they to be homeomorphic? But I might get your point: If the domain $D$ of $f$ is open in $\mathbb{R}$ you cannot change the differentiability of $f$ at points in $D$ by extending $f$ in $\mathbb{R}$. But you can change the differentiability of $f$ at those points by extending it to a complex function... –  tampis Jun 23 '12 at 22:19
show 1 more comment

The definition you gave is the definition of derivative I learned at the university ;-)

Here are some links to papers which also use your definition of derivative:

As you already said different authors give different definitions of the derivation and you will also find references with other definitions. The definition you gave is the most general one.

As you mentioned: The derivative of a function $f:A\rightarrow\mathbb{R}$ can be defined for every point of $a\in A$ for which exists at least one sequence $(a_n)$ in $A\setminus\{a\}$ with $\lim_{n\rightarrow\infty} a_n = a$.

As Leonid Kovalev already said in a comment, there are important theorems in calculus (like the mean value theorem) where the differentiable function need to be defined on an interval. That may be the reason why many authors for textbooks in calculus just define the differentiability of functions with an interval as domain.

To have a concept of differentiability for functions like $\mathbb{R}\setminus\{0\}\rightarrow \frac 1x$ too, you have to extend your definition to open subsets of $\mathbb{R}$ (because $\mathbb{R}\setminus\{0\}$ is no interval and formaly two functions differs if their domain is different). Another step of generalization leads you to the definition with limit points.

To your given example: Let $g : \mathbb{Q} \rightarrow \mathbb{R} : x \rightarrow x$. For every $x,h\in\mathbb{Q}$ we have:

$$g(x+h)=g(x)+1\cdot h$$

So every $x,h\in\mathbb{Q}$ fulfills

$$g(x+h)\approx g(x)+1\cdot h+ O(|h|^2)$$

and therefore for every $x\in\mathbb{Q}$ the derivative of $g$ at $x$ is $1$ (as you can see from the above approximiation). There is no reason why we should worry that $g$ is not defined on all $\mathbb{R}$. The approximation $g(x+h)\approx g(x)+1\cdot h+ O(|h|^2)$ is well defined (and you can think of cases where it is useful too).

Now we extend $g$ to your function $f(x) = \begin{cases} x, & x \in \mathbb Q, \\ 0, & x \notin \mathbb Q, \end{cases}$. Because there are new arguments we have to worry about, the approximation fails for every $x\in\mathbb{R}$ and therefore the extended function is not differentiable.

You have this kind of “problem” also if you just define differentiability for functions on open sets in $\mathbb{R}$. $f(x) = \begin{cases} \frac 1x & ;x\neq 0 \\ 0 & ; x=0\end{cases}$ is not differentiable everywhere but $g:\mathbb{R}\setminus\{0\}:x\mapsto \frac 1x$ is differentiable everywhere.

Or a better example from complex analysis: $f:\mathbb{R}\rightarrow\mathbb{R}:x\mapsto 1$ is differentiable but $g: \mathbb{C}\rightarrow\mathbb{R}:a+b\cdot i\mapsto\begin{cases} 1&; b=0 \\0&;b\neq 0 \end{cases}$ is not differentiable for all real numbers.

If the domain $D$ of $f$ is open in $\mathbb{R}$ you cannot change the differentiability of $f$ at points in $D$ by extending $f$ in $\mathbb{R}$. But as the above example shows you can change the differentiability of $f$ at those points by extending it to a complex function...

share|improve this answer
1  
Well, these sources indeed introduce derivative in greater generality, but do not use this extra generality to any purpose. If anything, it only leads to confusion. For example, the functions $u=0$ (defined only on $\mathbb Q$) and $v=0$ (defined only on $\mathbb Q\cdot \sqrt{2}$) are "differentiable" at every point of their domain. The sum $u+v$ is defined only at $0$ and is not differentiable there. So much for the differentiation rules stated on page 11 of your 3rd source. –  user31373 Jun 23 '12 at 22:30
    
@LeonidKovalev I would say that $u+v$ is just defined if the domain of $u$ and $v$ is the same (see this article on planetmath.org) –  tampis Jun 23 '12 at 22:38
    
@LeonidKovalev But you are also right: You can define $u+v$ on $\mathrm{domain}(u)\cap\mathrm{domain}(v)$ and then you will have problems in defining the right rules for differentiability. –  tampis Jun 23 '12 at 22:43
    
@LeonidKovalev But isn't it the task of mathematics to worry about the right assumptions for a theorem and to provide the most general definitions for a concept? –  tampis Jun 23 '12 at 22:51
    
You are welcome to take on this task and write articles and books about differentiable functions on sets such as $\mathbb Q$. See if your readers will thank you. –  user31373 Jun 23 '12 at 22:59
add comment

It is fairly common in real analysis literature (and even in some textbooks) to define the derivative of a function $f:A \rightarrow {\mathbb R},$ where $A \subseteq {\mathbb R},$ at all points in $A$ that are also limit points of $A$ (but at no other points). The earliest reasonably general treatment of this notion I know of is

Earle Raymond Hedrick, On derivatives over assemblages, Transactions of the American Mathematical Society 8 #3 (July 1907), 345-353. JFM 38.0419.02

share|improve this answer
add comment

This more general notion of a derivative does appear in certain branches of real analysis. For instance, an important technical notion is that of an approximately differentiable function. This notion is defined as the approximate limit of the usual differential quotient and as such is defined at any density point of the domain.

Approximately differentiable functions arise especially in the theory of nonabsolute integration (i.e., integrals of Denjoy-Khinchin-Perron-Kurzweil-Henstock). Russell Gordon's book is a very nice introduction to this circle of ideas.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.