determine stationary points of a function