# Is the domain of a function necessarily the same as that of its derivative? [closed]

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

## closed as off-topic by user21820, mrtaurho, NCh, Paul Frost, Adrian KeisterApr 15 at 13:59

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – user21820, mrtaurho, NCh, Paul Frost, Adrian Keister
If this question can be reworded to fit the rules in the help center, please edit the question.

• No, it is not. Many examples available, one of them is $y=|x|$. Domain is all real numbers, but it is not differentiable at zero... – imranfat Oct 26 '16 at 15:41
• The Dirichlet function is always a favorite example when talking about limits, derivatives, and continuity – Nayuki Oct 26 '16 at 19:34

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

• 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
• @leftaroundabout: Do you have a reference for saying that $x\mapsto \lvert x\rvert$ has no derivative? – Thomas Oct 26 '16 at 23:55
• @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 4:51
• @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 7:14
• @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

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.

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.

• 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 6:46
• @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 9: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 9: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

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.$$