Finding Extremes of Functions