Prove $|x|=\max\{x,-x\}$ first time poster here, so please excuse my noobiness
I'm going through some basic first year college math exercises, because i found out i still can't do some of the proofs, and I've encountered this
the absolute value of x is defined as
$$|x|=\begin{cases}x& \text{ if } x\geq  0\\ -x& \text{ if } x<  0
\end{cases}$$
prove that $|x|=\max\{x,-x\}$
i honestly have no idea on what is required from me/how should i start
can someone please help me out with a hint, or just something what would get me on the right track? thx
 A: Welp,  when asked do...
$|x|$ is defined conditionally on whether $x \ge 0$ or not.  So we prove it as such.  
If $x \ge 0$ then $-x \le 0$ and $ x \ge -x$.  So $\max(x,-x) = x = |x|$.
If $x < 0$ then $-x > 0$ and $-x > x$.  So $\max(x,-x) = -x = |x|$.  QED.
Alternatively we could do:
$\max(x,-x) = \begin{cases}x& \text{ if } x\geq  -x \iff x \ge 0\\ -x& \text{ if } x < - x \iff x<  0
\end{cases} $ which is the exact same definition as $|x|$.
===
A third way is to note $x = \pm |x|$ (plus if $x \ge 0$; minus if $x < 0$) and $-x = \mp|x|$ (vice versa).  $|x| \ge 0 \ge -|x|$ so $\max(x,-x) = \max(|x|, - |x|) = |x|$.
There's so many ways to do it.  Basically the definitions are equivalent.
===
Basically both absolute value and max(x,-x) are both conditional identities of the form: $f(x) = x$ if $x$ is "nice".  $f(x) = -x$ otherwise.  For $|x|$, "nice" means $x \ge 0$.  For $\max(x,-x)$, "nice" means $x \ge -x$.  As $x \ge 0 \iff x \ge -x$ these are both the same thing.
A: First, note that if $x = 0$, them $x = -x$, and so the result is obtained by direct computation.  Now, examine the case $x \neq 0$ by separating it into two subcases: (1) $x > 0$ and (2) $x < 0$.  If still having difficulty, first try to see if your result holds for specific values of $x$, e.g. $x = 1$ or $x = -2$.
A: Separate into two cases:
If $x \ge 0$, then $\max (x, -x) = x = |x|$.
If $x < 0$, then $\max(x,\, -x) = -x = |x|$.
Thus in either case we have $\max(x, \, -x) = |x|$.
A: Alternative Method:
Assuming that one is familiar with the formula, $$\max\{ a,b \}=\dfrac{a+b+|a-b|}{2}.$$ Then it becomes trivial to check that $\max\{x,-x\}$ simplifies to $|x|$. 
