Why is $|x|'=\frac{x}{|x|}$? Why is $|x|'=\frac{x}{|x|}$ ?
May someone explain this clearly? If $x>0$ then it should be 1, and if $x<0$ then it's $-1$...

Well, for a full answer, let's deal with this problem in $n$ dimensions. Let $\mathbf{x}=(x_1,...,x_n)=\sum_{i=1}^{n} x_i \widehat{\mathbf{e}_i}$ and $\Vert\mathbf{x}\Vert = \sqrt{\sum_{i=1}^{n} {x_i}^2}$ Then
$$\nabla \Vert\mathbf{x}\Vert = \sum_{i=1}^{n} \frac{\partial \Vert\mathbf{x}\Vert}{\partial x_i} \widehat{\mathbf{e}_i}$$
Using the chain rule,
$$\frac{\partial \Vert\mathbf{x}\Vert}{\partial x_i} = \frac{1}{2\sqrt{\sum_{i=1}^{n} {x_i}^2}} {2 x_i}$$
$$=\frac{x_i}{\Vert\mathbf{x}\Vert}$$
Thus
$$\nabla \Vert\mathbf{x}\Vert = \sum_{i=1}^{n} \frac{x_i}{\Vert\mathbf{x}\Vert} \widehat{\mathbf{e}_i}$$
$$= \frac{\mathbf{x}}{\Vert\mathbf{x}\Vert}.$$
