Derivative of $\mbox{sgn}$ I get a different result than the book I'm reading for the derivative of the sign function.
Let's define the sign function, $x \mapsto \mbox{sgn}(x)$, as
$$ \mbox{sgn} (x) =  \begin{cases} 
      1 & x > 0 \\
     -1 & x < 0 \\
   \end{cases}$$
Let $u(x)$ be the Heaviside step and $\delta(x)$ be the Dirac delta. By definition, $u'(x) = \delta(x)$ and $\delta(-x) = \delta(x)$. I can rewrite $\mbox{sgn}(x) = u(t) - u(-t)$. Differentiating, we get
$$\mbox{sgn}'(x) = u'(x) - u'(-x)$$
So far the book and I agree. Here is where we disagree. I then proceed to say
$$\mbox{sgn}'(x) = \delta(x) - \delta(-x) = 0$$
whereas the book says
$$\mbox{sgn}'(x) = \delta(x) - [-\delta(x)] = 2 \delta(t)$$
This implies that $u'(-t) = -\delta(t)$ which I don't agree with.
 A: When you differentiate a complex function, you should multiply by the derivative of the internal function. In other words:
$$
\frac d{dt}u(-t) = u'(-t)\frac{d(-t)}{dt} = -u'(-t)
$$
A: There are few issues with your computation
First, $\delta$ is not a function, it is the distribution
$$
\delta(f)=f(0) \,.
$$
It indeed satisfies
$$
\delta \circ I = \delta
$$
where $I(x)=-x$ is the reflection.
Next, you can indeed write
$$
\mbox{sgn}(x)=u(x)-u(-x) 
$$
[be carefull with the variable]. Note here that by the chain rule
$$
\left( u(-x) \right)'=u'(-x) (-x)'=(\delta \circ I )(-1)=-\delta
$$
This is the part you do not agree with, but this is correct. You forgot to apply the chain rule here.
If you want to see this properly, note that as a distribution, the derivative of $u(-t)=u\circ I$ is
$$
(u \circ I)'(f)=(u \circ I)(f') =\int_{\mathbb R} f'(t) u(-t) d t = \int_{-\infty}^0 f'(t) d t = [f(t)]_\infty^0 =f(0)= \delta(f) \,.
$$
Theerfore
$$
\left(\mbox{sgn}(x)\right)'=\delta - (- \delta)=2 \delta  
$$
which is the correct answer.
