About the derivative of the absolute value function For this question, let $f(x) = |x|$.

I found this answer saying that the derivative of the absolute value function is the signum function. In symbols,
$$\frac{d}{dx}|x| = \mathrm{sgn}(x).$$
I know that
$$f'(x) = \frac{x}{|x|}$$
using the chain rule. Notice that this is well-defined for $x \neq 0$. However, the definition of the signum function is
$$\mathrm{sgn}\,x = \begin{cases}-1 && \text{for } x< 0 \\ 0 &&\text{for }x = 0 \\ 1 && \text{for } x > 0\end{cases}.$$
This will be my question:

Are $x/|x|$ and $\mathrm{sgn}\,x$ the same derivative of $|x|$?

 A: No they are not. The absolute value function is differentiable at $x$ if and only if $x\ne0$. And, when that happens, the derivative is indeed $\operatorname{sgn}(x)$ or $\frac x{|x|}$. But, since the derivative of the absolute value function is undefined at $0$, but $\operatorname{sgn}$ is defined at that point, those two functions have distinct domains and therefore they cannot possibly be equal.
A: Yes, in fact you have three common expressions for $\text{sgn}$:
$$\text{sgn}(x) = \frac{x}{|x|} = \frac{|x|}{x}.$$
The two last expressions are of course only valid for $x \neq 0$, but poses no problem when talking about the derivative of $|x|$ since it is not differnetiable at $0$.
EDIT: You can of course not say that the derivative of $|x|$ and $\text{sgn}$ are the same function, since the have different domains. But $\text{sgn}$ provides a very compact way of presenting the derivative of $|x|$ when you make sure that you declare for which $x$ this is valid. What you can write is
$$\frac{d}{dx}|x| = \text{sgn}(x) \quad \text{for } x \neq 0.$$
A: Summary:
$$|x|'\equiv\frac{|x|}{x}$$ is true.
$$|x|'\equiv\text{sgn}(x)$$ is not.
A: yes, the function $f(x)=|x|$ is non differentiable at $x=0$ so as far as domain is concerned for $f'(x)$ it is going to be $\mathbb{R} - {{0}}$  and for this domain $x/|x| = sgn(x)$
for better understanding of where functions are non differentiable refer
http://www-math.mit.edu/~djk/calculus_beginners/chapter09/section03.html
