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|$?


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.$$
