# Definition of Derivative for $sgn(x)$

When using the definition of the second derivative for $sgn(x)$, I'm a little confused on evaluating something like $sgn(x+h)$. Since $h\rightarrow 0$ does that mean that I should treating $sgn(x+h)$ as $1$ when x is positive, or should I treat it as a $sgn(y)$ centered at $y=x+h$? I thought originally in order to evaluate something like $\frac{f(x-h)-2(x)+f(x+h)}{h^2}$ I would need to break up my evaluation over $x \lt -h, x \gt h, ...$ etc, but I think I got the wrong answer that way.

## 1 Answer

Compute the first derivative of $\mathop{sgn}(x)$ first, then see how it goes.

If $x > 0$, for any $\epsilon > 0$ you can pick $0 < \delta < x$ so that $\frac{\mathop{sgn}(x + \delta) - \mathop{sgn}(x)}{\delta} = 0$. Same thing for $x < 0$, so the first derivative is zero except for $x = 0$ (the derivative there doesn't exist, as you can check; $\mathop{sgn}$ isn't continuous there).

Now for the second derivative, it is also zero, except for $x = 0$, because $\mathop{sgn}'(0)$ doesn't exist.

• Indeed, I was looking at it incorrectly.Thank you. – user82004 Apr 10 '14 at 22:13