the gradient is given by: