derivative of a / (1 + exp((m - x) / s)) with respect to x