I'd like to calculate the derivative $\frac{\partial u}{\partial \beta}$, where
$$ u = [y - g^{-1}(X^T\beta)]^T \Sigma^{-1}[y - g^{-1}(X^T\beta)], $$
$y = (y_1, \ldots, y_n)^T$ and $\beta = (\beta_1, \ldots, \beta_p)^T$ are vectors and $x_{ji} = (x_{j1}, \ldots, x_{jn})$.
Hints: (use chain rule, the following facts may help)