newton 1d optimizer completed and not tested