using steepest descent or ascent method