I am aware of an occasionally handy identity: $$\max(a,b)=\frac{a+b+|a-b|}{2}$$
However, I have found I'm unable to come up with a nice similar form for $\max(a,b,c)$. Of course I could always use the fact that $\max(a,b,c)=\max(\max(a,b),c)$ to write $$\begin{align}\max(a,b,c)&=\frac{\frac{a+b+|a-b|}{2}+c+\left|\frac{a+b+|a-b|}{2}-c\right|}{2} \\&=\frac{a+b+2c+|a-b|+|a+b-2c+|a-b||}{4}\end{align}$$
but this lacks elegance and in particular it is not clear to me just from the formula that if I permute the variables I get the same result.
The following doesn't work, but it would be nice if I could write $\max(a,b,c)$ in some form like $$\frac{a+b+c+|a-b|+|a-c|+|b-c|}{3}$$
Is there a good generalization of this to $n$ variables? That is given $x_1,x_2,\dots,x_n\in\mathbb{R}$, is there a way to write $\max(x_1,x_2,\dots,x_n)$ in a clearly symmetric form using addition, subtraction, division, and the absolute value function?