The maximum of two numbers $x$ and $y$ is represented by $\max(x,y)$. So $\max(-1,3)=\max(3,3)=3$ and $\max(-1,-4)=\max(-4,-1)=-1$. The minimum of $x$ and $y$ is represented by $\min(x,y)$. Can you help me to prove that $$\max(x,y)=\dfrac{x+y+|y-x|}{2}$$ $$\min(x,y)=\dfrac{x+y-|y-x|}{2}$$
2026-04-02 10:45:49.1775126749
On
Proving maximum and minimum
48 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
On
Let's suppose that $x\leq y$. Then, $y-x\geq 0$, hence, $|y-x|=y-x$. Therefore,
$$ \frac{x+y+|y-x|}{2}=\frac{x+y+y-x}{2}=\frac{2y}{2}=y=\max\{x,y\}. $$
This is one of four things you need to do. You must also consider the case $x>y$ above and then consider both $x\leq y$ and $x>y$ to prove the formula for the $\min$.
\begin{align} \frac{x+y+|y-x|}{2} &= \begin{cases} \frac{x+y+y-x}{2} & \text{if } y \geq x \\ \frac{x+y-y+x}{2} & \text{if } y < x \\ \end{cases}\\ &= \begin{cases} \frac{2 \cdot y}{2} & \text{if } y \geq x \\ \frac{2 \cdot x}{2} & \text{if } y < x \\ \end{cases}\\ &= \begin{cases} y & \text{if } y \geq x \\ x & \text{if } y < x \\ \end{cases}\\ &= \max(x,y) \end{align}
Now you do the other one.