Differentiability of $\mathrm{max}(x, y)$ at $x=y$

Hint: Write

$$\operatorname{max}(x,y) = \frac{x + y + |x-y|}{2}$$


Take any point $(a,a)$ and prove that the partial derivative does not exist. The partial derivative is $\lim_{x\rightarrow a} \frac{f(x,a)-f(a,a)}{x-a}$. The left limit for this is $$\lim_{x\uparrow a}\frac{\max\{x,a\}-a}{x-a}=\lim_{x\uparrow a}\frac{a-a}{x-a}=0$$ while the right limit is $$\lim_{x\downarrow a}\frac{\max\{x,a\}-a}{x-a} = \lim_{x\downarrow a}\frac{x-a}{x-a}=1$$