Suppose multivariate function $f(x_1, x_2, \ldots, x_n) = \sum\limits_{i=1}^n\ln \left( 1+e^{\,-c_i\sum\limits_{j=1}^n {d_{ij}} x_j} \right)$, where $c_i$ is either $1$ or $-1$ and $d_{ij}$ is arbitrary real number.
I'd like to simplify the gradient of $f(X)$ for the purpose of gradient-based optimization, specifically, I attempt to further simplify $\dfrac{\partial f}{\partial x_k} = \sum\limits_{i=1}^n \dfrac{e^{\,-c_i\sum\limits_{j=1}^n d_{ij} x_j} (-c_id_{ik})} {1+e^{\,-c_i\sum\limits_{j=1}^n d_{ij} x_j }}$.
Of course, if it's possible to simplify in any matrix way, I would be glad to know since many science softwares support matrix algebra. But is it possible to further simplify the gradient?