For $x, y \in \mathbb{R}$, prove that $\max(x, y) = \frac{x + y + |x - y|}{2},$ and $\min(x, y) = \frac{x + y - |x - y|}{2}$.

187 Views Asked by At

Prove that for all real numbers $x$ and $y$, $$\max(x, y) = \dfrac{x + y + |x - y|}{2},$$ and $$\min(x, y) = \dfrac{x + y - |x - y|}{2}.$$ For any real number $x$, the absolute value of $x$, denoted $|x|$ is defined as follows: \begin{equation} |x| = \begin{cases} x; & \text{ if } x \geq 0 \\ -x; & \text{ if } x< 0 \end{cases} \end{equation}

What I understand from this is that $|x| = x$ if $x \geq 0$ or $|x| = −x$ if $x<0$. Other than that I don't really know how to start this.

4

There are 4 best solutions below

0
On

This is a good approach, but it might be useful to rewrite $|x-y|$ in terms of $x$ and $y$: $$ |x-y|=\left\{\begin{array}{} x-y&\text{if }x\ge y\\ y-x&\text{if }x\lt y \end{array}\right. $$ Using this in your formula should make things simpler.

2
On

If $\displaystyle x>y$ then $x-y>0$:

$|x-y|=x-y$

$\max(x,y) = (x+y+x−y)/2 = x$

$\min(x,y) = (x+y-(x−y))/2 = y$

If $\displaystyle x<y$ then $x-y<0$:

$|x-y|=y-x$

$\max(x,y) = (x+y+y-x)/2 = y$

$\min(x,y) = (x+y-(y-x))/2 = x$

If $x=y$ then:

$|x-y|=0$

$\max(x,y) = (x+y)/2 = x=y$

$\min(x,y) = (x+y)/2 =x=y$

0
On

$|x-y|$ means the distance between $x$ and $y$ in the number line.

On the other hand, $\frac{x+y}{2}$ means the midpoint between $x$ and $y$.

(you can check those two statements if you didn't know them!)

Therefore, $\frac{x+y+|x-y|}{2}=\frac{x+y}{2}+\frac{|x-y|}{2}$, which means adding half the distance between $x$ and $y$ to the midpoint of $x$ and $y$, is $\max(x, y)$.

Similarly, $\frac{x+y-|x-y|}{2}=\frac{x+y}{2}-\frac{|x-y|}{2}$, which means subtracting half the distance between $x$ and $y$ from the midpoint of $x$ and $y$, is $\min(x, y)$.

0
On

\begin{align} \max\{x,y\} + \min\{x,y\} &= x + y \\ \max\{x,y\} - \min\{x,y\} &= |x-y| \\ \text{Adding we get} \\ 2\max\{x,y\} &= x + y + |x-y| \\ \text{Subtracting we get} \\ 2\min\{x,y\} &= x + y - |x-y| \\ \end{align}