TITLE: Interchange derivative and argmin
QUESTION [7 upvotes]: Let $y(x) = \arg \min_{y \in \mathbb{R}^+} \{g(x,y)\}$ for some function $g$ and any given $x$. Then, if I want to determine whether $y(x)$ is non-increasing/decreasing in $x$, how can I interchange $\partial y(x) / \partial x$ with the $\arg\min$ function (i.e., which condition(s) are required)? 
Any idea will be much appreciated!

REPLY [7 votes]: Let me denote $h(x) = \arg \min_{y \in \mathbb{R}^+} \{g(x,y)\}$ for clarity.
This helps make a difference between the variable $y$ in $g(x,y)$ and the function.
First of all, it is not true that $h'(x) = \arg \min_{y \in \mathbb{R}^+} \{\partial_xg(x,y)\}$, so you cannot simply exchange the derivative with the $\arg\min$.
For a simple example of this, consider $g(x,y)=y^2$.
There is a way to calculate $h'(x)$, though, if $g$ is nice.
It is enough to assume that the minimum exists uniquely for all $x$, that $g\in C^2$, and that $\partial_y^2g(x,y)>0$ at $y=h(x)$.
To find the derivative, start with observing that the partial derivative has to vanish: $\partial_2g(x,h(x))=0$.
Here I denote by $\partial_2$ the derivative with respect to the second argument — you may call it $\partial_y$ if you want, but there is no $y$ in this formula.
Differentiating this identity with respect to $x$ gives
$$
\partial_1\partial_2g(x,h(x))+h'(x)\partial_2^2g(x,h(x))=0.
$$
Since $\partial_2^2g(x,h(x))\neq0$, you can solve for $h'(x)$.
This can be viewed as a corollary of the implicit function theorem.