explain the meaning of the notation of the function 
What does this notation of the function mean?

$f(x)=\operatorname{max}\{(1-x),(1+x),2\}$,   $ x\in (-\infty,+\infty)$.
Also what is this function equivalent to?
I haven't understood the notation so couldn't get around to solving it
 A: $f(x)=\max\{1+x,1-x,2\},x\in(-\infty,\infty)$ means that for any $x\in (-\infty,\infty)$ we pick the largest value of that set.
It is equivalent to $f(x)=2$ when $|x|\le 1$ and $f(x)=1+|x|$ when $x\in(-\infty,\infty)\setminus[-1,1]$.
$f(x)= \left\{ \begin{array}{ll}
         1+x & \mbox{if $x \geq 1$};\\
2&\mbox{if $-1\lt x\lt 1$}\\
        1-x & \mbox{if $x \le 1$}.\end{array} \right. $
A: Let $f(x)=max${$g(x),h(x)$}. Then $$f(x)=\frac{g(x)+h(x)}{2}+\frac{|g(x)-h(x)|}{2}$$
porceed inductive for the case  $k(x)=max${$g(x),h(x),r(x)$}=max{$f(x),r(x)$}.
A: In terms of notation, this function evaluated at a certain $x$ returns the greatest in terms of the normal order relation (the largest) of the expressions $1-x$, $1+x$, and $2$. Additionally, the statement that $x$ belongs to the set $(-\infty , \infty)$ means that the function is defined for any real number.  In other words, the domain of $f$ is $\mathbb{R}$.
A: Well a simple generalized approach- 
If we have a function-
$f(x)=  \max \{g_1(x),g_2(x),\dots,g_n(x)\}$
Then $f(a)$ = maximum element of the set $ \{g_1(a),g_2(a),\dots,g_n(a)\}$ for all a.
