Chapter 1 #13 : Max\Min Formula

13. The maximum of two numbers $x$ and $y$ is denoted by max$(x, y)$. Thus max$(-1, 3) =$ max$(3, 3) = 3$ and max$(-1, -4) =$ max$(-4, -1) = -1$. The minimum of $x$ and $y$ is denoted by min$(x, y)$. Prove that

(1)
\begin{align} max(x, y) = \frac{x + y + |y - x|}{2} \\ min(x, y) = \frac{x + y - |y - x|}{2} \end{align}

Proof

Let $x$ and $y$ be arbitrary elements of $R$

We will first prove the formula for max$(x, y)$. Assume that $x \ge y$, then certainly max$(x, y) = x$ and $|x - y| = (x - y)$. Then we have

(2)
\begin{align} max(x, y) = x = \frac{x+x}{2} = \frac{x + x + y - y}{2} = \frac{x + y + (x - y)}{2} = \frac{x + y + |x - y|}{2} = \frac{x + y + |y - x|}{2} \end{align}

If your uncertain on how $|x - y| = |y - x|$ see Problem 1-12(i). The proof for the minimum formula is similar. Assume that $x \le y$, then certainly min$(x, y) = x$ and $|y - x| = (y - x)$. Then we have

(3)
\begin{align} min(x, y) = x = \frac{x + x}{2} = \frac{x + x + y - y}{2} = \frac{x + y + (x - y)}{2} = \frac{x + y - (y - x)}{2} = \frac{x + y - |y - x|}{2} \end{align}

$Q.E.D$