Finding the gradient of $(,)=\max\{||,||\}$ for $|x|=|y|$

134 Views Asked by At

We have the function $f : \mathbb{R}^2 \to \mathbb{R}$ given by

$$f(x,y) := \max \left\{ |x|, |y| \right\}$$

Let $C := \left\{ (x,y) \mid |x|=|y| \right\}$. Given point $(x,y) \in C$, how can I find the gradient $\nabla f(x,y)$ if it exists?

But I don't think the function is differentiable in $|x|=|y|$, so I can't find $\nabla f(x,y)$ for $(x,y) \in C$, or what? Are there other points where $f$ is not differentiable?