Taking the gradient of a function that is defined as a max

40 Views Asked by At

Consider a smooth function $f(x,y) : \mathbb R^n\times \mathbb R^m \to \mathbb R$. Let $g(x) := \max_y f(x,y)$ (suppose the max exists and is unique for all $x$). Is there any theorem about how to compute $\nabla_x g(x)$ given the gradient $\nabla_{(x,y)} f(x,y)$ of $f$? I'm interested in theorems of this sort even if strict conditions must be met.