10

As in the title, I was wondering if it is necessarily true that the domain of a function is shared by its derivative.

John Gowers
  • 24,959
T. Golden
  • 161

4 Answers4

12

No, it is enough to take $f(x)=|x|.$

  • 5
    I would argue that the function $f : \mathbb{R}\to\mathbb{R}, x\mapsto|x|$ has no derivative whose domain we could consider. The function $g : \mathbb{R}\setminus{0}\to\mathbb{R}, x\mapsto|x|$ does have a derivative, and its domain is $\mathbb{R}\setminus{0}$ (like with $g$ itself). – leftaroundabout Oct 26 '16 at 21:11
  • 1
    @leftaroundabout: Do you have a reference for saying that $x\mapsto \lvert x\rvert$ has no derivative? – Thomas Oct 26 '16 at 23:55
  • @Thomas: do you have a reference saying it has a derivative? You simply can't decide that if you ask so vaguely, you must always specify the domain before talking about derivatives. To make it more drastic: the function $h : \mathbb{C}\mapsto\mathbb{C}, x\mapsto |x|$ is nowhere differentiable. Differentiability really is a property you need to prove pointwise. If it turns out the function is differentiable everywhere in its domain then fine – you call the resulting function the derivative. This is the case for $g$ but not $f$ or $h$. – leftaroundabout Oct 27 '16 at 00:17
  • 1
    @leftaroundabout This is a question of definitions, but the usual approach I have seen is that for functions that are differentiable almost everywhere we say they have a derivative. Moreover your shift to $h$ is a feint. You didn't change the function domain, you changed the derivative. If you take $h$ restricted to $\mathbb{R}\setminus{0}$ it still won't have a derivative anywhere. – DRF Oct 27 '16 at 04:51
  • 2
    @leftaroundabout: I've never seen a single source using the definition that you propose. The usual convention is the one described for example in Rudin's Principles of Mathematical Analysis, p. 104: “We thus associate with the function $f$ a function $f'$ whose domain is the set of points $x$ at which the limit (2) exists; $f'$ is called the derivative of $f$.” – Hans Lundmark Oct 27 '16 at 07:14
  • And I could give many more examples of standard textbooks which all say the same thing: Spivak, Stromberg, etc. – Hans Lundmark Oct 27 '16 at 07:17
  • 1
    @HansLundmark: Spivak says “It is convenient to define a function $\mathbb{R}^n\to\mathbb{R}^m$ to be differentiable on $A$ if it is differentiable at $a$ for each $a\in A$. If $f: A\to\mathbb{R}^m$, then $f$ is called differentiable if $f$ can be extended to a differentiable function on some open set containing $A$.” How it that the same thing as Rudin's “automatic domain restriction”? – leftaroundabout Oct 27 '16 at 15:00
  • 1
    @DRF if you restrict $h$ to $\mathbb{R}\setminus{0}$ then you can't even attempt to complex differentiate it anymore, because $\mathbb{R}\setminus{0}$ contains no open subsets of $\mathbb{C}$ over which to quantify the limit of the difference quotient. – leftaroundabout Oct 27 '16 at 15:05
  • @leftaroundabout Which is exactly the point I was making you didn't change the domain you changed what it means to differentiate. – DRF Oct 27 '16 at 16:09
  • @DRF: ah, but IMO the domain choice itself changes what it means to differentiate, because it changes the open sets with which you work. – leftaroundabout Oct 27 '16 at 16:39
  • Spivak, Calculus, 3rd edition, p. 149 (right after the definition of derivative for functions of one variable): “In fact, for any function $f$, we denote by $f'$ the function whose domain is the set of all numbers such that $f$ is differentiable at $a$”. – Hans Lundmark Oct 27 '16 at 18:22
  • Stromberg, An Introduction to Classical Real Analysis, p. 172: “[...] the domain of $f'$ is the set of points in $]{a,b}[$ at which all four Dini derivatives are equal to one another”. – Hans Lundmark Oct 27 '16 at 18:25
  • Bartle, The Elements of Real Analysis, p. 207: “Whenever the derivative of $f$ at $c$ exists, we denote its value by $f'(c)$. In this way we obtain a function $f'$ whose domain is a subset of the domain of $f$.” – Hans Lundmark Oct 27 '16 at 18:45
  • @leftaroundabout: I've given some more quotations (forgot to include you as a recipient). – Hans Lundmark Oct 27 '16 at 18:50
  • @HansLundmark hm, interesting what one learns when not skipping real analysis before going to the general case... we physicists never did that. But I just don't see how it's supposed to be helpful to allow the very domain of a derivative to be dependent on the function you differentiate. It certainly leads to complications if you then have effectively just a partial function and need to worry where you can even evaluate it. At any rate, authors do seem less happy with this definition in works that consider multidimensional / manifold differentiation. I think this is for good reasons. – leftaroundabout Oct 27 '16 at 19:50
  • @leftaroundabout: I don't see what the complications are, except that it's a fact of life that some functions are not differentiable everywhere. Any I don't think you will find many physicists who would disagree with the statement that if $f(x)=|x|$, then $f'(x)=1$ if $x>0$ and $f'(x)=-1$ if $x<0$, while $f'(0)$ is undefined. What they (and most calculus textbook authors) are doing then, just by using this notation, is saying implicitly that the domain of the function $f'$ is $\mathbf{R}\setminus{0}$. – Hans Lundmark Oct 28 '16 at 07:10
  • @leftaroundabout: (cont.) What would really be awkward (and this is what you propose, if I understand you correctly) is to have to change the domain of $f(x)=|x|$, so that $f(0)$ becomes undefined, before you even allow yourself to use the notation $f'(2)$! – Hans Lundmark Oct 28 '16 at 07:11
  • @leftaroundabout: And I also see no real difference in the multivariable case (or the case of manifolds): the domain of each partial derivative consists of the points where it exists, and the domain of the differential $df$ (as a function sending $x$ to a linear map between tangent spaces) consists of all points $x$ where $f$ is differentiable. The passage that you quoted from Spivak has absolutely nothing to do with this, since it only serves to define what the phrase “differentiable on a set” means. – Hans Lundmark Oct 28 '16 at 07:18
  • @HansLundmark The complication is that it becomes very awkward to describe what sort of mapping $'$ is supposed to be. If you require diffentiability on all the domain, it's simply $(\mathbb{R}\to\mathbb{R})\to(\mathbb{R}\to\mathbb{R})$. Otherwise it's something like $(\mathbb{R}\to\mathbb{R})\to({x\in\mathbb{R}:\forall\varepsilon>0\exists\delta:...}\to\mathbb{R})$. This isn't very practical in theorems, thus you then more often than not need to be explicit: “a function $A\to\mathbb{R}$ that's differentiable on all $A$”, rather than just “a function $f:A\to\mathbb{R}$ with derivative $f'$”. – leftaroundabout Oct 28 '16 at 08:01
  • Alright, I suppose mine is more of a (static, non-dependenty-typed) programmer's attitude. Physicists per se have more of a tendency to assume everything is infinitely differentiable everywhere. They certainly do consider derivatives of absolute value functions, but yes, zero is generally excluded up front in these cases, if just because the absolute value typically appears in the denominator. The function $\Phi(x) = 1/|x-x_0|$ is naturally itself only defined for $x\neq x_0$, but differentiable on all its domain. – leftaroundabout Oct 28 '16 at 08:07
  • And for multivariable case – you say the domain of each partial derivative. I suppose the domain of the differential is then the intersection of the partial derivatives' domains. Now that's really ugly because it fixes you completely to a given basis description. Or how do you intent to formulate invariance of the intersection operation under basis transformations? – leftaroundabout Oct 28 '16 at 08:17
  • @leftaroundabout: No, it's not that simple, since differentiability is a much stronger requirement than just existence of all partials. But yes, partial derivatives by definition depend on the chosen coordinate system, so forget about them if you like (they're not essential for the point I'm trying to make). – Hans Lundmark Oct 28 '16 at 09:40
  • I think the phrase “non-dependently typed” captures very well what's bugging you here. But there are many examples of similar definitions in mathematics which are hard to capture in a language like Haskell, for instance. (And it's bugging me too, whenever I try to do that!) – Hans Lundmark Oct 28 '16 at 09:43
