gradient_scalar function

Gradient of a scalar field in R^n