Proposition: Closed Formula for the Maximum and Minimum of Two Numbers

For any two real numbers \(x,y\in\mathbb R\) the maximum and minimum can be calculated using the following formulae:

$$\begin{array}{rcl}\max(x,y)&=&\frac 12(x+y+|x-y|),\\ \min(x,y)&=&\frac 12(x+y-|x-y|),\end{array}$$

where $|x-y|$ denotes the distance between $x$ and $y$.

Proofs: 1


Thank you to the contributors under CC BY-SA 4.0!

Github:
bookofproofs


References

Bibliography

  1. Forster Otto: "Analysis 1, Differential- und Integralrechnung einer Veränderlichen", Vieweg Studium, 1983