A function f can achieve a maximum or minimum value only at
1. an endpoint of its range (as the function x does)
2. a singularity ( as |x| does at x = 0)
3. a critical point of f, where f ' = 0
At a critical point, f has a
Local Maximum if f ' '< 0
Local Minimum if f " > 0 (think of x2 at x = 0.)
A local max or min may be the max or min, but it may not be.
You must check the endpoint, other local extrema and singular points as well to find out if it is.
(a local maximum also occurs if f ''= 0, f ''' = 0 and the first derivative that is not 0 is an even one,and is negative.)
Tin can example