If f(x) is a differentiable function, or differentiable except, say, at a finite set of of points, we can try to find where it achieves its minimum or maximum value by looking at f'(x). When f'(x)>0 the function is increasing. When f'(x)<0 the function is decreasing. When f'(x)=0 or is undefined, we have a candidate for a local maximum or minimum. We then have to examine the behavior of the function by looking at its first and/or second derivatives to see if we have found a global minimum or a global maximum or neither.