9

Let $h:\mathbb R\to\mathbb R$ be differentiable. It can be shown that $$N:=\left\{a\in\mathbb R:h(a)=0\text{ and }h'(a)\ne0\right\}$$ is countable and $|h|$ is differentiable on $\mathbb R\setminus N$ with $$|h|'(a)=\begin{cases}\displaystyle\frac{h(a)}{\left|h(a)\right|}h'(a)&\text{, if }h(a)\ne0\\0&\text{, if }h'(a)=0\end{cases}\tag1$$ for all $a\in\mathbb R$.

Assuming $h$ is twice differentiable, can we show a similar statement for the second derivative of $|h|$, i.e. that there is a countable $N'\subseteq\mathbb R$ such that $|h|$ is twice differentiable on $\mathbb R\setminus N'$?

EDIT: It would be enough for me, if $N'$ can be shown to have Lebesgue measure $0$ (as opposed to being even countable). Moreover, if necessary, feel free to assume that $h''$ is continuous.

EDIT 2: We already know that $|h|$ is differentiable at $a$ with $$|h|'(a)=\operatorname{sgn}(h(a))h'(a)\tag5$$ for all $a\in\left\{h\ne0\right\}\cup\left\{h'=0\right\}$. Now, since $h$ is continuous, $\operatorname{sgn}h$ is differentiable at $a$ with $$(\operatorname{sgn}h)'(a)=0\tag6$$ for all $a\in\left\{h\ne0\right\}\cup\left\{h=0\right\}^\circ$ (see: Can we show differentiability of $\operatorname{sgn}h$ on a larger set than $\left\{h\ne0\right\}$?). Thus, by the chain rule, $|h|$ is twice differentiable at $a$ with $$|h|''(a)=\operatorname{sgn}(h(a))h''(a)\tag7$$ for all $a\in\left\{h\ne0\right\}\cup\left\{h=0\right\}^\circ\cap\left\{h'=0\right\}$. The complement of the latter set is $$N_0:=\left\{h=0\right\}\cap\left(\mathbb R\setminus\left\{h=0\right\}^\circ\cup\left\{h'\ne0\right\}\right)=\partial\left\{h=0\right\}\cup N.$$ However, since $\partial\left\{h=0\right\}$ doesn't need to have Lebesgue measure $0$ (please correct me if I'm wrong), we cannot conclude.

(Please take note of my related question: if $h$ is twice differentiable, what is the largest set on which $|h|$ is twice differentiable?.)

0xbadf00d
  • 13,422

2 Answers2

4

Let us assume $h$ twice differentiable.

Let $N$ be the set of isolated zeros of $h$. $|h|$ is differentiable on $\mathbb{R}\backslash N$, and $|h|'(x) = sgn(h(x)) h'(x)$ where the sgn function is $0$ on $0$, $1$ on the positive reals and $-1$ and the negative ones.

Let $x_0 \in \mathbb{R}\backslash N$. For $x \in \mathbb{R} \backslash N$,

$|h|'(x) - |h|'(x_0) = sgn(h(x)) h'(x) - sgn(h(x_0)) h'(x_0)$

Let us show that Newton's difference quotient has always a limit when $x\rightarrow x_0$, $x\in \mathbb{R}\backslash N$ (this is not rigorously equivalent to say that $|h|'$ is differentiable at $x_0$ since $\mathbb{R} \backslash N$ does not necessarily contain an open interval centered at $x_0$)