9

No.

Take for instance $f(x)=\sqrt x$.

The domain of $f$ is $\mathbb R_+$.

But $f'(x)=\frac 1{2\sqrt x}$ which has $\mathbb R_+^*$ for domain.

E. Joseph
  • 14,843
  • This answer doesn't seem correct. The function $f(x)=\sqrt x$ is not differentiable at $0$, thus the domain of $f'(x)$ is also $\mathbb R_+$ – Saul Berardo Dec 08 '21 at 18:50
4

Yes or no, depending on how you view it.

The usual approach in mathematics is to say that if $E$ is a subset of the real line $\mathbb R$ then the domain of a function $f\colon E\to \mathbb R$ is the set $E$. Then the derivative of $f$ is only defined if $f$ is differentiable at every point in $E$. In that case, we can define the derivative $f'\colon E\to\mathbb R$. Clearly, the domain of $f'$ is $E$ also.

There are functions $f\colon E\to \mathbb R$ that are not differentiable at every point in $E$ - the function $f(x)=|x|$ is an example. Technically, such a function has no derivative, so it does not make sense to talk about the domain of its derivative.

The definition of domain used in schools is different and a bit less precise. Normally, we have some formula and we say that its domain is the largest set of real numbers such that this formula makes sense, according to various rules (e.g., $1/x$ does not make sense if $x=0$, $\sqrt x$ does not make sense if $x<0$ and so on). According to this definition of domain, the $f(x)=\sqrt x$ example given by E. Joseph is a good example of a function whose derivative has a smaller domain than that of the original function.

