Algebraic Formula of max Function

A function to select maximum value between two of its arguments can have algebraic form

max(x,y)=x+y+xy2(1)\tag{1} \max(x, y) = \frac{x + y + |x - y|}{2}

as alternatif to the common form

max(x,y)={x,xy,y,x<y.(2)\tag{2} \max(x, y) = \left\{ \begin{array}{cc} x, & x \ge y, \newline y, & x < y. \end{array} \right.

The functions can be extended to function with more arguments, e.g.

max(a,b,c)=max(a,max(b,c)) \max(a, b, c) = \max(a, \max(b, c))

is for a function with a three arguments.