16
$\begingroup$

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?

  • 0
    I think that your function, $$f(x) = \begin{cases} x, & x \in \mathbb Q, \\ 0, & x \notin \mathbb Q, \end{cases}$$ has two derivatives defined on two different sets. $f|_{\mathbb{Q}}$ has a derivative $1$ on $\mathbb{Q}$. On the other hand $f|_{\mathbb{R}-\mathbb{Q}}$ has a derivative of $0$ on $\mathbb{R}-\mathbb{Q}$. Since these values agree nowhere, the function is not differentiable on , $\mathbb{R}$.2012-06-23
  • 2
    @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.)2012-06-23
  • 0
    @BabyDragon I don't think I understand what you're trying to say. Consider $g(x) = x^2$. The derivative of every point in $g|_\mathbb Q$ is rational, and the derivative of every point in $g|_{\mathbb R \setminus \mathbb Q}$ is irrational, so they agree nowhere, but the function is differentiable everywhere...?2012-06-23
  • 0
    @LeonidKovalev Yes, that's what I'm picturing right now. And I guess that's what scares me: gluing up two everywhere-differentiable functions gives a nowhere-differentiable one? Should this bother me/anyone?2012-06-23
  • 11
    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.2012-06-23
  • 0
    @Leonid You are correct, these are three different functions. I was being a bit sloppy with my language when I said "I think your function... has two different derivatives on two different sets".2012-06-23
  • 0
    @Chester Consider the function $$g(x) = \begin{cases} x^2, & x \in \mathbb Q, \\ 0, & x \notin \mathbb Q, \end{cases}$$. The derivative of $g$ on $\mathbb{Q}$ is $2x$, and on $\mathbb{R}-\mathbb{Q}$ the deriviative of of $g$ is zero. Thus the values "match" at zero in the sense that the function which we shall call $g'$ (the one cobbled together by the derivatives on the two different set) is continuous at zero. So, one might conjecture that the function $g$ is differentiable at zero when $g$ is defined on $\mathbb{R}$.2012-06-23
  • 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$ .2012-06-23
  • 2
    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...2012-06-23
  • 0
    @chester The definition of derivative you gave is just the definition I learned at the university ;-)2012-06-23
  • 4
    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*]2012-06-24

5 Answers 5