Where is the function $\max(x,y)$ totally differentiable?

My question is to

determine the region of $\Bbb R^2$ on which $f(x,y)=\max(x,y)$ is totally differentiable.

So far I have proved that $\max(x,y)$ is continuous on $\Bbb R^2$ because $\max(x,y)=\frac{x+y}2+\frac{|x-y|}2$ is the sum of continuous functions on $\Bbb R^2$. I guess $\max(x,y)$ is totally differentiable $\iff$ $x \ne y$ but I got stuck at the very first step. I wanted to show that if $x \ne y$ then $\max(x,y)$ is totally differentiable. Since $x \ne y$, $$f(x,y)=\begin{cases}x & \text{if} \ x>y\\ y & \text{if} \ x<y. \end{cases}$$ Symbolically, $$\frac{\partial f}{\partial x} = \begin{cases} 1, & x>y\\ 0, & x<y. \end{cases}$$

$$\frac{\partial f}{\partial y} = \begin{cases} 0, & x>y\\ 1, & x<y. \end{cases}$$ But for some fixed $(a,b)\in \Bbb R^2$ with $a>b$, I cannot convince mysefl why $$\frac{\partial f}{\partial x}(a,b)=\lim_{t \to 0}\frac{\max(a+t,b)-a}t=1?$$ Also $\frac{\partial f}{\partial x},\frac{\partial f}{\partial y}$ seem not to be continuous. Nothing guarantees the differentiability of $f(x,y)$ here.

Any help would be much appreciated.

• Use the fact that if $a > b$, then $a + t > b$ for sufficiently small $|t|$. – anomaly Oct 4 '16 at 16:33
• I see, now I understand that $f_x,f_y$ exist when $x\ne y$. – user Oct 4 '16 at 16:47

In the open set $$U = \{(x,y): y>x\},$$ $$f(x,y) = y.$$ Of course the function $$y$$ is totally differentiable everywhere. Therefore $$f$$ is totally differentiable on $$U.$$ (No need to compute any partial derivatives.) The same holds for $$\{(x,y): y

We're left thinking about the set $$E= \{(x,y): y=x\}.$$ Let $$(a,a) \in E.$$ If $$h>0,$$ we have

$$\frac{f(a,a+h)-f(a,a)}{h} = \frac{a+h - a}{h} = 1.$$

If $$h<0,$$ we have

$$\frac{f(a,a+h)-f(a,a)}{h} = \frac{a - a}{h} = 0.$$

It follows that $$\lim_{h\to 0}(f(a,a+h)-f(a,a))/h$$ does not exist, i.e., $$\partial f/\partial y (a,a)$$ does not exist. Thus $$f$$ is not differentiable at any point of $$E.$$

• I just want to get the full understanding by trying to prove that $f(x,y)=y$ is differentiable everywhere on your open set $U$. Fix $(a,b)\in \Bbb R^2$ with $a>b$, we can compute $\frac{\partial f}{\partial x}(a,b)=0, \frac{\partial f}{\partial y}(a,b)=1$ and $\lim_{(x,y) \to (a,b)}\frac{\max(x,y)-y}{\sqrt{(x-a)^2+(y-b)^2}}=0$. Thus $f(x,y)=y$ is differentiable everywhere on $U$. Is that correct? – user Oct 5 '16 at 3:15