1 Functions for optimization of a scalar objective function