I will distinguish several cases.

  • $h(x_0) \neq 0$. Then $h(x)$ has the same sign as $h(x_0)$ when $x$ close enough to $x_0$ and it is clear that the Newton's difference quotient converges to $sgn(h(x_0)) h''(x_0)$. Here, $|h|'$ is even rigorously differentiable at $x_0$.
  • $h(x_0) = 0$ (so $h'(x_0) = 0$) and $h$ is of constant sign (in a large sense) near $x_0$, it is essentially the same situation.
  • $h(x_0)=0$ (so $h'(x_0) = 0$) and $h$ has strict changes of sign in each interval centered at $x_0$. Then $h''(x_0) = 0$ (else, $h$ would have a local extrema at $x_0$, which contradicts the changes of sign). So we have a LD at order $1$ for $h'$ at $x_0$ : $h'(x) = o( x-x_0)$ So $|h|'(x) - |h|'(x_0) = sgn(h(x))h'(x) = o(x-x_0)$. So the Newton's difference quotient admits a limit, which is $0$ (but $|h|'$ is not rigorously differentiable as soon as $x$ in not the interior of $\mathbb{R} \backslash N$, i.e exactly when infinitely many sign changes of $h$ are made with non zeros first derivatives).

Note that $|h|''(x) = sgn(h(x)) h''(x)$.

Conlusion : Let $N' = (\overline{N} \cap \{h'(x_0) = 0, h \text{ has infinite strict changes of sign near } x_0 \text{ with non zeros first derivatives}\}) \cup N$. Let $|h|'$ is rigorously differentiable exactly on $\mathbb{R} \backslash N'$, but the Newton's difference quotients converges for all $x_0 \in \mathbb{R} \backslash N$. But there might be some real philosophical problem : the fact that the Newton's difference converges does not corresponds intuitively to the idea of differentiability (it ignores the "jumps" that can exists in the holes of the domain of definition, and is not compatible with LD of order $\geq 2$, see the counter example I give in About a $C^\infty$ extension of a function defined on a closed set (or a $C^\infty$- version of Tietze's extension theorem) ).

To understand better the situation, the following question should be raised : where is the singular loci of $|h|''$, interpreted as a distribution ? And what are the nature of the different singularities ?

Remark : it is possible to check that $\overline{N}$ can contain an arbitrary Cantor set contained in $\mathbb{R}$ (it's a bit technical, because of the intricated structure of the cantor set : the difficult part is to ensure that $h$ is two times differentiable). So it might be of positive measure... It is quite easy to ensure that $N' = \overline{N}$ in this case : just put non zero derivatives on all isolated zeros of $h$. The demonstration is a bit technical, so please tell me if it is necessary to make it.

EDIT : I've made several edits for the notations of this response ; don't pay attention too much attention of the notations in the commentaries.

Dlem
  • 888
  • 4
  • 9
  • If you suppose $h(x)=0$, then (since $x\not\in N$) $h'(x)=0$. That's clear to me. But why $x$ is an accumulation point of $h^{-1}(\left{0\right})$? – 0xbadf00d May 02 '19 at 05:13
  • It seems like you're concluding $h''(x)=0$ from $h(x)=h'(x)=0$. This is obviously wrong (take for example $h(x)=x^2$ and $x=0$). – 0xbadf00d May 02 '19 at 06:09
  • By construction, $N$ is the set of the isolated zeros of $h$. So, the other zeros are the accumulations points of the zeros. By Rolle theorem, if $x$ is an accumululation point of the zeros of $h$, it is also an accumulation point of $h'$. By applying it a second time, it is the same for $h''$. This implies $h'(x) = h''(x) = 0$ ; you have also $|h|'(x) = 0$ (already known). I deduce from all this that $|h|''(x) = 0$ : you have a linear developpement of $|h|'(x) = o( (x-y) )$ at order 1. So $|h|''$ exists at $x$ and is $0$ – Dlem May 02 '19 at 08:19
  • Ok I understand, I mixed the notations with the link you've given. I've taken $N'$ = the set of isolated zeros of $h$. My $N'$ can be a little bigger than $N$, but it is still countable. – Dlem May 02 '19 at 08:35
  • To be precise, your $N$ is $\left{x\in\mathbb R\mid\exists\varepsilon>0:B_\varepsilon(x)\cap h^{-1}(\left{0\right})=\left{x\right}\right}$, right? – 0xbadf00d May 02 '19 at 09:02
  • Not exactly : $N = {x \in h^{-1}(0), \exists \epsilon > 0 : B_{\epsilon}(x) \cap h^{-1}({0}) = {x} }$ – Dlem May 02 '19 at 09:05
  • Ehm, if $B_\varepsilon(x)\cap h^{-1}(\left{0\right})=\left{x\right}$, then clearly $x\in h^{-1}(\left{0\right})$. – 0xbadf00d May 02 '19 at 09:12
  • I've got two remaining questions: (a) While a discrete subset of $\mathbb R$ (equipped with the Euclidean topology) is countable, it shouldn't not follow that it is closed ($\left{\frac1n:n\in\mathbb N\right}$ is a counterexample, since $0$ does belong to the closure but not to the set itself). So, it's not clear to me how you conclude that $\mathbb R\setminus N'$ ($N'$ being your $N$; but since I've already used $N$ in the question I would like to call your set $N'$) is open. – 0xbadf00d May 02 '19 at 19:13
  • (b) The latter is important, since we need that $|h|'$ is defined in a neighborhood of the point $x∈ℝ$ at which we would like to show that it is differentiable. Assuming $x∈{h=0}\setminus N'$, it's clear that $h'(x)=0$ and that $x$ is an accumulation point of ${h''=0}$. By openness of $ℝ\setminus N'$, there is a $δ>0$ with $$B_δ(x)⊆ℝ\setminus N'⊆ℝ\setminus N\tag5$$ and we already know that $$|h|'(y)=\text{sgn}(h(y))h'(y);;;\text{for all }y∈ℝ\setminus N.\tag6$$ This yields that $$\left|\frac{|h|'(x+t)-|h|'(x)}t\right|=\left|\frac{h'(x+t)}t\right|;;;\text{for all }0<|t|<δ\tag7$$ – 0xbadf00d May 02 '19 at 19:14
  • We need that the right-hand side tends to $0$ as $t\to0$. Since $h'(x)=0$, this would be the case, if $h''(x)=0$. And actually, you wrote that we've got $h''(x)=0$. But I doubt that this is true. We only know that $x$ is an accumulation point of $\left{h''=0\right}$. It seems like you're assuming that $\left{h''=0\right}$ is closed, but that doesn't need to be the case, since $h''$ is not assumed to be continuous. So, am I missing something or do we need to assume that $h$ is twice continuously differentiable? – 0xbadf00d May 02 '19 at 19:18
  • Yes, I am sorry for that, my reasoning works for $\overline{N'}$ and not for $N'$... $N'$ can be any discete set, so $\overline{N'}$ can be big. If you refuse to define derivatives of a function which is not defined on a open set, you cannot reduce $\overline{N'}$ : $f$ is exactly differentiable twice on $\mathbf{R}\backslash \overline{N'}$, it is not improvable.. – Dlem May 02 '19 at 20:57
  • If you try to define "differentials" on non open sets (just taking the limit of the Newton's difference quotients)... My demonstration does not work. The Rolle theorem doesn't work here since there can be holes on each interval centered at a $x$. I'm thinking of what I can do – Dlem May 02 '19 at 20:57
  • Hm, is the situation in the other question somehow special and allows the desired conclusion? – 0xbadf00d May 03 '19 at 06:10
  • See also this thesis, page 122/133 in the thesis/PDF numbering. – 0xbadf00d May 03 '19 at 06:24
  • I've observed that in the thesis, $h'$ is Lipschitz continuous. Is this of any use? – 0xbadf00d May 03 '19 at 11:51
  • I've made an edit of my answer. The answer is : if you try to diffentiate 2 times just a function, you obtain two times diffentiability just on $\mathbb{R}\backslash N'$, where $N'$ can be as large as the adherence set of isolated $0$ of $f$. $N'$ can contain a fixed Cantor set. It is even possible to construct $N'$ such that $\mathbb{R}\backslash \overline{N'}$ is of measure $< \epsilon$. It is not easy to see if it is a real problem philosophically.The following question should be raised : what happens if we differentiate in the sense of distributions? Where are the singularities? – Dlem May 03 '19 at 12:22
  • I'm not sure what you're saying. We cannot show that $\overline N$ ($N$ being the isolated zeros of $h$) has measure $0$ or did I get you wrong? Does the situation change, if $h'$ is Lipschitz continuous (and hence absolutely continuous)? This might be related to Theorem 3.60 here: https://www.math.ucdavis.edu/~hunter/pdes/ch3A.pdf. – 0xbadf00d May 03 '19 at 12:28
  • Exactly : $\overline{N}$ can be of measure > 0. More precisely, it can contains this set : https://en.wikipedia.org/wiki/Smith%E2%80%93Volterra%E2%80%93Cantor_set . If you put such set $K_n$ in each $[n,n+1]$ where $n\in \mathbb{N}$, $\overline{N}$ can also contain the union of $K_n$. For the Lipschitz continuity... $|h|'$ is not Lipschitz continuous on the "holes" (it moves abruptly from a strictly positive number to a stricly negative one). – Dlem May 03 '19 at 13:22
  • With $N$ as defined in the question, we may note that $\overline N\subseteq\partial{h=0}$. So, it would be sufficient to show that $\partial{h=0}$ is a null set. Is this possible (under mild additional assumptions)? – 0xbadf00d May 08 '19 at 07:10
  • Could you take a look at this answer on mathoverflow? I honestly cannot follow the argumentation (at least for the moment). Does it help to solve the problem of this question (at least for the special case of $h$ described in the other question?) – 0xbadf00d May 13 '19 at 15:31
  • I'm sorry, I lost sight of this question. Since I'm interested in ordinary differentiability only, the previous version of your answer was more helpful. You've said (in a comment above) that $|h|$ is differentiable precisely on $\mathbb R\setminus\overline{N'}$, where $N'$ denotes the set of isolated points of ${h=0}$. But if we apply the chain rule to the result that $|h|$ is differentiable on ${h\ne0}\cup{h'=0}$ with derivative $h'\text{sgn}h$, we obtain that $|h|$ is twice differentiable on ${h\ne0}\cup{h=0}^\circ\cap{h'=0}$ with derivative $h''\text{sgn}h$. – 0xbadf00d Jun 30 '19 at 13:02
  • I'm struggling to see whether this set is smaller or larger than $\mathbb R\setminus\overline{N'}$ (and hence whether the result I've mentioned is weaker or stronger than yours). I've asked for that here: I've asked for that here: https://math.stackexchange.com/q/3278974/47771 – 0xbadf00d Jun 30 '19 at 18:49
2

Suppose that $h$ is twice differentiable. Note that you already know that $\bigl||h|'(x)\bigr|=|h'(x)|$ for $x\notin N:=\{\,x\in \Bbb R\mid h(x)=0,h'(x)\ne 0\,\}$ (and that $N$ is countable).

Suppose $h(a)=h'(a)=0$, $h''(a)=c>0$. Then we have a local minimum at $a$, hence $h(x)\ge0$ on some interval $(a-\epsilon,a+\epsilon)$ and hence $|h|=h$ and $|h|''=h''$ there. Similarly, $|h|''(a)=-h''(a)=|h''(a)|$ if $c<0$. If $c=0$ and additionally $a\notin \overline N$, then we already know $|h|'(a)=0$ and have that $$\tag1\lim_{t\to0}\left|\frac{|h|'(a+t)-|h|'(a)|}{t}\right|=\lim_{t\to 0}\left|\frac{|h|'(a+t)}{t}\right|= \lim_{t\to 0}\left|\frac{h'(a+t)}{t}\right|=0$$ because $\lim_{t\to 0}\frac{h'(a+t)}{t}=h''(a)=0$ and we conclude that also $|h|''(a)=0$.

We conclude that $|h|''(a)$ can only fail to exist under some limited conditions, namely for $a\in N$ and for those $a\in\overline N$ where $h''(a)=0$ (and additionally $h(a)=h'(a)=0$). Specifically, let $$N_2=(\overline N\cap \{\,x\in\Bbb R\mid h(x)=h'(x)=h''(x)=0\,\})\cup N.$$ Let $x\in\Bbb R\setminus N_2$. Then one of the following cases treated above applies:

  • $h(x)\ne 0$ $\quad\implies\quad|h|''(x)=\operatorname{sgn}(h(x))h''(x)$,
  • or $h(x)=h'(x)=0$ and $h''(x)\ne 0$ $\quad\implies\quad|h|''(x)=|h''(x)|$,
  • or $h(x)=h'(x)=h''(x)=0$, but $x\notin \overline N$ $\quad\implies\quad|h|''(x)=0$.

Note that we cannot say that $N_2$ is countable (or can we?), but at least it is nowhere dense ...


Can $|h|''$ exist for any point $a\in N_2$? Certainly not for $a\in N$ as then not even $h'(a)$ exists: From $h(a)=0$ it follows that $\frac{|h|(x)-|h|(a)}{x-a}=\pm\frac{h(x)-h(a)}{x-a}$, so at most $|h|'(a)=\pm h'(a)$ is possible, but on the other hand $|h|$ has a local minimum at $a$. So what about $a$ with $h(a)=h'(a)=h''(a)=0$ and there is a sequence $a_n\to a$ with $h(a_n)=0$, $h'(a_n)\ne 0$? Then as just said, $|h|'(a_n)$ does not exist. Hence there is no open neighbourhood of $a$ where $|h|'$ is defined. Hence the ordinariy definition of derivative is not applicable.

At best, a one-sided derivative of $|h|'$ can exist. In that case, we can just write $t\to 0^+$ or $t\to 0^-$ in $(1)$ and still obtain the (one-sided) derivative $|h|''(a)=0$. But keep in mind that even this is valid only if $a$ is only a one-sided limit of points in $N$, that is, we must have that one of $[a,a+\epsilon)$, $(a-\epsilon,a]$ is disjoint from $N$.

  • Could you elaborate on $|h|'(x)=|h'(x)|$ for all $x\not\in N$? You seem to assume that $h(x)$ and $h'(x)$ have the same sign. – 0xbadf00d May 01 '19 at 18:19
  • @0xbadf00d Sorry, there was yet another absolute value missing. – Hagen von Eitzen May 01 '19 at 18:36
  • Ah, okay. Thought I would miss something. – 0xbadf00d May 01 '19 at 18:38
  • If we apply the chain rule to the result that $|h|$ is differentiable on ${h=0}\cap{h'=0}$ with derivative $h'\operatorname{sgn}h$, we obtain that $|h|$ is twice differentiable on ${h\ne0}\cup{h=0}^\circ\cap{h'=0}$ with derivative $h''\operatorname{sgn}h$. Is this stronger or weaker than your result? – 0xbadf00d Jun 30 '19 at 13:02
  • Oh, and I can't follow your reasoning for the definition of $N_2$. You've shown that $|h|'$ is differentiable at $a$ with $|h|''(a)=|h''(a)|$ for all $a\in D:={h=0}\cap{h'=0}\cap({h''\ne0}\cup{h''=0}\cap\mathbb R\setminus\overline N)$. The complement of this set is $\mathbb R\setminus D={h\ne0}\cup{h'\ne0}\cup({h''=0}\cap\overline N)$ which is not equal to $N_2$. What am I missing? – 0xbadf00d Jun 30 '19 at 15:32
  • Thank you for your edit, but it's still not clear to me why you define $N_2$ in the way you are defining it. Your answer shows that $|h|$ is twice differentiable on $D$ ($D$ as defined in my previous comment). On the other hand, we already know that $|h|$ is differentiable on $D':={h\ne0}\cup{h=0}^\circ$. So, shouldn't you define $N_2$ to be $\mathbb R\setminus(D\cup D')$? – 0xbadf00d Jul 01 '19 at 11:48
  • @0xbadf00d $|h|$ is differentiable not only on ${h\ne0}\cup{h=0}^o$. E.g., for $h(x)=\max{x^3,0}$, we have ${h\ne0}\cup{h=0}^o=\Bbb R\setminus{0}$, but $h'$ (and $h''$, and $|h|'$ and $|h|''$) exist on all of $\Bbb R$. "My" $N_2$ is correctly empty for this case. – Hagen von Eitzen Jul 01 '19 at 13:20
  • Sorry, that's a typo. I've meant twice differentiable on $D'$. – 0xbadf00d Jul 01 '19 at 13:23
  • I guess it's trivial, but I'm really struggling to follow. Let $U$ denote the maximal set on which $|h|$ is twice differentiable. Clearly, $U\subseteq\mathbb R\setminus N$. Now let $a\in\mathbb R\setminus N$. You've shown that if $h'(a)=h(a)=0$ and either $h''(a)=0$ and $a\not\in\overline N$ or $h''(a)\ne0$, then $a\in U$. But there are several cases remaining: (a) $h(a)\ne0$ (this case is treated by my comment above, since then $a\in D'$) (b) $h'(a)=h(a)=h''(a)=0$ and $a\in\overline N$ (c) $h'(a)=0$ and $h(a)\ne0$ (again, $a\in D'$ in this case). – 0xbadf00d Jul 01 '19 at 14:34
  • So, the only thing left is case (b). Or do you rule this case out by noting that $\mathbb R\setminus\overline N$ is the largest open set on which $|h|'$ is well-defined? In any case, it's still not clear to me whether $\mathbb R\setminus N_2$ is larger than ${h\ne0}\cup{h=0}^\circ$ (on which $|h|$ is twice differentiable). – 0xbadf00d Jul 01 '19 at 14:49
  • So it would appear that the answer is no: $\overline N$ can have positive measure, and at each $x\in \overline N$ there is no open neighborhood of $x$ in which $|f|'$ exists throughout the neighborhood. So we can't even get off the ground for $|f|''$ at such points. Correct? – zhw. Jul 03 '19 at 20:20