Text this: An efficient method for determining all the extreme points of function with one variable