For any $n \geq 1$, does there exist a real function which has $n$ continuous derivatives everywhere but which has $n+1$ derivatives nowhere? Does there exist a real function which has $n$ derivatives everywhere but where the $n$th derivative is continuous almost nowhere?

I assume this question has been asked already but was unable to find it myself. If it has already been asked, I will remove my question. My guess for the first part of my question is that if you take the $n$th antiderivative of the Weierstrass function, the resulting set of functions will all possess $n$ continuous derivatives everywhere, but will possess $n+1$ derivatives nowhere.

  • 3
    $\begingroup$ That's correct. The FTC ensures these antiderivatives exist as the Weierstrass function is continuous. $\endgroup$
    – FShrike
    Commented Feb 18, 2023 at 16:51
  • $\begingroup$ @FShrike the top response to the link below gives an example of a function which is differentiable everywhere but whose derivative is discontinuous on some fat Cantor set. Would taking successive antiderivatives of this function satisfy the second part of my question in an analogous way? math.stackexchange.com/questions/292275/… $\endgroup$ Commented Feb 18, 2023 at 17:27

1 Answer 1


Let $f\colon\mathbb{R}\to\Bbb{R}$ be arbitrary. Then the set $C_f=\{x\mid f\text{ is continuous at }x\}$ is a $G_\delta$; that is: the intersection of a sequence $(U_n)_{n\in\Bbb{N}}$ of open sets.
On the other hand, a derivative $f$ being a function of first class (i.e. the pointwise limit of a sequence of continuous functions), $C_f$ must be a dense subset of $\Bbb{R}$ (result due to Baire).
Hence for a derivative the set $C_f$ must be a dense $G_\delta$ subset of $\Bbb{R}$.
It happens that the converse is true:

given $A\subset\Bbb{R}$, a dense $G_\delta$, there exists a derivable $F$ such that $C_{F'}=A$.

A proof is given in Andrew Bruckner's Differentiation of real functions (chapter 3).

Now it's possible to construct a dense $G_\delta$ having measure $0$. Consider $(r_k)_{k\in\Bbb{N}}$ an enumeration of $\Bbb{Q}$, and chose some integer $n\geqslant1$.
The set $U_n=\bigcup_{k\geqslant0} \left]r_k-\frac1{n2^k}\mathbin;r_k+\frac1{n2^k}\right[$ is an open set having measure ${}\leqslant\frac4n\cdot$ Also $U_n$ is dense, since $U_n\supset\Bbb{Q}$.
Conclusion: $A=\bigcap_{n\geqslant1}U_n$ is a dense $G_\delta$ having measure $0$.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .