Spivak Calculus chapter 1 problem 13 proof critique

Geometrically, suppose that $p$ and $q$ lie on real $x$ axis then,
max$(p, q)$= middle point + half the distance between $(p, 0)$ and $(q, 0)$
$= \frac{p+q} {2} + \frac{|p-q|} {2}$


A quicker way to the proof would be to show LHS=RHS. If $x\geq y,$ then LHS$=x$ and $|y-x|=-(y-x)=x-y$ which gives $$\text{RHS }=\frac{x+y+(x-y)}{2}=\frac{x+x}{2}=x.$$

The case $y> x$ is similar.


Your proof is ok.

Rephrasing:

1) Let $y\ge x$:

Then $\max(x,y)=y$ and

$\dfrac{y+x+|y-x|}{2}=2y/2=y$, since $|y-x|=y-x$.

2) Let $y<x$ :

Then $\max(x,y)=x$ and

$\dfrac{y+x+|y-x|}{2}=x$ since $|y-x|=x-y$.