$\DeclareMathOperator*{\argmin}{arg\,min}$
I want to find the Jacobian of the following function $D:\mathbb{R}^n\rightarrow\mathbb{R}^n$:
$$ D(p) = \argmin_{x} \left(C(x) - x \cdot p\right)\ \text{ s.t. } x \in X $$
where $C$ is twice differentiable and $X$ is a convex set.
According to Bertsekas, Non linear Programming, p12, without the constraint set $X$ we can apply sensitivity analysis.
Let $f(x, p) = C(x) - x \cdot p$. Treat $p$ is a parameter to the minimization problem involving $x$:
$$ \min_x f(x, p)\ \text{ s.t. } x \in \mathbb{R}^n $$
Assuming the optimal point $x^*$ can be expressed as a unique and differentiable function of $p$, $x(p)$, and $(\nabla^{2}_{xx}f)^{-1}$ exists, then:
$$ \nabla x(p) = - (\nabla^{2}_{xa}f(x(p), p))(\nabla^{2}_{xx}f(x(p), p))^{-1} $$
Substituting the original objective function back in:
$$ \nabla x(p) = (\nabla^{2}_{xx}C(x(p)))^{-1} $$
I.e. the Jacobian is the inverse Hessian of $C$. If we know a given $x^*$, $\nabla D(p) = (\nabla^{2}_{xx}C(x^*))^{-1}$ in the vicinity (open sphere) around $x^*$.
My issue is I need to account for the convex constraint set, $X$, and I'm unsure how to do that. If $X$ is formed by a set of inequality constraints $g(x) \le 0$, we can apply the above sensitivity analysis using the Lagrangian first order conditions (assuming Lagrangian multipliers exist). However, in my case $X$ is just and arbitrary convex set.