Differentiable optimization problem