Setting the derivative to zero will give all relative maxima and minima for the function

bUT THIS MAY NOT HAVE ANY BEARING ON OUR PROBLEM. These points are both in the interval, but the endpoints could very well be what we are after. to find them

and

And you can see that themax and min occur at the endpoints of the interval.absolute

The key here is to know what the problem is asking, and then know what you need to use to solve it.