I know it isn't differentiable at $0$ as the limit of $\frac{|x|}{x}$ does not exist as $x$ approaches $0$.
I want to check though for all other $x$ values as the derivative should be $1$ for positive values and $-1$ for negative values.
Taking the limit as $x \to a$ of $\frac{|x|-|a|}{x-a}$. Now do I consider the two cases:
- $|x|-|a| > 0$, then we get $1$, if $a$ is positive.
- $|x|-|a| < 0$, then we get $-1$, if $a$ is negative.
I'm not sure how to show that the derivative is $1$ for positive $x$ values and $-1$ for negative $x$ values.
By definition of absolute value $x\mapsto |x|:=\begin{cases}x,\quad x>0\\0,\quad x=0\\-x,\quad x<0,\end{cases}$ then applying the definition to derivative,$$\frac{|x|-|a|}{x-a}=\begin{cases}\frac{x-a}{x-a},\quad a>0,x>0 ,\\\frac{-(x-a)}{x-a},\quad a<0,x<0\end{cases}$$ Hence $$|~|'(a)=\lim_{x\to a}\frac{|x|-|a|}{x-a}=\begin{cases}1,\quad a>0,\\-1,\quad a<0.\end{cases}$$ A simpler method is: