TITLE: Differentiability of $\mathrm{max}(x, y)$ at $x=y$
QUESTION [5 upvotes]: I am trying to figure out differentiability of $\mathrm{max}(x, y)$. Intuitively, it should not be differentiable at $x=y$, since it changes direction "non-smoothly" at those points. 
I can not, however, find a way to prove this algebraically.

REPLY [5 votes]: 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$$