The gradient of a max function at a differentiable point

203 Views Asked by At

I suppose to:

Calculate the direction of steepest descent for the function $$f(x_1,x_2)=x_1+x_2+\max(0,(x_1)^2+(x_2)^2-4)$$ at the point $x=(0,-2)$.

What I did:

Since the direction of steepest descent is $-\nabla f(x^k)$, I try to find the gradient of $f(x)$.

But at the point $x=(0,-2)$, $(x_1)^2+(x_2)^2-4=0$, equal to the first element in max function, so I don't know how to determine the gradient of this max function at that point.

Thank you.