I don't know if $f(x)=|x|$ counts as an example since its derivative is not given by an explicit formula obtained by applying the rules for differentiation.

John Gowers
  • 24,959
  • I don't know what to make of your final paragraph. The derivative of the absolute value function can be written $|x|/x$. Is that not an "explicit formula"? What counts as a "rule of differentiation"? Why shouldn't this? – symplectomorphic Oct 27 '16 at 06:46
  • 1
    @symplectomorphic The point is that the definition of the 'domain' of a function as normally given in schools is imprecise anyway. We are taught that the 'domain' of $1/x$ is $\mathbb R\setminus{0}$, that the domain of $\sqrt{x}$ is $[0,\infty)$ and that $\DeclareMathOperator{\dom}{dom} \dom(f\circ g)=\dom g\cap g^{-1}(\dom f)$. From these rules, we can work out the domain of functions like $1/(\sqrt{x-3})$, but it is not obvious how to extend this definition to other functions. At the same time, we learn the derivatives of $\sin,\cos,\exp$,polynomials etc. and rules like additivity, the – John Gowers Oct 27 '16 at 09:36
  • chain rule, the product rule and so on that allow us to differentiate any function that is formed by multiplying and adding together compositions of the functions that we already know how to differentiate. It's not obvious to me where a function like $|x|$ (or its 'derivative') fits into this scheme. The derivative has to be computed 'by hand', to an extent, and I don't see how it follows that we should interpret the 'domain' of the derivative $f'$ of a function $f$ to be the set of all points where $f$ is differentiable. – John Gowers Oct 27 '16 at 09:39
  • That's part of the usual definition of the function $f'$; see my comments to Motyla...'s answer for references. – Hans Lundmark Oct 27 '16 at 14:22
4

A more extreme example: the Weierstrass function $$f(x) = \sum_{n=1}^{\infty}a^n\cos(b^n\pi x)$$ ($0<a<1$, $b$ positive odd integer, $ab > 1 + 3\pi/2$)

has $$\text{dom}(f) = \Bbb R,\qquad\text{dom}(f') = \emptyset.$$