How to calculate the Lipschitz constant(or Lipschitz norm) for $|x|$? I want to calculate the following equality:
$$
\sup_{x\in[-a,a]} |x| + \sup_{x,x' \in [-a,a]} \frac{||x'|-|x||}{|x'-x|} = a+1
$$
for $a>0$.
The first term supremum is $a$, but I cannot know how to calculate the second term.

We can try as follows: suppose $\;x'\ge x\;$ , then
$$x\ge0:\;\;\implies \begin{cases}|x'|-|x|=x'-x\\{}\\|x'-x|=x'-x\end{cases}\implies\;\frac{||x'|-|x||}{|x'-x|}=1$$
and now, in general, and for $\;x\neq x'\;$:
$$r:=\frac{||x'|-|x||}{|x'-x|}\implies r^2=\frac{x'^2-2|xx'|+x^2}{x'^2-2xx'+x^2}\le1$$
so you are done.
