 By the extreme value theorem, a continuous function on a closed interval must attain its minimum and maximum values at least once.If the function is differentiable, the minima and maxima can only occur at critical points or endpoints.This also has applications in graph sketching