Computing the partial derivative of a vector-valued function