0

Let $h:\mathbb R\to\mathbb R$ be differentiable. Noting that $\operatorname{sgn}$ is differentiable on $\mathbb R\setminus\left\{0\right\}$ with derivative equal to $0$, we can conclude that $\operatorname{sgn}h$ is differentiable on $\left\{h\ne0\right\}$ with derivative equal to $0$.

Can we even show differentiability of $\operatorname{sgn}h$ on a larger set than $\left\{h\ne0\right\}$?

For example, $|h|$ is differentiable on $\left\{h\ne0\right\}$ with derivative $h'\operatorname{sgn}h$, but we are even able to show differentiability on $\left\{h'=0\right\}$ with the same derivative (which is actually $0$ on that subset). Can we show something similar for $\operatorname{sgn}h$?

0xbadf00d
  • 13,422
  • $\mathrm{sgn} (h)$ is clearly differentiable at every point in the interior of ${h = 0}$, since there is a neighborhood of each of those points where it is constant. – eyeballfrog Jun 30 '19 at 06:29

1 Answers1

3

Let's investigate this for an arbitrary function $h: \Bbb R \to \Bbb R$, not necessarily differentiable or continuous.

If $\operatorname{sgn}(h(x))$ is differentiable at $x_0$ then it is continuous, and therefore (as an integer-valued function) constant in a neighborhood of $x_0$. It follows that $$ \tag{*} \text{$h(x) < 0$ in a neighborhood of $x_0$} \\ \text{or $h(x) = 0$ in a neighborhood of $x_0$} \\ \text{or $h(x) > 0$ in a neighborhood of $x_0$} \, . $$

Conversely, if $(*)$ is satisfied at $x_0$ then $\operatorname{sgn}(h(x))$ is constant in a neighborhood of $x_0$, so that $\operatorname{sgn}(h(x))$ is differentiable at $x_0$.

So we have shown that $\operatorname{sgn}(h(x))$ is differentiable exactly at all points of the set $$ \{ x : h(x) < 0 \}^0 \cup \{ x: h(x) = 0 \}^0 \cup \{ x: h(x) > 0 \}^0 $$ (where $A^0$ denotes the interior of the set $A$), and the derivative at all those points is zero.

If $h$ is continuous then this set is equal to $$ \{ x : h(x) \ne 0 \} \cup \{ x: h(x) = 0 \}^0 $$

Martin R
  • 113,040
  • Not quite clear "$\operatorname{sgn}h$ constant $\implies$ $h\equiv 0$". E.g. for $h(x)=x^2$ it is possible to define $g(x)=\operatorname{sgn}h(x)$ at $x=0$ so that it becomes differentiable, however $h\not\equiv 0$. – A.Γ. Jun 30 '19 at 06:54
  • @A.Γ.: Which part is unclear? $\operatorname{sgn}(h(x))$ is an integer-valued function. If it is differentiable (and thus continuous) at a point $x_0$ then it is necessarily constant in a neighborhood of $x_0$. – I don't understand your counter-example: $\operatorname{sgn}(x^2)$ is not differentiable at $x=0$. – Martin R Jun 30 '19 at 07:06
  • I mean that this "non-differentiability" is easy to fix by removing the singularity in some cases (e.g. if $h\ge 0$), which is a kind of very natural way to go if one wants to expand the differentiability region. Sure it is a trivial example, but the whole situation is not that stiff, there is a gap to play with. – A.Γ. Jun 30 '19 at 07:10
  • @A.Γ.: The question (as I understand it) was where – for a given function $h$ – the function $\operatorname{sign}(h(x))$ is differentiable, and not how it can be “made differentiable.” Please let me know if anything in my answer is wrong or unclear. – Martin R Jun 30 '19 at 07:15
  • This also works without the condition that $h$ is differentiable. If $h$ is just continuous, your result still stands. If $h$ is general, the function $\operatorname{sgn} \circ h$ will still be constant in a neighborhood of a point $x_0$ in the interior of ${x \mid h(x)=0 }$. And similar for an interior point of ${x \mid h(x)>0 }$ or of ${x \mid h(x)<0 }$ (these latter sets are no longer automatically open sets). – Jeppe Stig Nielsen Jun 30 '19 at 07:46
  • @JeppeStigNielsen: Yes, thanks – I was already in the process of writing that :) – Martin R Jun 30 '19 at 07:47
  • Your first set after "at all points of the set" should be $\left{h<0\right}^\circ$, not $\left{h\ne0\right}^\circ$, right? – 0xbadf00d Jun 30 '19 at 08:18
  • @0xbadf00d: Indeed, that was a copy/paste error from the previous version of the answer. – Martin R Jun 30 '19 at 08:22
  • Thank you very much for your answer. Maybe you can fix the error in the question. So, can we conclude that, if h is twice differentiable that $|h|$ is twice differentiable precisely on ${h\ne0}\cup{h=0}^\circ\cap{h'=0}$ (using that $|h|$ is differentiable on ${h=0}\cap{h'=0}$ with derivative $h'\operatorname{sgn}h$)? It should be twice differentiable at least on that set by the chain rule and your result, but I'm not sure if we can improve on that or not. – 0xbadf00d Jun 30 '19 at 13:04
  • I've asked for that here: https://math.stackexchange.com/q/3278974/47771 – 0xbadf00d Jun 30 '19 at 18:48