How To Determine Local Maximum And Minimum